Appearance
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
| Field | Type | Required | Description |
|---|---|---|---|
roleName | string | yes | Application:RoleName, for example Honeycomb:Read |
serviceProviderNumber | string | for ServiceBenchElite | The 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
}
}| Field | Type | Description |
|---|---|---|
deactivated | boolean | true when this call turned the role off |
found | boolean | true 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
| Status | Code | When |
|---|---|---|
| 400 | VALIDATION_ERROR | roleName is not Application:RoleName, or a ServiceBenchElite role is missing its service provider |
| 500 | INTERNAL_ERROR | Something unexpected failed |