Permissions
Create or Update Permissions
This API call allows you to create or update permissions for platform resources in the AI Service, such as Agent, Tool, Team, KnowledgeBase, MCP Tool, MCP Tool Filter, External MCP Server Config, and Prompt Template. The resources are specified using IRNs.
Valid resource types
agenttoolteamconversationknowledgebasemcptoolmcptoolfilterexternalmcpserverconfigprompttemplate
Endpoints
PUT /aisvc/api/v1/permissions
Parameters
Body
| Parameter | Type | Description | Required |
|---|---|---|---|
_resourceDesc._irn | String | The 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 |
_namespace | String | The namespace to which the resource belongs. | Required |
_user._type | String | The permission user type, such as "user", "usergroup", or "permprofile". | Required |
_user._id | String | The permission user ID. | Required |
_actions | Array of String | The 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
| Code | Description |
|---|---|
200 | Success |
400 | Bad 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
| Parameter | Type | Description | Required |
|---|---|---|---|
_namespace | String | The namespace where the permission is defined | Required |
_resourceDesc._irn | String | The 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 |
_namespace | String | The namespace that the resource belongs to | Required |
_user._type | String | The permission user type, such as "user", "usergroup", or "permprofile". | Required |
_user._id | String | The permission user id. | Optional |
_actions | Array of String | The 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
| Code | Description |
|---|---|
200 | Success |
400 | Bad 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
| Parameter | Type | Description | Required |
|---|---|---|---|
id | String | Pass the Permission's _id value. | Required |
Response
Response codes
| Code | Description |
|---|---|
204 | No Content |
404 | File Not Found |
Response data
None