Skip to main content
Version: v5.1

Permissions

Create or Update Permissions

This API call allows you to create or update permissions for platform resources in the AI Service, such as a Agent, Tool, Team and KnowledgeBase. The resources are specified using IRNs.

Valid resource types

  • agent
  • tool
  • team
  • conversation
  • knowledgebase

Endpoints

PUT /aisvc/api/v1/permissions

Parameters

Body

ParameterTypeDescriptionRequired
_resourceDesc._irnStringThe resource IRN, which consists of the following: <service>:<resource type>:<resource ID>, such as aisvc:agent:e46fe1ea-0b64-45e5-aa0c-48ff51ac20d1. You can also pass a pattern, such as aisvc:agent:*. For more information on IRN patterns, see Look up permissions by IRN pattern.Required
_namespaceStringThe namespace to which the resource belongs.Required
_user._typeStringThe permission user type, such as "user", "usergroup", or "permprofile".Required
_user._idStringThe permission user ID.Required
_actionsArray of StringThe actions that the user is authorized to perform on the resource, such as "READ", "CREATE", "EDIT", "DELETE", "SHARE" or "*" to permit all actions.Required
Body example
[
{
"_actions": [
"READ"
],
"_namespace": "r_TmBKvZTI",
"_resourceDesc": {
"_irn": "aisvc:agent:e46fe1ea-0b64-45e5-aa0c-48ff51ac20d1"
},
"_user": {
"_type": "user",
"_id": "1f159053-657b-40f4-9897-434f9e2df8be"
}
}
]

Response

Response codes

CodeDescription
200Success
400Bad Request

Response

{
"_success": [
{
"_actions": [
"READ"
],
"_namespace": "r_TmBKvZTI",
"_resourceDesc": {
"_irn": "aisvc:agent:e46fe1ea-0b64-45e5-aa0c-48ff51ac20d1"
},
"_user": {
"_type": "user",
"_id": "ab38424d-69b2-4353-812e-78faac6ebd7a"
},
"_id": "1f159053-657b-40f4-9897-434f9e2df8be",
"_status": 200
}
],
"_failures": []
}

Get Permissions

This API call allows you to read permissions for platform resources in the AI Service, such as a Agent. The resources are specified using IRNs.

Endpoints

GET /aisvc/api/v1/permissions

Request

Query parameters

ParameterTypeDescriptionRequired
_namespaceStringThe namespace where the permission is definedRequired
_resourceDesc._irnStringThe resource IRN, which consists of the following: <service>:<resource type>:<resource ID>, such as aisvc:agent:7aba5391-67f8-4e5c-88eb-7057c639603e. You can also pass a pattern, such as aisvc:agent:*. For more information on IRN patterns, see Look up permissions by IRN pattern.Required
_namespaceStringThe namespace that the resource belongs toRequired
_user._typeStringThe permission user type, such as "user", "usergroup", or "permprofile".Required
_user._idStringThe permission user id.Optional
_actionsArray of StringThe actions the user is authorized to perform on the resource, such as "READ", "CREATE", "EDIT", "DELETE", "SHARE" or "*" for all actions.Required

Response

Response codes

CodeDescription
200Success
400Bad Request

Response data example

{
"_pageSize": 1,
"_list": [
{
"_resourceDesc": {
"_criteria": {
"_userType": "iput_cde_admin"
},
"_irn": "aisvc:agent:*"
},
"_actions": [
"READ"
],
"_namespace": "r_TmBKvZTI",
"_user": {
"_type": "user",
"_id": "1f159053-657b-40f4-9897-434f9e2df8be"
},
"_id": "d12dd717-6678-46e9-941d-f936d3debada",
"_status": 200
}
],
"_offset": 0,
"_total": 1,
"_includeTotal": true
}

Delete Permission by ID

Endpoints

DELETE /aisvc/api/v1/permissions/{id}

Request

Path parameters

ParameterTypeDescriptionRequired
idStringPass the Permission's _id value.Required

Response

Response codes

CodeDescription
204No Content
404File Not Found

Response data

None