Appearance
User roles
Returns the applications and roles assigned to one user, including what each role can do and which service providers it covers.
GET /fieldservicegateway/usermanagement/v3/authorization/users/:userId/app-roles
userId is the user number. An email in the path is accepted and converted to the user number.
Request
No body. Put the user in the path.
GET /fieldservicegateway/usermanagement/v3/authorization/users/1001/app-roles
cURL
bash
curl --request GET 'https://[BASE_URL]/fieldservicegateway/usermanagement/v3/authorization/users/1001/app-roles' \
--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
{
"userId": "1001",
"applications": [
{
"applicationId": "Honeycomb",
"roles": [
{
"roleName": "Technician",
"roleType": "SP",
"isSystemRole": false,
"features": [
{
"featureName": "jobmanagement",
"permission": "Read"
}
],
"serviceProviderNumbers": [
{
"serviceProviderNumber": "10001",
"locationNumbers": ["20001"]
}
]
}
]
}
]
}| Field | Type | Description |
|---|---|---|
userId | string | User that was looked up |
applications | array | Applications the user can open |
applications[].roles | array | Roles in that application. Omitted when access is for the whole application |
roleType | string | SA, SP, or empty when no type is set |
isSystemRole | boolean | true for a built-in role |
features | array | Feature name and the access level, such as Read or Write |
serviceProviderNumbers | array | Service providers and locations this role covers |
Errors
| Status | Code | When |
|---|---|---|
| 400 | VALIDATION_ERROR | userId is missing |
| 500 | INTERNAL_ERROR | Something unexpected failed |