Get User Roles

GET /users/{userName}/roles

This API call is used to get the roles for specified user. Please refer to the users_roles_schema below to get the list of assignable roles.

Path parameters

  • userName string Required

    Username or ID of the user.

Responses

  • 200 application/json

    Successful Response

    One of:
  • 401 application/json

    Authentication Error. Invalid credentials.

    Hide response attributes Show response attributes object
  • Authorization Error. Invalid role for request.

  • 404 application/json

    User Not Found

    Hide response attributes Show response attributes object
GET /users/{userName}/roles
curl \
 --request GET 'https://localhost:8080/users/testuser1/roles' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
[
  {
    "type": "Close",
    "value": "CloseAdmin"
  },
  {
    "type": "Certification",
    "value": "Reconciler"
  },
  {
    "type": "JournalEntry",
    "value": "Preparer"
  }
]
Response examples (401)
{
  "code": "900901",
  "message": "Invalid Credentials",
  "description": "Access failure for API: /api/admin/v1.1.0, version: v1.1.0 status: (900901) - Invalid Credentials. Make sure you have provided the correct security credentials"
}
Response examples (404)
{
  "error": "User not found for specified id or username.",
  "status": 404
}