(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:

NameDescriptionTypeRequiredExample values
idid of the desired recordLongYes100

URL with external_id:

https://BASE_URL/api/VERSION/userAuthorities/reference/{userId}/{authorityId}

Parameters:

NameDescriptionTypeRequiredExamples values
userIdreference of the userStringYesU-002
authorityIdname of the authorityStringYesCEO

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."
}