Download OpenAPI specification:Download
You can use this API to to create user role extension data. /v1/userRoleExtension/create
required
X-auth-token | string You require an X-auth-token to use this API. This token is available in the login API Response. |
userRoleId | string |
title | string |
userType | number |
Array of objects | |
code | string |
{- "userRoleId": "13",
- "title": "State Level Campaign Coordinator",
- "userType": 1,
- "entityTypes": [
- {
- "entityType": "district",
- "entityTypeId": "5f32d8228e0dc83104056e"
}
], - "code": "state_level_campaign_coordinator"
}
{- "message": "USER_ROLE_INFORMATION_CREATED",
- "status": 200,
- "result": {
- "status": "ACTIVE",
- "createdBy": "SYSTEM",
- "updatedBy": "SYSTEM",
- "_id": "66a9da8ab0f18a5b3f1c824f",
- "deleted": false,
- "userRoleId": 13,
- "title": "DC",
- "userType": 1,
- "entityTypes": [
- {
- "_id": "66a9da8ab0f18a5b3f1c8250",
- "entityType": "district",
- "entityTypeId": "5f32d8228e0dc8310056e"
}
], - "updatedAt": "2024-07-31T06:32:42.097Z",
- "createdAt": "2024-07-31T06:32:42.097Z",
- "__v": 0
}
}
You can use this API to update user role extension data by passing id in the path param. /v1/userRoleExtension/update/{_id}
required
X-auth-token | string You require an X-auth-token to use this API. This token is available in the login API Response. |
title | string |
{- "title": "DM"
}
{- "message": "USER_ROLE_UPDATATED",
- "status": 200,
- "result": {
- "status": "ACTIVE",
- "createdBy": "SYSTEM",
- "updatedBy": "SYSTEM",
- "deleted": false,
- "_id": "66a9da8ab0f18a5b3f1c824f",
- "userRoleId": 13,
- "title": "DM",
- "userType": 1,
- "entityTypes": [
- {
- "_id": "66a9da8ab0f18a5b3f1c8250",
- "entityType": "district",
- "entityTypeId": "5f32d8228e0dc8310056e"
}
], - "updatedAt": "2024-07-31T06:40:45.726Z",
- "createdAt": "2024-07-31T06:32:42.097Z",
- "__v": 0
}
}
Use this API to get the details of user role extension data based on the request body passed. /v1/userRoleExtension/find
required
X-auth-token | string You require an X-auth-token to use this API. This token is available in the login API Response. |
internal-access-token required | string |
object | |
projection | Array of strings |
{- "query": {
- "entityTypes.entityTypeId": {
- "$in": [
- "5f32d8228e0dc8312404056b",
- "5f32d8228e0dc8312404056c",
- "5f32d8228e0dc83124040567",
- "5f32d8228e0dc8312404056e"
]
}
}, - "projection": [
- "_id",
- "title"
]
}
{- "message": "ASSETS_FETCHED_SUCCESSFULLY",
- "status": 200,
- "result": [
- {
- "_id": "66a8df494efa6ccce9113da6",
- "title": "headmaster"
}, - {
- "_id": "66a8df824efa6ccce9113dac",
- "title": "BEO"
}, - {
- "_id": "66a8df654efa6ccce9113da9",
- "title": "AMO"
}, - {
- "_id": "66a8dfc44efa6ccce9113db5",
- "title": "EducationMinister"
}
]
}
Use this API to delete user role extension data by passing it's id. /v1/userRoleExtension/delete
required
X-auth-token required | string You require an X-auth-token to use this API. This token is available in the login API Response. |
{- "message": "USER_ROLE_DELETED",
- "status": 200
}
This api is use to create entity types in bulk by passing a csv file which contain entity type information
/v1/entityType/bulkCreate
required
X-auth-token required | string To use this API, you require an X-auth-token. This token is available in the login API Response. |
internal-access-token required | string |
file | string <binary> The CSV file to upload |
"name", "registry-name", "isObservable", "toBeMappedToParentEntities", "immediateChildrenEntityType", "registryDetails", "_SYSTEM_ID", "status" "blockkks", "locationRegistry", true, true, "[""school""]", "{""name"":""locationRegistry""}", "6679320261add28f7f681294", "SUCCESS"
You can use this API to update entityType by passing CSV file.
/v1/entityTypes/bulkUpdate
required
X-auth-token required | string To use this API, you require an X-auth-token. This token is available in the login API Response. |
internal-access-token required | string |
file | string <binary> The CSV file to upload |
"name", "registryname", "isObservable", "toBeMappedToParentEntities", "immediateChildrenEntityType", "_SYSTEM_ID", "status" "ghj", "locationRegistry", true, true, "[""[\""school\"""", "" “high School” ]"" ]","6679320261add28f7f681294","SUCCESS"
You can use this API to create a single entityType data.
/v1/entityTypes/create
required
X-auth-token required | string To use this API, you require an X-auth-token. This token is available in the login API Response. |
internal-access-token required | string |
name | string |
object | |
isObservable | boolean |
toBeMappedToParentEntities | boolean |
{- "name": "state",
- "registryDetails": {
- "name": "govt school"
}, - "isObservable": true,
- "toBeMappedToParentEntities": true
}
{- "message": "ENTITY_INFORMATION_CREATED",
- "status": 200,
- "result": {
- "name": "state",
- "isObservable": true,
- "toBeMappedToParentEntities": true,
- "status": "SUCCESS"
}
}
You can use this API to update single entities based on the entityType id .
/v1/entityTypes/update/{_id}
required
string |
_id required | string The unique identifier for the data that needs to be updated. This id ensures the correct record is matched for the update operation. |
X-auth-token required | string To use this API, you require an X-auth-token. This is available in the login API Response. |
internal-access-token required | string |
name | string |
object | |
isObservable | boolean |
toBeMappedToParentEntities | boolean |
immediateChildrenEntityType | string |
{- "name": "school",
- "registryDetails": {
- "name": "hub"
}, - "isObservable": true,
- "toBeMappedToParentEntities": true,
- "immediateChildrenEntityType": "collage"
}
{- "status": 200,
- "result": {
- "profileForm": [ ],
- "profileFields": [ ],
- "types": [ ],
- "callResponseTypes": [ ],
- "isObservable": true,
- "immediateChildrenEntityType": [
- "collage"
], - "createdBy": "SYSTEM",
- "updatedBy": "SYSTEM",
- "deleted": false,
- "_id": "662f7d733f9b670521cadcff",
- "isDeleted": false,
- "name": "school",
- "registryDetails": {
- "name": "hub"
}, - "toBeMappedToParentEntities": true,
- "updatedAt": "2024-04-30T12:37:26.775Z",
- "createdAt": "2024-04-29T10:58:59.862Z",
- "__v": 0
}
}
Use this API to list all entityTypes
/v1/entityTypes/list
required
X-auth-token required | string To use this API, you require an X-auth-token, which is available in the login API response. |
{- "message": "ENTITY_TYPES_FETCHED",
- "status": 200,
- "result": [
- {
- "_id": "661384681797bc00de520555",
- "name": "district"
}, - {
- "_id": "661387f572fad002e57cce8f",
- "name": "state"
}
]
}
Use this API to get the details of entityType data based on the request body passed.
/v1/entityTypes/find
required
X-auth-token required | string To use this API, you require an X-auth-token, which is available in the login API Response. |
internal-access-token required | string |
object | |
object | |
object |
{- "query": {
- "name": "school"
}, - "projection": {
- "_id": 1,
- "name": 1
}, - "skipFields": {
- "createdAt": 1
}
}
{- "message": "ENTITY_TYPES_FETCHED",
- "status": 200,
- "result": [
- {
- "_id": "662f7dafcf215405591ce3af",
- "name": "state"
}, - {
- "_id": "661387f572fad002e57cce8f",
- "name": "block"
}
]
}
You can use this API to create bulk create entities based on type and CSV file we pass.
/v1/entities/bulkCreate
required
type required | string Please pass entity type value for the entity. |
X-auth-token required | string To use this API, you require an X-auth-token. This token is available in the login API Response. |
internal-access-token required | string |
file | string <binary> The CSV file to upload |
"Staff_id", "externalId", "name", "region", "capital", "_arrayFields", "_existingKeyField", "_SYSTEM_ID" "", "PBS", "Punjab", "North east", "Chandigarh", "", "externalId", "6679336f61add28f7f681298"
You can use this API to update entities data based on the type and entity id we pass through CSV file that contain information to update.
/v1/entities/bulkUpdate
required
X-auth-token required | string You require an X-auth-token to use this API. This token is available in the login API Response. |
internal-access-token required | string |
content-type required | string |
file | string <binary> The CSV file to upload |
"externalId", "name", "region", "capital", "_arrayFields", "_existingKeyField", "_SYSTEM_ID", "UPDATE_STATUS" "entity506", "bijapur", "North east", "Chandigarh", "", "externalId", "6679336f61add28f7f681298", "SUCCESS"
The API is used to create single entities based on entityType
/v1/entities/add
required
type required | string Example: 1 Please pass entity type value for the entity. |
X-auth-token required | string You require an X-auth-token to use this API. This token is available in the login API Response. |
internal-access-token required | string |
externalId | string |
entityType | string |
childHierarchyPath | Array of strings |
allowedRoles | Array of strings |
{- "externalId": "entity123",
- "childHierarchyPath": [
- "district",
- "beat",
- "cluster",
- "school",
- "block"
], - "allowedRoles": [
- "role1",
- "role2"
]
}
{- "message": "ENTITY_ADDED",
- "status": 200,
- "result": [
- {
- "childHierarchyPath": [
- "district",
- "beat",
- "cluster",
- "school",
- "block"
], - "allowedRoles": [ ],
- "createdBy": "SYSTEM",
- "updatedBy": "SYSTEM",
- "_id": "6634b0767411a605fdbaca71",
- "deleted": false,
- "entityTypeId": "5f32d8228e0dc83124040567",
- "entityType": "school",
- "registryDetails": {
- "locationId": "entity123",
- "code": "entity123"
}, - "metaInformation": {
- "externalId": "entity123"
}, - "updatedAt": "2024-05-03T09:37:58.425Z",
- "createdAt": "2024-05-03T09:37:58.425Z",
- "__v": 0
}
]
}
You can use this API to get details based on entity id.
/v1/entities/details
required
_id required | string Example: 1 Please append a valid entity id to the Request URL. |
{- "message": "ENTITY_INFORMATION_FETCHED",
- "status": 200,
- "result": [
- {
- "_id": "662f856a4b41910591c2fde9",
- "childHierarchyPath": [ ],
- "allowedRoles": [
- "role1",
- "role2"
], - "createdBy": "user123",
- "updatedBy": "user123",
- "deleted": false,
- "entityTypeId": "627a13928ce12806f5803f57",
- "entityType": "block",
- "metaInformation": {
- "externalId": "entity123"
}, - "updatedAt": "2024-04-30T13:16:23.597Z",
- "createdAt": "2024-04-29T11:32:58.439Z",
- "__v": 0
}
]
}
You can use this API to update the entity data based on entiy id.
/v1/entities/update/{_id}
required
_id required | string Example: 1 Please append a valid entities Id to the Request URL. |
X-auth-token required | string You require an X-auth-token to use this API., which is available in the login API Response. |
internal-access-token required | string |
metaInformation.externalId | string |
metaInformation.name | string |
childHierarchyPath | Array of strings |
createdBy | string |
updatedBy | string |
{- "metaInformation.externalId": "SCH",
- "metaInformation.name": "school",
- "childHierarchyPath": [ ],
- "createdBy": "user123",
- "updatedBy": "user123"
}
{- "message": "ENTITY_UPDATATED",
- "status": 200,
- "result": {
- "metaInformation": {
- "externalId": "SCH",
- "name": "school"
}, - "registryDetails": {
- "locationId": "rajAPSTATEDummy4",
- "code": "rajAPSTATEDummy4"
}, - "childHierarchyPath": [ ],
- "allowedRoles": [ ],
- "createdBy": "user123",
- "updatedBy": "user123",
- "deleted": false,
- "_id": "66ea64fa68cd063346a10365",
- "entityTypeId": "6672ce0fc05aa58f89ba12f1",
- "entityType": "state",
- "updatedAt": "2024-09-18T10:07:39.407Z",
- "createdAt": "2024-09-18T05:28:26.148Z",
- "__v": 0
}
}
You can use this API to map the childEntity to parentEntity
/v1/entities/mappingUpload
required
X-auth-token required | string You require an X-auth-token to use this API. This token is available in the login API Response. |
internal-access-token required | any |
file | string <binary> The CSV file to upload |
{- "message": "ENTITY_INFORMATION_UPDATE",
- "status": 200,
- "result": {
- "success": true,
- "message": "ENTITY_INFORMATION_UPDATE"
}
}
You can use this API to list entities based on its type
v1/entities/listByEntityType/_id
required
_id required | string Example: 1 Please append a valid entity id to the Request URL. |
page | number Example: 1 Please append number for pagination. |
limit | number Example: 2 number of record to limit |
X-auth-token required | string You require an X-auth-token to use this API. This token is available in the login API Response. |
internal-access-token required | any |
{- "message": "ASSETS_FETCHED_SUCCESSFULLY",
- "status": 200,
- "result": [
- {
- "externalId": "PBS",
- "name": "Punjab",
- "locationId": "",
- "_id": "6613b8142c7d9408449474bf"
}, - {
- "externalId": "PBS",
- "name": "Punjab",
- "locationId": "",
- "_id": "6613b8f32c7d9408449474c2"
}
]
}
You can use this API to find entities based on query.
/v1/entities/find
required
X-auth-token required | string You require an X-auth-token to use this API. This token is available in the login API Response. |
internal-access-token required | any |
object | |
projection | Array of strings |
{- "query": {
- "metaInformation.externalId": "rajAP"
}, - "projection": [
- "metaInformation.externalId",
- "metaInformation.name",
- "registryDetails.locationId"
]
}
{- "message": "ASSETS_FETCHED_SUCCESSFULLY",
- "status": 200,
- "result": [
- {
- "_id": "66e2b4bd7165395fcea49814",
- "registryDetails": {
- "locationId": "rajAP"
}, - "metaInformation": {
- "externalId": "rajAP",
- "name": "RAJANDHRA"
}
}
]
}
You can use this API to list the entities based on entity id and entity Type
/v1/entities/list
required
_id required | string Example: 1 Please append a valid entitie Id to the Request URL. |
page | any |
limit | any |
type required | any Please pass entity type value for the entity |
X-auth-token required | string You require an X-auth-token to use this API. This token is available in the login API Response. |
internal-access-token required | any |
{- "status": 200,
- "result": {
- "data": [
- {
- "_id": "627a13928ce12806f5803f57",
- "entityType": "school",
- "externalId": "entity123",
- "label": "undefined - entity123",
- "value": "627a13928ce12806f5803f57"
}
], - "count": 1
}
}
You can use this API to get entities based on locations Id
/v1/entities/listByLocationIds
required
X-auth-token required | string You require an X-auth-token to use this API. This token is available in the login API Response. |
internal-access-token | string |
locationIds | Array of strings |
{- "locationIds": [
- "entity44123"
]
}
{- "message": "ENTITY_FETCHED",
- "status": 200,
- "result": [
- {
- "_id": "5f33c3d85f637784791cd830",
- "entityTypeId": "5f32d8228e0dc8312404056e",
- "entityType": "state",
- "metaInformation": {
- "externalId": "MH",
- "name": "Maharashtra",
- "region": "West",
- "capital": "Mumbai"
}, - "registryDetails": {
- "locationId": "db331a8c-b9e2-45f8-b3c0-7ec1e826b6df",
- "code": "db331a8c-b9e2-45f8-b3c0-7ec1e826b6df"
}
}, - {
- "_id": "627a13928ce12806f5803f57",
- "entityTypeId": "5f32d8228e0dc8312404056e",
- "entityType": "block",
- "metaInformation": {
- "externalId": "MH",
- "name": "Maharashtra",
- "region": "West",
- "capital": "Mumbai"
}, - "registryDetails": {
- "locationId": "db331a8c-b9e2-45f8-b3c0-7ec1e826b6df",
- "code": "db331a8c-b9e2-45f8-b3c0-7ec1e826b6df"
}
}
]
}
You can use this API to list entity based on location id
*Endpoint to list entity based on location id /v1/entities/subEntityListBasedOnRoleAndLocation
required
_id required | string Example: 1 Please append a valid entity Id To the Request URL |
X-auth-token required | string You require an X-auth-token to use this API. This token is available in the login API Response. |
internal-access-token | string |
{- "message": "ENTITIES_CHILD_HIERACHY_PATH",
- "status": 200,
- "result": [
- {
- "_id": "5fd1b52ab53a6416aaeefb1f",
- "childHierarchyPath": [
- "school",
- "cluster"
]
}, - {
- "_id": "6153158e5bec1d28882358ab",
- "childHierarchyPath": [
- "school",
- "cluster",
- "state",
- "district",
- "beat",
- "block"
]
}
]
}
This API will help to get entities based on parent id and entity type we pass.
This API will help to get entities based on parent id and entity type we pass. * It is mandatory to provide values for parameters marked with required
page | number Example: 1 Please add page number |
limit | number Example: 2 number of record to limit |
type | string Please pass entity type value for the entity |
serach | string |
_id required | string Please append a valid entity id |
X-auth-token required | string You require an X-auth-token to use this API. This token is available in the login API Response. |
internal-access-token required | string |
{- "status": 200,
- "result": {
- "data": [
- {
- "_id": "627a13928ce12806f5803f57",
- "entityType": "school",
- "externalId": "entity123",
- "label": "undefined - entity123",
- "value": "627a13928ce12806f5803f57"
}
], - "count": 1
}
}
This API will help to list the entities based on entity id
/v1/entities/listByIds
required
X-auth-token required | string You require an X-auth-token to use this API. This token is available in the login API Response. |
internal-access-token | string |
entities | Array of strings |
fields | Array of strings |
{- "entities": [
- "66738b75c05aa58f89ba1300"
], - "fields": [
- "entityType"
]
}
{- "message": "ENTITIES_FETCHED",
- "status": 200,
- "result": [
- {
- "_id": "66738b75c05aa58f89ba1300",
- "entityType": "block"
}
]
}
You can use this API to list entity based on entity type
*Endpoint to list entity based on entity type /v1/entities/entityListBasedOnEntityType?entityType={entity_Type}
required
entityType required | string Example: 1 Please pass entity type value for the entity. |
X-auth-token required | string You require an X-auth-token to use this API. This token is available in the login API Response. |
internal-access-token | string |
{- "message": "ASSETS_FETCHED_SUCCESSFULLY",
- "status": 200,
- "result": [
- {
- "_id": "6682714d5fb8bc3e93ceae52",
- "name": "Mysore Rural"
}, - {
- "_id": "66827210a845ef3e891daf05",
- "name": "T Narasipura "
}, - {
- "_id": "668273665fb8bc3e93ceae65",
- "name": "North Chennai "
}, - {
- "_id": "668273bda845ef3e891daf15",
- "name": "South Chennai "
}, - {
- "_id": "668276d45fb8bc3e93ceaeaf",
- "name": "Bangalore East* "
}, - {
- "_id": "6682771aa845ef3e891db070",
- "name": "Bangalore South "
}
]
}
You can use this API to fetch targeted roles based on the provided entity id in the request parameters.
*Endpoint to fetch targeted roles based on the provided entity id /v1/entities/targetedRoles?{entity_id}
required
entity_id required | string Please append a valid entity Id to the Request URL. |
X-auth-token | string You require an X-auth-token to use this API. This token is available in the login API Response. |
{- "message": "ROLES_FETCHED_SUCCESSFULLY",
- "status": 200,
- "result": {
- "data": [
- {
- "id": 13,
- "title": "AMO",
- "user_type": 1,
- "visibility": "PUBLIC",
- "status": "ACTIVE",
- "organization_id": 1
}, - {
- "id": 15,
- "title": "TEACHER",
- "user_type": 1,
- "visibility": "PUBLIC",
- "status": "ACTIVE",
- "organization_id": 1
}, - {
- "id": 10,
- "title": "headmaster",
- "user_type": 1,
- "visibility": "PUBLIC",
- "status": "ACTIVE",
- "organization_id": 1
}, - {
- "id": 14,
- "title": "BEO",
- "user_type": 1,
- "visibility": "PUBLIC",
- "status": "ACTIVE",
- "organization_id": 1
}
], - "count": 4
}
}