Skip to content

Deactivate role ​

Turns a role off so it can no longer be used. The role record stays in place.

DELETE /fieldservicegateway/usermanagement/v3/authorization/app-roles/deactivate-role

Request ​

FieldTypeRequiredDescription
roleNamestringyesApplication:RoleName, for example Honeycomb:Read
serviceProviderNumberstringfor ServiceBenchEliteThe service provider that owns the role

Example ​

json
{
  "roleName": "Honeycomb:Read"
}

cURL ​

bash
curl --request DELETE 'https://[BASE_URL]/fieldservicegateway/usermanagement/v3/authorization/app-roles/deactivate-role' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: {{x-api-key}}' \
  --header 'Authorization: {{Authorization}}' \
  --header 'Asurion-correlationid: correlation-id' \
  --header 'Asurion-enduser: end-user' \
  --header 'Asurion-sourcesystem: source-system' \
  --header 'Asurion-serviceprovider: company-id' \
  --header 'Asurion-client: default' \
  --data '{
    "roleName": "Honeycomb:Read"
  }'

Response ​

200 OK

json
{
  "success": true,
  "message": "Role definition deactivated successfully",
  "data": {
    "roleName": "Honeycomb:Read",
    "deactivated": true,
    "found": true
  }
}
FieldTypeDescription
deactivatedbooleantrue when this call turned the role off
foundbooleantrue when the role already existed

If the role was already off, deactivated is false and the message says it was already inactive. If the role does not exist, found is false. Both cases still return 200.

Errors ​

StatusCodeWhen
400VALIDATION_ERRORroleName is not Application:RoleName, or a ServiceBenchElite role is missing its service provider
500INTERNAL_ERRORSomething unexpected failed