API Structure
The apis used in Feedback Module are developed in NodeJS and database used is MongoDB. Mongo stores data in JSON format. Data is called as a document in Mongo.
Commonly Used Terms
- prodId: Product Id
- collectionName: Name of the table from where you want to get data.
- keyName: Primary key of the table
- createdBy: User Name.
We have written some common and some page specific APIs. Following is the list:
Generic APIs
1). insertDocument
Description
API inserts any document.
Request details
method: POST
queryParams:
- prodId
- collectionName
- keyName
- createdBy
body: Any document Ex.
Response
2). updateDocumentFirstLevel
Description
API updates any document.
Request details
method: POST
queryParams:
- prodId
- collectionName
- keyName
- updatedBy
body: Any document Ex.
Response
3). getDocuments
Description
API returns the ids of all the documents.
Request details
method: POST
queryParams:
- prodId
- collectionName
- keyName
- createdBy
body:
Response
4). getDocumentDetailByIds
Description
API gives the details of a document.
Request details
method: POST
queryParams:
- prodId
- collectionName
- keyName
- createdBy
body:
Response
Question Set APIs
1). getResponseBasedFilteredDocuments
Description
API gives the details of users who have given a particular answer of a particular question.
Request details
method: POST
queryParams:
- prodId
- collectionName
- keyName
- createdBy
body:
Response
2). getAverageResult
Description
API gives the average.
Request details
method: POST
queryParams:
- prodId
body:
Response
DSC Enquiry APIs
1). insertAndSendEmail
Description
API inserts the enquiry and sends the email.
Request details
method: POST
queryParams:
- prodId
- createdBy
- deptName
body: Any document Ex.
Response
User APIs
1). userDetails
Description
API gives and saves the user details after getting from Java.
Request details
method: POST
queryParams:
- prodId
- userCode
- hostName
body:
Response
Logout APIs
1). logoutTW
Description
API gives and saves the user details after getting from Java.
Request details
method: POST
queryParams:
- prodId
- userId
- dept
body: