SenseCrypt Docs
API ReferenceAdmin Roles

Set Role Permissions

PUT/v1/admin/roles/{role_id}/permissions

Replace the full set of permissions on a role. Every permission_id must be a live permission in the caller's tenant; any mismatch yields 422 with the offenders. Reconciled as a diff so unchanged rows aren't churned.

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

role_id*Role Id
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Replace the full set of permissions on a role (the editor sends the complete set on save).

Response Body

application/json

application/json

curl -X PUT "https://example.com/v1/admin/roles/497f6eca-6276-4993-bfeb-53cbbbba6f08/permissions" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "description": "string",  "permission_count": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "permissions": [    {      "permission_id": "2793a5a1-5444-40bb-8094-97de834ce9e4",      "value": "string",      "description": "string",      "resource_server_id": "0583ccd6-75d4-420d-8f26-2f752676f8dc",      "resource_server_name": "string",      "audience": "string"    }  ]}
{  "detail": [    {      "loc": [        "string"      ],      "msg": "string",      "type": "string",      "input": null,      "ctx": {}    }  ]}