Skip to content

Update Role Scopes API
Stable

Request

API to update scopes of an roles for the tenant

Security
apiKey
Path
role_idstring, (uuid)required

Role ID

Bodyapplication/jsonrequired
scope_idsArray of strings
scope_namesArray of strings
Items Enum:"read:device""read:group""read:blueprint""read:directory_record""create:device_command:SET_DEVICE_LOCKDOWN_STATE""create:device_command:REBOOT""create:device_command:BEEP_DEVICE""create:device_command:WIPE""create:device_command:UPDATE_HEARTBEAT""create:device_command:NOTIFY_DEVICE"
cURL
curl -i -X PUT \
  'https://develop-api.esper.io/_mock/openapi/authz2/v1/roles/{role_id}/scopes' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "scope_ids": [
      "string"
    ],
    "scope_names": [
      "read:device"
    ]
  }'

Responses

Request Succeded

Bodyapplication/json
countinteger
scopesArray of objects(ScopeResponse)
Response
{ "count": 0, "scopes": [ {} ] }