Assign Role to Organisation Service
This endpoint assigns a role to a specific service within an organisation. It enables role-based management by defining the service's permissions, responsibilities, and access levels. The response includes key details such as the assigned role, service name, type, and status. Additionally, it provides relevant attributes, including dependencies, supported features, configuration settings, and infrastructure details. By specifying roles, organisations can ensure proper governance, secure access control, and efficient service management.
Syntax: see 'CCall Structure
Type = 'POST'
'https://connect.cambrionix.com/api/v1/organizations/organisation-id/services/service-id/role' |
Variable | Description |
---|---|
organisation-id | This is the unique id of the organisation as a unique 128-bit number |
service-id | This is the id of the service as a unique 128-bit number |
In the data section of the request, include the information you wish to add, formatted as shown below.
{ "id": "role-id", } |
Variable | Description |
---|---|
role-id | This is the id of the role as a unique 128-bit number |
Returns:
[ { "id": "role-id", "name": "role-name", "type": "role-type", "description": "role-description", "permissions": { "allowed": ["permission"], "denied": ["permission"] } } ] |
Output | Description |
---|---|
role-id | This is the id of the role as a unique 128-bit number |
role-name | The name of the role |
role-type | The type of role such as organisation or Built-in role |
role-description | The description of the role |
permission | The associated permission names and descriptions |
Example
curl -X 'POST' \
'https://connect.cambrionix.com/api/v1/organizations/40f5a1a7-3119-4961-8493-866c4053b7eb/services/00000000-0000-0000-0000-000000000005/role' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJSUzI1Nm-98a8D08ufNXGJ4HDE0Bg4QIOqAFqzhO4XOJ0aWbA8msEi5KPc5X3A' \
-H 'Content-Type: application/json' \
-d '{
"organizationRoleId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'
Returns
This response has been truncated for clarity within the manual.
{
"result": [
{
"id": "636c21cb-29d7-47d2-9f40-94f441711b0b",
"name": "My First Custom Role",
"type": "organization",
"description": "My First Custom Role",
"permissions": {
"allowed": [
"Organization.Service.Read",
"Organization.Service.Write",
"Organization.Service.Delete",
"Organization.Service.Secret.Read"
],
"denied": []
}
}
}
}
Errors
If there is an error in the API method then JSON-RPC Error Object a will be returned