Skip to main content
Version: v5.2

Permissions

The Permissions API call allows you to:

Create or Update Permissions

Endpoints

PUT /objectmodelsvc/api/v1/permissions

Request

Body parameters

ParameterTypeDescriptionRequired
_resourceDesc._irnStringEnter the resource's path. For the resource path, concetenate the service name, resource type, and resource's id with colons, for example, filesvc:file:6336c490017d84b0a506e453 for a file, or filesvc:file:* for all files in the file service.Required
_namespaceStringPass a namespaces for the permission's context.Required
_user._typeStringThe type of the permission user, such as "user", "usergroup" or "permprofile".Required
_user._idStringThe permission user's id.Required
_actionsStringThe actions the user is authorized to perform on the resource, such as "READ", "CREATE", "DELETE", "SHARE" or "*" for all actions.Required
Body example
[
{
"_actions": [
"*"
],
"_namespace": "NextScriptProj1_FL2gjKxa",
"_resourceDesc": {
"_irn": "objectmodelsvc:apiconfigdef:*"
},
"_user": {
"_type": "user",
"_id": "2cefaaec-b57c-4e21-826d-773480a1948e"
}
}
]

Response

Response codes

CodeDescription
200Success
400Bad Request
401Unauthorized
403Forbidden

Response data example

{
"_offset": 0,
"_list": {
"_success": [
{
"_namespace": "NextScriptProj1_FL2gjKxa",
"_user": {
"_id": "2cefaaec-b57c-4e21-826d-773480a1948e",
"_type": "user"
},
"_actions": [
"*"
],
"_status": 200,
"_id": "242a2fab-6ec6-4c2b-8aba-f32aede4cf6a",
"_resourceDesc": {
"_irn": "objectmodelsvc:apiconfigdef:*"
}
}
],
"_failures": []
}
}

Get Permissions

Endpoints

GET /objectmodelsvc/api/v1/permissions

Request

Query parameters

ParameterTypeDescriptionRequired
_namespaceStringThe namespace in which the permission is defined.Required
_resourceDesc._irnStringThe resource's path. For the resource path, concetenate the service name, resource type, and resource's id with colons, for example, filesvc:file:6336c490017d84b0a506e453 for a file, or filesvc:file:* for all files in the file service.Required
_user._idStringThe permission user's id.Required
_user._typeStringThe type of the permission user, such as "user", "usergroup" or "permprofile".Required
patternmatchStringSet to true to treat the irn as a pattern to match, otherwise, set to false.Required

Response

Response codes

CodeDescription
200Success
400Bad Request
401Unauthorized
403Forbidden

Response data example

{
"_offset": 0,
"_pageSize": 2,
"_total": 2,
"_list": [
{
"_namespace": "NextScriptProj1_FL2gjKxa",
"_user": {
"_id": "32995061-a7f9-47ad-b8b9-e2c4b81ee919",
"_type": "user"
},
"_actions": [
"*"
],
"_id": "0edf3adc-344a-4a59-82ec-408437a99672",
"_resourceDesc": {
"_irn": "*:*:*"
}
},
{
"_namespace": "NextScriptProj1_FL2gjKxa",
"_user": {
"_id": "cd87d40e-9621-408a-a2ac-f1b993c554b2",
"_type": "usergroup"
},
"_actions": [
"*"
],
"_id": "d939ea3c-231a-46a5-88f6-7f384cc30ef0",
"_resourceDesc": {
"_irn": "*:*:*"
}
}
]
}

Delete Permission by ID

Endpoints

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

Request

Path parameters

ParameterTypeDescriptionRequired
idStringPass the permission's id.Required

Response

Response codes

CodeDescription
204No Content
401Unauthorized
403Forbidden
404Not Found

Response

None