User-Based Capabilities¶
Data Structures¶
Attribute |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Read-only, unique policy identifier. Protected. |
|
|
string |
yes |
Read-only; Immutable; Uniqueness is required in the combination of attribute |
|
string |
yes |
Read-only; Immutable; Uniqueness is required in the combination of attribute |
|
string-array; readwrite; default value |
yes |
Expensive to use. |
|
string |
yes |
Expensive to use. |
|
string |
yes |
Expensive to use. |
|
datetime |
Read-only. Timestamp of creation. |
|
|
datetime |
Read-only. Timestamp of modification. |
|
|
boolean |
Read-only. |
|
|
boolean |
Read-only; expensive to use. Is object built-in? Built-in objects shouldn’t be editable. |
|
|
boolean |
Read-only; expensive to use. Shall the object be hidden in UI? |
Retrieve Available Attributes of the UserCapabilityModels¶
Request
Method |
|
Paths |
|
To check allowed methods, available URL parameters and possible responses please refer to the API Overview section.
Get User-Based Capabilities for Objects¶
Request
Method |
|
Paths |
|
Example Request
GET /api/v2/capability/user/account
curl -s -k -X GET \
-H 'Authorization: <token>' \
'https://10.31.135.179/api/v2/capability/user/account'
Response
{
"result": "success",
"user_account_capability": [
{
"subject_id": "9115285645797883905",
"object_id": "9115285645797883907",
"rights": [
"read",
"modify",
"delete",
"block"
],
"object_name": "ad-user1-windows",
"subject_name": "admin",
"created_at": "2025-04-25 01:40:45.013273-07",
"modified_at": "2025-04-25 01:40:45.013273-07"
},
{
"subject_id": "9115285645797883905",
"object_id": "9115285645797883908",
"rights": [
"read",
"modify",
"delete",
"block"
],
"object_name": "jools-Linux",
"subject_name": "admin",
"created_at": "2025-04-25 01:40:45.965614-07",
"modified_at": "2025-04-25 01:40:45.965614-07"
}
]
}
Add User-Based Capabilities for Objects¶
Request
Method |
|
Paths |
|
Headers |
|
Body |
|
Example Request
POST /api/v2/capability/user/account
curl -s -k -X POST -H \
'Authorization:<token>' \
-H 'Content-Type: application/json' \
'https://10.31.135.179/api/v2/capability/user/account' \
-d'{"subject_id":9115285645797883906,"object_id":9115285645797883907}'
Response
{
"result": "success"
}
Get Rights Assigned to a User (Subject) for an Object by Their IDs¶
Request
Method |
|
Paths |
|
Example Request
GET /api/v2/capability/user/<subject_id>/account/<object_id>
curl -s -k -X GET \
-H 'Authorization:<token>' \
'https://10.31.135.179/api/v2/capability/user/9115285645797883906/account/9115285645797883907'
Response
{
"result": "success",
"user_account_capability": {
"subject_id": "9115285645797883906",
"object_id": "9115285645797883907",
"rights": [
"read"
],
"object_name": "ad-user1-windows",
"subject_name": "User_1",
"created_at": "2025-04-30 05:50:08.533293-07",
"modified_at": "2025-04-30 05:50:08.533293-07"
}
}
Modify Rights Assigned to a User (Subject) for an Object by Their IDs¶
Request
Method |
|
Paths |
|
Headers |
|
Body |
|
Example Request
PATCH /api/v2/capability/user/<subject_id>/account/<object_id>
curl -s -k -X PATCH \
-H 'Authorization:<token>' \
-H 'Content-Type: application/json' \
'https://10.31.135.179/api/v2/capability/user/9115285645797883906/account/9115285645797883907' \
-d'{"rights":["read","modify","delete"]}'
Note
The read right is mandatory and must always be included.
Response
{
"result": "success"
}
Grant Specific Rights to a User (Subject) for an Object by Their IDs¶
Request
Method |
|
Paths |
|
Headers |
|
Body |
|
Example Request
PATCH /api/v2/capability/user/<subject_id>/account/<object_id>/grant
curl -s -k -X PATCH \
-H 'Authorization:<token>' \
-H 'Content-Type: application/json' \
'https://10.31.135.179/api/v2/capability/user/9115285645797883906/account/9115285645797883907/grant' \
-d'{"rights":["modify","delete"]}'
Response
{
"result": "success"
}
Revoke Specific Rights to a User (Subject) for an Object by Their IDs¶
Request
Method |
|
Paths |
|
Headers |
|
Body |
|
Example Request
PATCH /api/v2/capability/user/<subject_id>/account/<object_id>/revoke
curl -s -k -X PATCH \
-H 'Authorization:<token>' \
-H 'Content-Type: application/json' \
'https://10.31.135.179/api/v2/capability/user/9115285645797883906/account/9115285645797883907/revoke' \
-d'{"rights":["modify","delete"]}'
Response
{
"result": "success"
}
Delete User-Based Capability Assigned to a ser (Subject) for an Object by Their IDs¶
Request
Method |
|
Paths |
|
Example Request
DELETE /api/v2/capability/user/<subject_id>/account/<object_id>
curl -s -k -X DELETE \
-H 'Authorization:<token>' \
'https://10.31.135.179/api/v2/capability/user/9115285645797883906/account/9115285645797883907'
Response
{
"result": "success"
}