Skip to content
R-Service R-Service
RR Tech Service Management Developer Guide

People - Permissions API

List all permissions of a person with the given :id .

GET /people/:id/permissions
Status: 200 OK
[
{
"account": {
"id": "pro-product",
"name": "Widget International"
},
"roles": [
"directory_administrator"
]
},
{
"account": {
"name": "Widget Data Center",
"id": "dc"
},
"roles": [
"specialist",
"service_desk_analyst",
"service_desk_manager",
"knowledge_manager",
"problem_manager",
"workflow_manager",
"release_manager",
"project_manager",
"service_level_manager",
"configuration_manager",
"account_administrator",
"account_owner"
]
},
{
"account": {
"name": "Widget North America",
"id": "wna"
},
"roles": [
"account_administrator"
]
},
{
"account": {
"name": "Widget Europe",
"id": "weu"
},
"roles": [
"account_administrator"
]
}
]

The response contains these fields by default.

List permissions of a person for a specific account

Section titled “List permissions of a person for a specific account”

List all permissions of a person with the given :id for the account with the given :accountID .

GET /people/:id/permissions/:accountID
Status: 200 OK
{
"account": {
"name": "Widget Data Center",
"id": "dc"
},
"roles": [
"specialist",
"service_desk_analyst",
"service_desk_manager",
"knowledge_manager",
"problem_manager",
"workflow_manager",
"release_manager",
"project_manager",
"service_level_manager",
"configuration_manager",
"account_administrator",
"account_owner"
]
}

The response contains these fields by default.

List people of account with specific roles

Section titled “List people of account with specific roles”

Returns all the person records that are registered in the account and its directory account, provided that these people have at least one of the specified roles.

GET /people?roles=role1,role2,...

Example:

$ curl -H "Authorization: Bearer <oauth-token>" \
-H "account: pro-product" \
-X GET \
"https://api.r-service.tech/v1/people?roles=directory_administrator,directory_auditor"

The response contains these fields by default. Filtering and pagination are available to reduce/limit the collection of people.

List people with specific roles of account

Section titled “List people with specific roles of account”

Returns all the person records that have at least one of the specified roles of the account.

GET /people/all_with_roles?roles=role1,role2,...

Example:

$ curl -H "Authorization: Bearer <oauth-token>" \
-H "account: dc" \
-X GET \
"https://api.r-service.tech/v1/people/all_with_roles?roles=specialist,problem_manager"

The response contains these fields by default. Filtering and pagination are available to reduce/limit the collection of people.

Adds the specified roles of the account to a person.

POST /people/:id/permissions/:accountID?roles=role1,role2,...

Example:

$ curl -H "Authorization: Bearer <oauth-token>" -X POST -H "account: pro-product" "https://api.r-service.tech/v1/people/1234/permissions/dc?roles=specialist,problem_manager"

The response contains these fields by default.

Overwrite the roles that a person has of the account with the specified roles of the account.

PATCH /people/:id/permissions/:accountID?roles=role1,role2,...

Example:

$ curl -H "Authorization: Bearer <oauth-token>" -X PATCH -H "account: pro-product" "https://api.r-service.tech/v1/people/1234/permissions/dc?roles=problem_manager,workflow_manager"

The response contains these fields by default.

Remove the specified roles of the account from a person.

DELETE /people/:id/permissions/:accountID?roles=role1,role2,...

Example:

$ curl -H "Authorization: Bearer <oauth-token>" -X DELETE -H "account: pro-product" "https://api.r-service.tech/v1/people/1234/permissions/dc?roles=problem_manager,workflow_manager"
Status: 204 No Content

Revoke all roles of an account from a person

Section titled “Revoke all roles of an account from a person”

Remove all roles of the specified account from a person.

DELETE /people/:id/permissions/:accountID

Example:

$ curl -H "Authorization: Bearer <oauth-token>" -X DELETE -H "account: pro-product" "https://api.r-service.tech/v1/people/1234/permissions/dc"
Status: 204 No Content

Remove all roles in all accounts from a person.

DELETE /people/:id/permissions

Example:

$ curl -H "Authorization: Bearer <oauth-token>" -X DELETE -H "account: pro-product" "https://api.r-service.tech/v1/people/1234/permissions"

Note:

  • You must be administrator in the account of the specified person.
  • It is not allowed to remove your own permissions.
Status: 204 No Content

account

Required reference to Account — The account for which the person has permissions

roles

Required array of string max(21) — The roles the person has within the account

  • key_contact
  • auditor
  • financial_manager
  • directory_auditor (for directory accounts only)
  • specialist
  • service_desk_analyst
  • service_desk_manager
  • knowledge_manager
  • problem_manager
  • workflow_manager
  • release_manager
  • project_manager
  • service_level_manager
  • configuration_manager
  • account_designer
  • account_administrator
  • directory_designer (for directory accounts only)
  • directory_administrator (for directory accounts only)
  • workflow_automator_auditor (for R-Service Workflow Automator enabled accounts only)
  • workflow_automator_specialist (for R-Service Workflow Automator enabled accounts only)
  • account_owner