(Quick Reference)
Service: Show an assigned user to an authority (role)
Description: This web service return an existing assigned user to an authority object of the specified id in JSON format
Method: GET
URL:
https://BASE_URL/api/VERSION/userAuthorities/{id}
Parameters:
Name | Description | Type | Required | Example values |
---|
id | id of the desired record | Long | Yes | 100 |
URL with external_id:
https://BASE_URL/api/VERSION/userAuthorities/reference/{userId}/{authorityId}
Parameters:
Name | Description | Type | Required | Examples values |
---|
userId | reference of the user | String | Yes | U-002 |
authorityId | name of the authority | String | Yes | CEO |
Success Output
Success case: response.status = 200
{
"id": 1,
"user": {
"id": 1,
"reference": "emp04",
"href": "/api/v2.0/users/1"
},
"authority": {
"id": 24,
"name": "Sales",
"href": "/api/v2.0/authorities/24"
},
"dateCreated": "2015-12-15T09:03:49Z",
"lastUpdated": "2015-12-15T09:03:49Z"
}
Failure Output
Failure case:response.status = 400
{
"error": "invalid_param_type",
"error_description": "The type of parameter id you provided is not valid for this request."
}
Failure case:response.status = 404
{
"error": "not_found",
"error_description": "The userAuthority with the id 100 doesn't exist."
}