Skip to content

Permission Entity APIs

Get Permission Entities

This API lists all the permission entities associated with a connector.

Method GET
Endpoint <host_url>/api/public/bot/:botId/connector/:connectorId/permission-entities
Content-Type application/json
Authorization auth: <JWT Token>
API Scope Permission Entity Management

Query Parameters

Parameters Description Mandatory
Bot ID Provide your application ID here. Yes
Connector ID Unique ID of the connector for which permission entities are requested. Yes
Skip No of records to skip from the beginning of the response No
Limit Maximum number of records to return in the response No

Response Parameters

Parameters Description
Entity Id Unique identifier of the field used to create Permission entity.
name Name of the entity field as in the source.
meta Meta information about the entity.
userIds Array of users associated with the permission entity
sourceType Source of the entity. This field indicates the content source for which the permission entity was created. For instance, if the given permission entity corresponds to a google user group, the value of the field would be googleDrive.
type Type of entity. This field indicates the type of user permission to which the permission entity corresponds. For instance, if the permission entity corresponds to the user criteria in ServiceNow, the value of the field would be userCriteria.

Sample Response

[
    {
        "_id": "fpe-82e99097-7532-506b-af42-363cbe5bb59c",
        "entityId": "SearchAssist-qa@kore.com",
        "meta": {},
        "name": "SearchAssist-qa",
        "userIds": [],
        "sourceType": "googleDrive",
        "type": "googleGroup"
    },
    {
        "_id": "fpe-5963cdfb-8401-5b90-8115-4c7624057733",
        "entityId": "2ftst48234234jf-ef",
        "meta": {},
        "name": "searchassist dev",
        "userIds": [],
        "sourceType": "serviceNow",
        "type": "usercriteria"
    }
]

Get Permission Entity by ID

This API returns the details of the request permission entity. It lists the users associated with the permission entity.

Method GET
Endpoint <host_url>/api/public/bot/:botId/connector/:connectorId/permission-entities/:entityId
Content-Type application/json
Authorization auth: <JWT Token>
API Scope Permission Entity Management

Query Parameters

Parameters Description Mandatory
Bot ID Provide your application ID here. Yes
Connector ID Unique ID of the connector for which permission entities are requested. Yes
Entity Id Unique Id of the Permission Entity Yes

Sample Response

{
    "_id": "fpe-82e99097-7532-506b-af42-363cbe5bb59c",
    "entityId": "SearchAssist-qa@kore.com",
    "meta": {},
    "name": "SearchAssist-qa",
    "userIds": [],
    "sourceType": "googleDrive",
    "type": "googleGroup"
}

Update Permission Entity by ID

This API is used to associate users to a Permission Entity. You can add new users to the entity using this API.

Method PUT
Endpoint <host_url>/api/public/bot/:botId/connector/:connectorId/permission-entities/:entityId
Content-Type application/json
Authorization auth: <JWT Token>
API Scope Permission Entity Management

Query Parameters

Parameters Description Mandatory
Stream ID Provide your application ID here. Yes
Connector ID Unique ID of the connector for which permission entities is to be updated. Yes
Entity Id Unique Id of the Permission Entity Yes

Sample Request Body

To associate a user with a permission entity, use the following as the request body.

{
"userList":["john@kore.com"]
}

Delete Users from Permission Entity by ID

This API removes a user already associated with the permission entity.

Method DELETE
Endpoint <host_url>/api/public/bot/:botId/connector/:connectorId/permission-entities/:entityId
Content-Type application/json
Authorization auth: <JWT Token>
API Scope Permission Entity Management

Query Parameters

Parameters Description Mandatory
Stream ID Provide your application ID here. Yes
Connector ID Unique ID of the connector for which permission entities is to be updated. Yes
Entity Id Unique ID of the Permission Entity Yes

Sample Request Body

To delete a user from a permission entity, use the following as the request body.

{
    "userList":["john@kore.com"]
}