Entity-Management-Service (1.0.0)

Download OpenAPI specification:Download

  • This Service enables the creation and management of various entities and entityType .It provides functionalities for entities, ensuring seamless integration and maintenance of entity-related data across the platform.

userRoleExtension-API's

To create a single user role extension data

You can use this API to to create user role extension data. /v1/userRoleExtension/create

  • It is mandatory to provide values for parameters marked with required
  • Mandatory parameter cannot be empty or null
header Parameters
X-auth-token
string

You require an X-auth-token to use this API. This token is available in the login API Response.

Request Body schema: application/json
userRoleId
string
title
string
userType
number
Array of objects
code
string

Responses

Request samples

Content type
application/json
{
  • "userRoleId": "13",
  • "title": "State Level Campaign Coordinator",
  • "userType": 1,
  • "entityTypes": [
    ],
  • "code": "state_level_campaign_coordinator"
}

Response samples

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

To update a single user role extension data

You can use this API to update user role extension data by passing id in the path param. /v1/userRoleExtension/update/{_id}

  • It is mandatory to provide values for parameters marked with required
  • Mandatory parameter cannot be empty or null
header Parameters
X-auth-token
string

You require an X-auth-token to use this API. This token is available in the login API Response.

Request Body schema: application/json
title
string

Responses

Request samples

Content type
application/json
{
  • "title": "DM"
}

Response samples

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

Find the user role extension data.

Use this API to get the details of user role extension data based on the request body passed. /v1/userRoleExtension/find

  • It is mandatory to provide values for parameters marked with required
  • Mandatory parameter cannot be empty or null
header Parameters
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
Request Body schema: application/json
object
projection
Array of strings

Responses

Request samples

Content type
application/json
{
  • "query": {
    },
  • "projection": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "ASSETS_FETCHED_SUCCESSFULLY",
  • "status": 200,
  • "result": [
    ]
}

Delete user role extension data.

Use this API to delete user role extension data by passing it's id. /v1/userRoleExtension/delete

  • It is mandatory to provide values for parameters marked with required
  • Mandatory parameter cannot be empty or null
header Parameters
X-auth-token
required
string

You require an X-auth-token to use this API. This token is available in the login API Response.

Responses

Response samples

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

entityType-API's

BulkCreate create entity type

This api is use to create entity types in bulk by passing a csv file which contain entity type information

  • The API Endpoint for creating entity types in bulk by passing a csv file which contain entity type information is /v1/entityType/bulkCreate
  • It is mandatory to provide values for parameters which are marked as required
  • This is a mandatory parameter and cannot be empty or null.
header Parameters
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
Request Body schema: multipart/form-data
file
string <binary>

The CSV file to upload

Responses

Response samples

Content type
text
"name",
"registry-name",
"isObservable",
"toBeMappedToParentEntities",
"immediateChildrenEntityType",
"registryDetails",
"_SYSTEM_ID",
"status"
"blockkks",
"locationRegistry",
true,
true,
"[""school""]",
"{""name"":""locationRegistry""}",
"6679320261add28f7f681294",
"SUCCESS"

BulkUpdate create entityType

You can use this API to update entityType by passing CSV file.

  • The API Endpoint for updating entityType by passing CSV file is /v1/entityTypes/bulkUpdate
  • It is mandatory to provide values for parameters which are marked as required
  • This is a mandatory parameter and cannot be empty or null.
header Parameters
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
Request Body schema: multipart/form-data
file
string <binary>

The CSV file to upload

Responses

Response samples

Content type
text
"name",
"registryname",
"isObservable",
"toBeMappedToParentEntities",
"immediateChildrenEntityType",
"_SYSTEM_ID",
"status"
"ghj",
"locationRegistry",
true,
true,
"[""[\""school\"""",
"" “high School”
]""
]","6679320261add28f7f681294","SUCCESS"

This api will create's Single entity Type data

You can use this API to create a single entityType data.

  • The API Endpoint to create a single entityType data is /v1/entityTypes/create
  • It is mandatory to provide values for parameters which are marked as required
  • This is a mandatory parameter and cannot be empty or null.
header Parameters
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
Request Body schema: application.json
name
string
object
isObservable
boolean
toBeMappedToParentEntities
boolean

Responses

Request samples

Content type
application.json
{
  • "name": "state",
  • "registryDetails": {
    },
  • "isObservable": true,
  • "toBeMappedToParentEntities": true
}

Response samples

Content type
application.json
{
  • "message": "ENTITY_INFORMATION_CREATED",
  • "status": 200,
  • "result": {
    }
}

Update single entities based on the entityType id

You can use this API to update single entities based on the entityType id .

  • The API Endpoint to update single entities based on the entityType id is /v1/entityTypes/update/{_id}
  • It is mandatory to provide values for parameters which are marked as required
  • This is a mandatory parameter and cannot be empty or null.
path Parameters
string
query Parameters
_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.

header Parameters
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
Request Body schema: application.json
name
string
object
isObservable
boolean
toBeMappedToParentEntities
boolean
immediateChildrenEntityType
string

Responses

Request samples

Content type
application.json
{
  • "name": "school",
  • "registryDetails": {
    },
  • "isObservable": true,
  • "toBeMappedToParentEntities": true,
  • "immediateChildrenEntityType": "collage"
}

Response samples

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

This API can be used to list all entity types

Use this API to list all entityTypes

  • The API Endpoint to fetch all the list in entityType. /v1/entityTypes/list
  • It is mandatory to provide values for parameters which are marked as required
  • This is a mandatory parameter and cannot be empty or null.
header Parameters
X-auth-token
required
string

To use this API, you require an X-auth-token, which is available in the login API response.

Responses

Response samples

Content type
application.json
{
  • "message": "ENTITY_TYPES_FETCHED",
  • "status": 200,
  • "result": [
    ]
}

Find the entityTypes

Use this API to get the details of entityType data based on the request body passed.

  • The API Endpoint for reading the details of the entity type is /v1/entityTypes/find
  • It is mandatory to provide values for parameters which are marked as required
  • This is a mandatory parameter and cannot be empty or null.
header Parameters
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
Request Body schema: application/json
object
object
object

Responses

Request samples

Content type
application/json
{
  • "query": {
    },
  • "projection": {
    },
  • "skipFields": {
    }
}

Response samples

Content type
application.json
{
  • "message": "ENTITY_TYPES_FETCHED",
  • "status": 200,
  • "result": [
    ]
}

entities-API's

Bulk creation of entities

You can use this API to create bulk create entities based on type and CSV file we pass.

  • The API Endpoint for creating bulk entities based on type and CSV file we pass. /v1/entities/bulkCreate
  • It is mandatory to provide values for parameters which are marked as required
  • This is a mandatory parameter and cannot be empty or null
query Parameters
type
required
string

Please pass entity type value for the entity.

header Parameters
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
Request Body schema: multipart/form-data
file
string <binary>

The CSV file to upload

Responses

Response samples

Content type
text
"Staff_id",
"externalId",
"name",
"region",
"capital",
"_arrayFields",
"_existingKeyField",
"_SYSTEM_ID"
"",
"PBS",
"Punjab",
"North east",
"Chandigarh",
"",
"externalId",
"6679336f61add28f7f681298"

Bulk updates of entities

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.

  • The API Endpoint for updating entities by passing csv file /v1/entities/bulkUpdate
  • It is mandatory to provide values for parameters marked with required
  • Mandatory parameter cannot be empty or null
header Parameters
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
Request Body schema: multipart/form-data
file
string <binary>

The CSV file to upload

Responses

Response samples

Content type
text
"externalId",
"name",
"region",
"capital",
"_arrayFields",
"_existingKeyField",
"_SYSTEM_ID",
"UPDATE_STATUS"
"entity506",
"bijapur",
"North east",
"Chandigarh",
"",
"externalId",
"6679336f61add28f7f681298",
"SUCCESS"

Add single entities

The API is used to create single entities based on entityType

  • The API Endpoint to create single entities creation based on type /v1/entities/add
  • It is mandatory to provide values for parameters marked with required
  • Mandatory parameter cannot be empty or null.
path Parameters
type
required
string
Example: 1

Please pass entity type value for the entity.

header Parameters
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
Request Body schema: application/json
externalId
string
entityType
string
childHierarchyPath
Array of strings
allowedRoles
Array of strings

Responses

Request samples

Content type
application/json
{
  • "externalId": "entity123",
  • "childHierarchyPath": [
    ],
  • "allowedRoles": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "ENTITY_ADDED",
  • "status": 200,
  • "result": [
    ]
}

Provide details of an entity based on the entity id. This API returns the details of a single entity at a time.

You can use this API to get details based on entity id.

  • The API to get details of an entities based on entity id: /v1/entities/details
  • It is mandatory to provide values for parameters marked with required
  • Mandatory parameter cannot be empty or null.
path Parameters
_id
required
string
Example: 1

Please append a valid entity id to the Request URL.

Responses

Response samples

Content type
application/json
{
  • "message": "ENTITY_INFORMATION_FETCHED",
  • "status": 200,
  • "result": [
    ]
}

Update an entity

You can use this API to update the entity data based on entiy id.

  • The API Endpoint to update single entities : /v1/entities/update/{_id}
  • It is mandatory to provide values for parameters marked with required
  • Mandatory parameter cannot be empty or null.
path Parameters
_id
required
string
Example: 1

Please append a valid entities Id to the Request URL.

header Parameters
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
Request Body schema: application/json
metaInformation.externalId
string
metaInformation.name
string
childHierarchyPath
Array of strings
createdBy
string
updatedBy
string

Responses

Request samples

Content type
application/json
{
  • "metaInformation.externalId": "SCH",
  • "metaInformation.name": "school",
  • "childHierarchyPath": [ ],
  • "createdBy": "user123",
  • "updatedBy": "user123"
}

Response samples

Content type
application.json
{
  • "message": "ENTITY_UPDATATED",
  • "status": 200,
  • "result": {
    }
}

This endpoint will map its childEntity to its parentEntity

You can use this API to map the childEntity to parentEntity

  • The API Endpoint will map its childEntity to its parentEntity /v1/entities/mappingUpload
  • It is mandatory to provide values for parameters marked with required
  • Mandatory parameter cannot be empty or null.
header Parameters
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
Request Body schema: multipart/form-data
file
string <binary>

The CSV file to upload

Responses

Response samples

Content type
application.json
{
  • "message": "ENTITY_INFORMATION_UPDATE",
  • "status": 200,
  • "result": {
    }
}

You can use this API to list entity based on id.

You can use this API to list entities based on its type

  • The API Endpoint to list entities based on its type: v1/entities/listByEntityType/_id
  • It is mandatory to provide values for parameters marked with required
  • Mandatory parameter cannot be empty or null.
path Parameters
_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

header Parameters
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

Responses

Response samples

Content type
application/json
{
  • "message": "ASSETS_FETCHED_SUCCESSFULLY",
  • "status": 200,
  • "result": [
    ]
}

Find the entities based on queries

You can use this API to find entities based on query.

  • The API Endpoint for finding entities based on query: /v1/entities/find
  • It is mandatory to provide values for parameters marked with required
  • Mandatory parameter cannot be empty or null.
header Parameters
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
Request Body schema: application.json
object
projection
Array of strings

Responses

Request samples

Content type
application.json
{
  • "query": {
    },
  • "projection": [
    ]
}

Response samples

Content type
application.json
{
  • "message": "ASSETS_FETCHED_SUCCESSFULLY",
  • "status": 200,
  • "result": [
    ]
}

List entities based on entity id

You can use this API to list the entities based on entity id and entity Type

  • The API Endpoint for listing the entities based on entity id and entity Type: /v1/entities/list
  • It is mandatory to provide values for parameters marked with required
  • Mandatory parameter cannot be empty or null.
path Parameters
_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

header Parameters
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

Responses

Response samples

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

Get related entities based on entity id

You can use this API to get the realted entities data based on entity id

  • The API Endpoint to get the related entities data based on entity id: /v1/entities/relatedEntities
  • It is mandatory to provide values for parameters marked with required
  • Mandatory parameter cannot be empty or null.
path Parameters
_id
required
string
Example: 1

Please append a valid entity Id to the Request URL.

header Parameters
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

Responses

Response samples

Content type
application.json
{
  • "message": "ENTITY_FETCHED",
  • "status": 200,
  • "result": {
    }
}

List the entities based on location id

You can use this API to get entities based on locations Id

  • Endpoint to get entities based on locations Id /v1/entities/listByLocationIds
  • It is mandatory to provide values for parameters marked with required
  • Mandatory parameter cannot be empty or null
header Parameters
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
Request Body schema: application/json
locationIds
Array of strings

Responses

Request samples

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

Response samples

Content type
application.json
{
  • "message": "ENTITY_FETCHED",
  • "status": 200,
  • "result": [
    ]
}

List all the entities based on location id

You can use this API to list entity based on location id *Endpoint to list entity based on location id /v1/entities/subEntityListBasedOnRoleAndLocation

  • It is mandatory to provide values for parameters marked with required
  • Mandatory parameter cannot be empty or null
path Parameters
_id
required
string
Example: 1

Please append a valid entity Id To the Request URL

header Parameters
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

Responses

Response samples

Content type
application.json
{
  • "message": "ENTITIES_CHILD_HIERACHY_PATH",
  • "status": 200,
  • "result": [
    ]
}

Will provide the sub entity based on types

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

  • Mandatory parameter cannot be empty or null
path Parameters
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

header Parameters
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

Responses

Response samples

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

List the entities based on entity id

This API will help to list the entities based on entity id

  • The API Endpoint to list the entities based on entity id /v1/entities/listByIds
  • It is mandatory to provide values for parameters marked with required
  • Mandatory parameter cannot be empty or null
header Parameters
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
Request Body schema: application/json
entities
Array of strings
fields
Array of strings

Responses

Request samples

Content type
application/json
{
  • "entities": [
    ],
  • "fields": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "ENTITIES_FETCHED",
  • "status": 200,
  • "result": [
    ]
}

List all the entities based on entity type.

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}

  • It is mandatory to provide values for parameters marked with required
  • Mandatory parameter cannot be empty or null
path Parameters
entityType
required
string
Example: 1

Please pass entity type value for the entity.

header Parameters
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

Responses

Response samples

Content type
application.json
{
  • "message": "ASSETS_FETCHED_SUCCESSFULLY",
  • "status": 200,
  • "result": [
    ]
}

Fetch Targeted Roles

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}

  • It is mandatory to provide values for parameters marked with required
  • Mandatory parameter cannot be empty or null
path Parameters
entity_id
required
string

Please append a valid entity Id to the Request URL.

header Parameters
X-auth-token
string

You require an X-auth-token to use this API. This token is available in the login API Response.

Responses

Response samples

Content type
application.json
{
  • "message": "ROLES_FETCHED_SUCCESSFULLY",
  • "status": 200,
  • "result": {
    }
}