Appearance
Application roles
Lists every role defined for an application, including inactive roles and the features each role can use.
GET /fieldservicegateway/usermanagement/v3/authorization/applications/:applicationId/roles
Request
No body.
| Field | In | Required | Description |
|---|---|---|---|
applicationId | path | yes | Application name. Must not contain : |
serviceProviderNumber | query | no | Also return custom roles owned by this service provider |
Example
GET /fieldservicegateway/usermanagement/v3/authorization/applications/Honeycomb/roles?serviceProviderNumber=10001
cURL
bash
curl --request GET 'https://[BASE_URL]/fieldservicegateway/usermanagement/v3/authorization/applications/Honeycomb/roles?serviceProviderNumber=10001' \
--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'Response
200 OK
json
{
"success": true,
"data": {
"applicationId": "Honeycomb",
"totalRoles": 1,
"roles": [
{
"roleName": "Read",
"isActive": true,
"isTechnicianRole": false,
"roleType": "SP",
"isSystemRole": false,
"features": [
{
"featureName": "jobmanagement",
"permission": "Read"
}
]
}
]
}
}| Field | Type | Description |
|---|---|---|
totalRoles | number | How many roles were returned |
isActive | boolean | false when the role has been deactivated |
isTechnicianRole | boolean | true when the role is a technician role |
roleType | string | SA, SP, or empty |
isSystemRole | boolean | true for a built-in role |
features | array | Feature name and access level |
Errors
| Status | Code | When |
|---|---|---|
| 400 | VALIDATION_ERROR | applicationId is empty or contains : |
| 500 | INTERNAL_ERROR | Something unexpected failed |