Survey Service (1.0.0)

Download OpenAPI specification:Download

This API collection serves the Survey Service, covering both Observations and Surveys. It provides various endpoints for managing and interacting with surveys and observations, along with comprehensive report generation functionalities.

Observations: Observations with Rubric: Allows assessment based on predefined rubrics. Observations without Rubric: Flexible observations without structured rubrics. Reports: Survey Reports: Generate detailed reports based on survey submissions. Observation Reports: Includes: Entity Reports: Focuses on specific entities being observed. Instance Reports: Provides detailed information on specific instances of observation. PDF Reports: Available for both entity and instance reports. This API collection supports essential workflows such as criteria upload, observation submission, report generation, and program management. It simplifies the process of collecting, managing, and analyzing data for both surveys and observations.

observation

API to create framework

The Upload Framework API allows users to upload a CSV file containing observation data, along with a framework in JSON format. The framework sheet should include an external_id (UUID) for each framework entry, and the criteria external_id generated during the criteria upload process must also be included.

This API is used to create solutions based on a framework upload. Users must provide a frameworkID (UUID) and specify the entityType as defined in the template.

header Parameters
x-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: multipart/form-data
framework
string <binary>

Responses

Response samples

Content type
application/json
{
  • "message": "Framework inserted successfully.",
  • "status": 200
}

Returns details of the observation including submissionId

The Assessment API retrieves information about a specific observation using the observation_id provided in the request. It returns details such as the questionnaire and other related information. The response also includes a submissionId, which is required for submitting responses through the Observation Submission API.

query Parameters
entityId
string
Example: entityId=5f8048a19a3faabb16a08473
submissionNumber
integer
Example: submissionNumber=1
header Parameters
x-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "district": "66d0560bdf92822366029c22"
}

Response samples

Content type
application/json
{
  • "message": "Assessment fetched successfully",
  • "status": 200,
  • "result": {
    }
}

Lists Observation submission

This API retrieves the details of a specific observation submission based on the observation-submission-id. It provides information about the submission, including responses to the observation's questionnaire, submission status, and other relevant data.

query Parameters
entityId
string
Example: entityId=64e82cf2a87fdf4cccb96944

EntityId for which the submission have been made

header Parameters
x-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "message": "Successfully fetched observation submissions",
  • "status": 200,
  • "result": [
    ]
}

API to submit/update observation Submissions

The Observation Submission API is used to submit answers to a questionnaire for a specific observation. By providing the observation_id and the corresponding answers, this API updates the answers in the database.

Request Parameters: observation_id (required): The ID of the observation for which answers are being submitted. answers (required): A collection of answers corresponding to the questionnaire questions. This should be structured according to the format specified in the questionnaire.

header Parameters
x-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "evidence": {
    }
}

Response samples

Content type
application/json
{
  • "message": "Submission completed successfully",
  • "status": 200,
  • "result": {
    }
}

Survey

returns a survey shareable link

This API retrieves a sharing link for a survey solution using the solutionExternalId provided in the path parameters. The returned link allows users to access or share the survey solution, enabling easy distribution or collaboration. This is particularly useful for sharing surveys with external participants or stakeholders.

query Parameters
appName
string
Example: appName=survey
header Parameters
X-auth-token
string
Example: {{token}}
Request Body schema: */*
string

Responses

Response samples

Content type
application/json
{}

Maps survey solution to a program

This API maps a survey solution, identified by solutionId, to a specific program. The programId should be passed in the query parameters (req.query.programId), which represents the external ID of the program. Once mapped, the solution will be associated with the designated program, allowing for its usage within the context of that program.

query Parameters
programId
string
Example: programId=TN-Program-1597301830708
header Parameters
X-auth-token
string
Example: {{token}}
Request Body schema: */*
string

Responses

Response samples

Content type
application/json
{
  • "status": 200,
  • "message": "Mapped survey solution to program successfully"
}

User assigned list of surveys

This API fetches a list of surveys that have been assigned to the authenticated user. The response includes details of each survey, such as the survey name, description, status, and other relevant information. It helps users track the surveys they are responsible for completing or managing.

query Parameters
search
string
filter
string
surveyReportPage
string
header Parameters
x-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: */*
string

Responses

Response samples

Content type
application/json
{
  • "message": "List of user assigned surveys",
  • "status": 200,
  • "result": {
    }
}

Solutions

creates new solution

This API is used to create a new solution. You need to pass the necessary details like name, description, and other solution-related metadata in the request body. It stores the solution in the system and returns its ID upon successful creation.

header Parameters
X-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: */*
string

Responses

Request samples

Content type
*/*
{
  "createdFor": [],
  "rootOrganisations": [],
  "programExternalId": "PISA test-1598030013395",
  "entities": [
    "5f33c3d85f637784791cd830"
  ],
  "entityType": "school",
  "externalId": "TN-Program-1597301830742",
  "name": "Improvement Project 3",
  "description": "Leveraging the huge number of private schools to show the significance of the financial problem by creating a petition and presenting to the authorities.",
  "subType": "observation",
  "type": "observation",
  "excludeScope": false,
  "isReusable": false,
  "isAPrivateProgram": false,
  "scope": {
    "entityType": "state",
    "entities": [
      "5f33c3d85f637784791cd830"
    ],
    "roles": "HM"
  }
}

Response samples

Content type
application/json
{
  • "message": "Solution created successfully",
  • "status": 200,
  • "result": {
    }
}

Lists targeted solution based on user profile

This API fetches a list of targeted solutions based on the user profile or any applied filters. It returns a collection of solutions that are specifically designed or relevant to the user’s role or criteria.

query Parameters
type
string
Example: type=survey
page
integer
Example: page=1
limit
integer
Example: limit=7
search
string
surveyReportPage
boolean
Example: surveyReportPage=true
header Parameters
X-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "entityType": "state",
  • "entityTypeId": "5f32d8228e0dc8312404056e",
  • "entities": [
    ],
  • "role": "BEO,HM"
}

Response samples

Content type
application/json
{
  • "message": "Successfully targeted solutions fetched",
  • "status": 200,
  • "result": {
    }
}

Verifies Observation Link and returns details

This API verifies the validity of an observation link provided as :link in the path parameters. It checks whether the link is active and valid, and returns relevant details associated with the observation if the verification is successful. This can be used to ensure that users are accessing a legitimate observation link before proceeding with further actions.

query Parameters
createProject
boolean
Example: createProject=false
header Parameters
X-auth-token
string
Example: {{token}}
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "role": "HM",
  • "state": "236f5cff-c9af-4366-b0b6-253a1789766a",
  • "district": "1dcbc362-ec4c-4559-9081-e0c2864c2931",
  • "school": "c5726207-4f9f-4f45-91f1-3e9e8e84d824"
}

Response samples

Content type
application/json
{
  • "message": "Observation solution link verified successfully",
  • "status": 200,
  • "result": [
    ]
}

Generates shareable link based on solutionId

This API generates and retrieves a shareable link for a solution based on the provided solutionId. The link can be used to access or share the solution with other users.

header Parameters
X-auth-token
string
Example: {{token}}

Responses

Response samples

Content type
application/json
{}

update solution api

~~~~ The Solution Update API is used to update information related to a solution, such as the evidence upload method or other details. This allows users to modify existing solution configurations to reflect changes in how evidence is collected or to update other solution-specific information.

header Parameters
x-auth-token
string
Example: {{token}}
Request Body schema: */*
string

Responses

Response samples

Content type
application/json
{
  • "message": "Solution updated successfully",
  • "status": 200
}

Returns details of the solution

This API retrieves detailed information about a solution by solutionId. The response includes all solution-related metadata such as name, description, categories, tasks, resources, and associated entities.

header Parameters
X-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: */*
string

Responses

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

solution listing api

This API returns a list of all available solutions. It can be used to fetch a comprehensive list or filter the results based on specific query parameters.

query Parameters
type
string
Example: type=observation
page
integer
Example: page=2
limit
integer
Example: limit=100
search
string
header Parameters
X-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Responses

Response samples

Content type
application/json
{
  • "message": "Solution Fetched successfully",
  • "status": 200,
  • "result": {
    }
}

Adds entities to the scope of a solution

This API adds entities to the scope of a solution. By passing the solutionId and a list of entity IDs in the request body, the entities are added to the solution’s scope for assessment or observation purposes.

header Parameters
X-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

internal-access-token
string

This token is required in the request header for internal authentication and access to specific APIs within the system. It verifies the user's internal privileges and grants access to restricted resources. The internal-access-token should be passed in the header with each request to ensure proper authentication for internal services.

Request Body schema: */*
string

Responses

Request samples

Content type
*/*
{
  "entities": [
    "5fd098e2e049735a86b748b1"
  ]
}

Response samples

Content type
application/json
{
  • "message": "Successfully added entities in solution scope",
  • "status": 200
}

add roles to the scope of a solution

This API allows adding roles to the scope of a solution. It updates the solution with additional roles that will be able to interact with or be evaluated by the solution. The solutionId and role details need to be provided in the request body.

header Parameters
X-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: */*
string

Responses

Request samples

Content type
*/*
{
  "roles": [
    "DEO",
    "HM",
    "TEACHER"
  ]
}

Response samples

Content type
application/json
{
  • "message": "Successfully added roles in solution scope",
  • "status": 200
}

removes entities from the scope of a solution

This API removes entities from the scope of a solution. By passing the solutionId and the entity IDs in the request body, the specified entities are removed from the solution’s scope.

header Parameters
X-auth--token
string
Example: {{token}}
Request Body schema: */*
string

Responses

Request samples

Content type
*/*
{
  "entities": [
    "5fd098e2e049735a86b748b1"
  ]
}

Response samples

Content type
application/json
{
  • "message": "Successfully removed entities from solution scope",
  • "status": 200
}

removes role from the scope of a solution

This API allows the removal of roles from the scope of a solution. By passing the solutionId and the role details in the request body, the specified roles are removed from interacting with the solution.

header Parameters
X-auth-token
string
Example: {{token}}
Request Body schema: */*
string

Responses

Request samples

Content type
*/*
{
  "roles": [
    "DEO"
  ]
}

Response samples

Content type
application/json
{
  • "message": "Successfully removed roles from solution scope",
  • "status": 200
}

Program

makes the user join the program

This API allows a user to join a program by providing the programId in the path parameters. Once the user is successfully added to the program, they will be able to participate in the program.

header Parameters
X-auth-token
string
Example: {{token}}
Request Body schema: */*
string

Responses

Request samples

Content type
*/*
{
  "userRoleInformation": {
    "district": "2f76dcf5-e43b-4f71-a3f2-c8f19e1fce03",
    "block": "966c3be4-c125-467d-aaff-1eb1cd525923",
    "state": "bc75cc99-9205-463e-a722-5326857838f8",
    "school": "28226200910",
    "role": "HM,DEO,MEO,CRP,Complex HM,SPD"
  },
  "isResource": true,
  "consentShared": true
}

Response samples

Content type
application/json
{
  • "message": "You have joined this program successfully",
  • "success": true,
  • "data": {
    }
}

api to create a new program

This API is used to create a new program. The request body should contain necessary details such as the program name, description, and any other relevant information to define the program. Once successfully created, the API returns the newly generated program's details.

eg req.body { "externalId" : "PROGID01", "name" : "DCPCR School Development Index 2018-19", "description" : "DCPCR School Development Index 2018-19", "isDeleted" : false, "resourceType" : [ "program" ], "language" : [ "English" ], "keywords" : [], "concepts" : [], "userId":"a082787f-8f8f-42f2-a706-35457ca6f1fd", "imageCompression" : { "quality" : 10 }, "components" : [ "5b98fa069f664f7e1ae7498c" ], "scope" : { "entityType" : "state", "entities" : ["5d6609ef81a57a6173a79e78"], "roles" : ["HM"] } "startDate" : "2023-04-06T09:35:00.000Z", "endDate" : ""2024-04-06T09:35:00.000Z" // optional }

header Parameters
X-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: */*
string

Responses

Request samples

Content type
*/*
{
  "externalId": "TESTING_BY_DEV_TEAM_9",
  "name": "Testing by dev team ap",
  "description": "testing by dev team",
  "resourceType": [
    "program"
  ],
  "language": [
    "English"
  ],
  "keywords": [],
  "concepts": [],
  "createdFor": [],
  "rootOrganisations": [],
  "startDate": "2023-05-01",
  "endDate": "2024-05-10",
  "imageCompression": {
    "quality": 10
  },
  "scope": {
    "entityType": "state",
    "entities": [
      "5f33c3d85f637784791cd830",
      "5f33c3d85f637784791cd831"
    ],
    "roles": [
      "HM",
      "DCT",
      "CRP",
      "DEO",
      "BEO"
    ]
  }
}

Response samples

Content type
application/json
{
  • "message": "Programs created successfully",
  • "status": 200,
  • "result": {
    }
}

lists all available programs

This API retrieves a list of all available programs. The response includes details like program IDs, names, and other relevant information for each program.

query Parameters
page
integer
Example: page=3
limit
integer
Example: limit=1
search
string
header Parameters
X-auth--token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Responses

Response samples

Content type
application/json
{
  • "message": "Program information list fetched successfully.",
  • "status": 200,
  • "result": {
    }
}

updates an existing program

This API updates an existing program using the programId provided as a path parameter. The request body should contain the fields to be updated, such as the program name, description, and other relevant data.

header Parameters
X-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: */*
string

Responses

Request samples

Content type
*/*
{
  "endDate": "2025-05-15 14:00:00",
  "scope": {
    "entityType": "state",
    "entities": [
      "5f33c3d85f637784791cd830",
      "5f33c3d85f637784791cd831"
    ],
    "roles": [
      "HM",
      "DCT",
      "CRP",
      "DEO",
      "BEO"
    ]
  }
}

Response samples

Content type
application/json
{
  • "message": "Programs updated successfully",
  • "status": 200,
  • "result": {
    }
}

List detail of a program

This API fetches the details of a specific program identified by the programId. The response includes all relevant program information such as the name, description, and any other metadata.

header Parameters
X-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Responses

Response samples

Content type
application/json
{
  • "message": "Programs fetched successfully",
  • "status": 200,
  • "result": {
    }
}

Adds entities to the scope of a program

This API adds entities to the scope of a specific program. The programId is passed as a path parameter, and the entities are passed in the request body.

header Parameters
X-auth-token
string
Example: {{token}}
Request Body schema: */*
string

Responses

Request samples

Content type
*/*
{
  "entities": [
    "5fbf3f8c3e9df47967eed916"
  ]
}

Response samples

Content type
application/json
{
  • "message": "Successfully added entities in program scope",
  • "status": 200
}

addRolesInScope

This API adds roles to the scope of a specific program. The programId is passed as a path parameter, and the roles are provided in the request body.

header Parameters
X-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: */*
string

Responses

Request samples

Content type
*/*
{
  "roles": [
    "HM"
  ]
}

Response samples

Content type
application/json
{
  • "message": "Successfully added roles in program scope",
  • "status": 200
}

API to remove roles in the scope of a program

This API removes roles from the scope of a specific program. The programId is passed as a path parameter, and the roles to be removed are provided in the request body.

header Parameters
X-auth-token
string
Example: {{token}}
Request Body schema: */*
string

Responses

Request samples

Content type
*/*
{
  "roles": [
    "BEO"
  ]
}

Response samples

Content type
application/json
{
  • "message": "Successfully removed roles in program scope",
  • "status": 200
}

removes entities from the scope of specific program

This API removes entities from the scope of a specific program. The programId is passed as a path parameter, and the entities to be removed are provided in the request body.

header Parameters
X-auth-token
string
Example: {{token}}
Request Body schema: */*
string

Responses

Request samples

Content type
*/*
{
  "entities": [
    "5f80353c946feebb14d68d57"
  ]
}

Response samples

Content type
application/json
{
  • "message": "Successfully removed entities in program scope",
  • "status": 200
}

Admin

API to creates index

API can be used to create index in the database for solution table

header Parameters
x-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

appname
string
Example: mentored
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "keys": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "Keys indexed successfully",
  • "status": 200
}

surveySubmissions

updates surveySubmission record

This API is used to update the answers for a specific survey submission. The surveySubmissionId is passed as a path parameter, and the request body contains the answers to the questions in the survey. The submitted answers will be updated in the database.

header Parameters
Content-Type
string
Example: application/json
Request Body schema: */*
string

Responses

Request samples

Content type
*/*
{
  "evidence": {
    "externalId": "SF",
    "answers": {
      "65dc4ab49551bfb995a2453f": {
        "qid": "65dc4ab49551bfb995a2453f",
        "value": "wewewe",
        "remarks": "",
        "fileName": [],
        "gpsLocation": "",
        "payload": {
          "question": [
            "Enter your First question",
            ""
          ],
          "labels": [
            "wewewe"
          ],
          "responseType": "text",
          "filesNotUploaded": []
        },
        "startTime": 1709026874058,
        "endTime": 1709026987127,
        "criteriaId": "65dc4ab49551bfb995a2454c",
        "responseType": "text",
        "evidenceMethod": "SF",
        "rubricLevel": ""
      }
    },
    "startTime": 1709026873403,
    "endTime": 1709027010423
  }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "message": "Survey submission created successfully"
}

Returns current status of the surveySubmission record

This API is used to fetch the current status of a survey submission. The surveySubmissionId is passed as a path parameter, and the API returns the status of that particular survey submission.

header Parameters
X-auth-token
string
Example: {{token}}

Responses

Response samples

Content type
application/json
{
  • "status": 200,
  • "message": "Submission status fetched successfully",
  • "result": {
    }
}

Fetches list of survey submissions done by user

This API is used to fetch a list of surveys that have been submitted or are in progress. The response includes details such as the solutionId, surveyId, the current status of the survey submission, the survey name, and the submissionId.

header Parameters
X-auth-token
string
Example: {{token}}

Responses

Response samples

Content type
application/json
{
  • "message": "survey list fetched successfully",
  • "status": 200,
  • "result": [
    ]
}

checks if survey submission is allowed for the passed id

This API checks if a specific survey submission, identified by surveySubmissionId, is allowed to proceed or perform certain actions. The response will indicate whether the user has the necessary permissions or if any constraints apply to the submission, such as completion status or other validation criteria.

query Parameters
evidenceId
string
Example: evidenceId=SF
header Parameters
x-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Responses

Response samples

Content type
application/json
{
  • "message": "Survey submission check completed successfully",
  • "status": 200,
  • "result": {
    }
}

Questions

API to upload questions to survey/Observations

The Bulk Create API is used to create multiple questions in an observation. Users can provide a batch of questions in the request, which will be added to the specified observation.

header Parameters
x-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: multipart/form-data
questions
string <binary>

Responses

Response samples

Content type
text/html
"_SYSTEM_ID","Question External Id","Question Name"
"66f13eedea227fad26f4cb88","N111_23_09_2024_15_40_1636625759433","Select the medium of the course consumption PRV"
"66f13eedea227fad26f4cb8e","N112_23_09_2024_15_40_1636625759433","Select the courses that you have enrolled in PRV 2.0"
,"N113_23_09_2024_15_40_1636625759433","Select the courses which you have got the certificate."
,"N114_23_09_2024_15_40_1636625759433","Select the courses that you have enrolled in PRV 2.0"
,"N118_23_09_2024_15_40_1636625759433","Give a rating on the reading materials available in the course"

Report

Returns submission report for survey

This API generates a detailed survey submission report based on the submissionId passed in the query parameters. It provides insights and data regarding the responses submitted for a specific survey or observation.

query Parameters
submissionId
string
Example: submissionId=66c849fb98a45cd39a392e17
header Parameters
x-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Responses

Response samples

Content type
application/json
{
  • "message": {
    },
  • "status": 200
}

Api used to generate observation report

This API generates an observation report based on the query parameters provided. The report can either include a PDF or be without a PDF, and it can be generated as an instance report (specific to a single instance of observation) or an entity report (across multiple entities).

header Parameters
x-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "submissionId": "602a15ea1e72d1287475c66b",
  • "observation": true,
  • "entityType": "district",
  • "pdf": true,
  • "criteriaWise": true
}

Response samples

Content type
application/json
"{\n \"message\": \"Observation Report generated successfully\",\n \"status\": 200,\n \"result\": {\n \"result\": true,\n \"entityType\": \"district\",\n \"entityId\": \"a87aa157-0d73-4aa3-9623-cb2f8a3ecf32\",\n \"entityName\": \"AGRA\",\n \"solutionName\": \"Enrollment challenges in DIKSHA Courses-1613135097520\",\n \"observationId\": \"60267cf9262f8023e11072a3\",\n \"programName\": \"School development Program\",\n \"totalSubmissions\": 1,\n \"reportSections\": [\n {\n \"qid\": \"60267cf9262f8023e1107292\",\n \"order\": \"Q1_1612422856598-1613135097685\",\n \"question\": \"Enter the date of observation\",\n \"responseType\": \"date\",\n \"answers\": [\n \"2021-02-15T17:39:18.865+05:30\"\n ],\n \"chart\": {},\n \"instanceQuestions\": [],\n \"options\": [],\n \"criteriaName\": \"Criteria 1\",\n \"criteriaId\": \"60267cf9262f8023e11072a0\",\n \"evidences\": [\n {\n \"name\": \"tmp_IMG-20210131-WA00071724287027747939105.jpg\",\n \"sourcePath\": \"601793cd285b99334d2d9617/e85060c8-a76b-4e79-a36b-95836491baf9/tmp_IMG-20210131-WA00071724287027747939105.jpg\",\n \"fileUrl\": {\n \"filePath\": \"601793cd285b99334d2d9617/e85060c8-a76b-4e79-a36b-95836491baf9/tmp_IMG-20210131-WA00071724287027747939105.jpg\",\n \"url\": \"https://storage.googleapis.com/mentoring-dev-storage-private/601793cd285b99334d2d9617/e85060c8-a76b-4e79-a36b-95836491baf9/tmp_IMG-20210131-WA00071724287027747939105.jpg?GoogleAccessId=sl-mentoring-dev-storage%40sl-dev-project.iam.gserviceaccount.com&Expires=1725978364&Signature=ICtClNBhEmGRB01zJU6nbDo3vc81FHdIYxIDDllPFA2sK42GL2ioU6UsieGTBbS1plFDV46%2FOIeBZupGx9UTLJ8yQHmOLJWlj8NyWU9QaS1UqsF6KQPoSOevN%2Fn6UXV5KQkRc8QruyLpKS%2BIoermhz%2BkWT%2BQSvoUwS6%2BGvL2iYCVzMA%2FVJfoIZPeL6a6Xv0JDAUpJQgF%2BNyCjSMO7tBh7UNmDXtsAxAY3G%2BhJ%2BjoehaPANT1IfE%2FR9dYbOVmwG1%2BNiDWNGhA4%2BEY1TU98sL4f7tOlr8nnjCSnvc2suSME%2B1wB1uQxVESGZGbmo87s2FXm6glJrKnPkVbgf%2Fcq41arA%3D%3D\"\n },\n \"submissionId\": \"602a15ea1e72d1287475c66b\"\n }\n ]\n },]\n }\n }"

Survey Creation Flow

Create survey solution template

This API is used to create a solution template for a survey. The solution template defines the structure, questions, and configurations that will be part of the survey. It allows users to customize the survey solution according to specific requirements, such as adding questions, assigning criteria, and configuring other settings that guide the survey's execution.

header Parameters
x-auth-token
string
Example: {{token}}
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "name": "Survey",
  • "description": "School Assessment",
  • "externalId": "school-assessment-survey",
  • "startDate": "2025/10/10",
  • "endDate": "2025/12/25",
  • "linkTite": "Read more about the solution",
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "message": "Survey solution template created successfully",
  • "result": {
    }
}

Creates a child solution from an existing solution

This API is used to create a child solution from an existing solution. You need to pass the solutionId and appName as query parameters to generate the child solution.

query Parameters
appName
string
Example: appName=survey
header Parameters
X-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: */*
string

Responses

Request samples

Content type
*/*
{
  "externalId": "survey-234",
  "name": "survey test 123",
  "description": "survey description",
  "programExternalId": "00000000-1621323219342"
}

Response samples

Content type
application/json
{}

Returns details of a specific survey using the surveyId.

This API retrieves the details of a specific survey using the surveyId. It provides information about the survey's solution, program, assessment, and the associated questionnaire, including questions and response options.

header Parameters
X-auth-token
string
Example: {{token}}

Responses

Response samples

Content type
application/json
{
  • "message": "Survey details fetched successfully",
  • "status": 200,
  • "result": {
    }
}

Observation Creation Flow

criteria is uploaded via use of csv file

The Upload Criteria API allows users to upload a CSV file containing information about the criteria used to observe or evaluate an entity. Each record in the CSV should include a criteriaId, criteriaName, type, and other relevant information. The API processes this file, validates the data, and stores the criteria details in the system for further use in reports and evaluations.

header Parameters
x-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: multipart/form-data
criteria
string <binary>

Responses

Response samples

Content type
text
"Criteria Name","Criteria External Id","Criteria Internal Id"
"Cleanliness","PRV_16_09_2024_13_05_163662571997","66f159b8a15533ac19d7a681"

API to create a solution based on a framework upload

This API is used to create solutions based on a framework upload. Users must provide a frameworkID (UUID) and specify the entityType as defined in the template.

query Parameters
frameworkId
string
Example: frameworkId=606d92fa-42d8-11ec-ac61-10092024-17_58

UUID

entityType
string
Example: entityType=school

can be school,cluster,block

header Parameters
x-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: multipart/form-data
framework
string <binary>

Responses

Response samples

Content type
application/json
{
  • "message": "Observation Solution generated.",
  • "status": 200,
  • "result": {
    }
}

API to add entities to a specific observation

This API retrieves a list of entities associated with a specific observation. You can pass the observation_id as a params parameter or the solutionId as a query parameter. The API will return the entities related to the observation or the solution, based on the input.

query Parameters
solutionId
string
Example: solutionId=66e0433788b44767f9faf236
header Parameters
x-auth-token
string
Example: {{token}}
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "district": "123e4567-e89b-12d3-a456-426614174007"
}

Response samples

Content type
application/json
{
  • "message": "Observation entities fetched successfully",
  • "status": 200,
  • "result": {
    }
}

creates a child solution from an existing solution

This API is used to create a child solution from an existing solution. You need to pass the solutionId and entityType as query parameters to generate the child solution.

query Parameters
solutionId
string
Example: solutionId=606d92fa-42d8-11ec-ac61-10092024-17_58-OBSERVATION-TEMPLATE

Enter external solution id

entityType
string
Example: entityType=school

can be school,cluster or block

header Parameters
X-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "externalId": "",
  • "name": "dev_testing",
  • "description": "dev testing"
}

Response samples

Content type
application/json
{
  • "message": "Duplicate Solution generated.",
  • "status": 200,
  • "result": {
    }
}

Details of a specific solution using the solution's id

This API retrieves the details of a specific solution using the solution's id. It returns comprehensive information about the solution, including metadata, configuration, and any related data required for further operations.

header Parameters
X-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: */*
string

Responses

Response samples

Content type
application/json
{
  • "message": "Assessment fetched successfully",
  • "status": 200,
  • "result": {
    }
}

API used to add entities to a specific observation

This API is used to add multiple entities to a specific observation. The observation_id is passed as a path parameter, and the entities are sent in the request body as an array of entity IDs. The provided entities will be associated with the observation.

header Parameters
x-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "data": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "Updated successfully.",
  • "status": 200
}

Upload Themes For Frameworks

This API uploads themes for a specific framework using the frameworkExternalID provided in the path parameters. A CSV file containing the theme data must be provided in the body with the field name "themes." The uploaded themes are then linked to the corresponding framework, allowing them to be used in assessments, surveys, or other relevant areas of the framework.

Responses

Response samples

Content type
text
"theme","aoi","indicators","criteriaInternalId","status"
"Organisational Leadership (संस्थागत नेतृत्व)###D1###40","","","62541ba48de7164ffffc5512###40","success"
"Organisational Leadership (संस्थागत नेतृत्व)###D1###40","","","62541ba48de7164ffffc5513###40","success"
"Organisational Leadership (संस्थागत नेतृत्व)###D1###40","","","62541ba48de7164ffffc5514###40","success"
"Organisational Leadership (संस्थागत नेतृत्व)###D1###40","","","62541ba48de7164ffffc5515###40","success"
"Social Leadership (सामाजिक नेतृत्व)###D2###40","","","62541ba48de7164ffffc5516###40","success"
"Social Leadership (सामाजिक नेतृत्व)###D2###40","","","62541ba48de7164ffffc5517###40","success"
"Social Leadership (सामाजिक नेतृत्व)###D2###40","","","62541ba48de7164ffffc5518###40","success"
"Social Leadership (सामाजिक नेतृत्व)###D2###40","","","62541ba48de7164ffffc5519###40","success"
"People Leadership (व्यक्ति नेतृत्व)###D3###40","","","62541ba48de7164ffffc551a###40","success"
"People Leadership (व्यक्ति नेतृत्व)###D3###40","","","62541ba48de7164ffffc551b###40","success"
"People Leadership (व्यक्ति नेतृत्व)###D3###40","","","62541ba48de7164ffffc551c###40","success"
"Personal Leadership (व्यक्ति नेतृत्व)###D4###40","","","62541ba48de7164ffffc551d###40","success"
"Personal Leadership (व्यक्ति नेतृत्व)###D4###40","","","62541ba48de7164ffffc551e###40","success"
"Personal Leadership (व्यक्ति नेतृत्व)###D4###40","","","62541ba48de7164ffffc551f###40","success"

Files

Generates a pre-signed url for file upload

This API provides a pre-signed URL that allows users to upload files directly to storage. Once the file is uploaded, the API also returns a downloadable URL, which can be used to directly access the uploaded file.

header Parameters
x-auth-token
string
Example: {{token}}

Every request to the API requires an x-auth-token in the header for authentication. This token is generated when a user logs in and must be included in each subsequent request to verify the user’s session and permissions.

Request Body schema: application/json
string

Responses

Request samples

Content type
application/json
{
  • "request": {
    },
  • "ref": "survey"
}

Response samples

Content type
application/json
{}

Returns downloadable URL for the files

This API is used to retrieve a downloadable URL for a file that has already been uploaded to the cloud. By providing the necessary file information, the API returns a secure URL that can be used to download the file directly. This API is particularly useful for accessing files stored in cloud storage after an upload process is complete.

Request Body schema: application/json
string

Responses

Request samples

Content type
application/json
{
  • "filePaths": [
    ]
}

Response samples