Get a single role
GET <your-unleash-url>/api/admin/roles/:roleId
Authorization
name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
Get a single role by role id
Request
Path Parameters
- roleId string required
- 200
- 400
- 401
- 404
roleWithPermissionsSchema
- application/json
- Schema
- Example (from schema)
Schema
- id number required
The role id
- type string required
A role can either be a global
root
role, or aproject
role or acustom
project role or a custom globalroot-custom
role - name string required
The name of the role
- description string
A more detailed description of the role and what use it's intended for
permissions object[]required
{
"id": 9,
"type": "root",
"name": "Editor",
"description": "Users with the editor role have access to most features in Unleash but can not manage users and roles in the global scope. Editors will be added as project owners when creating projects and get superuser rights within the context of these projects. Users with the editor role will also get access to most permissions on the default project by default.",
"permissions": [
{
"id": 3,
"name": "UPDATE_FEATURE",
"displayName": "Update feature flags",
"type": "project",
"environment": "development"
}
]
}
The request data does not match what we expect.
- application/json
- Schema
- Example (from schema)
Schema
- id string
The ID of the error instance
- name string
The name of the error kind
- message string
A description of what went wrong.
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "ValidationError",
"message": "The request payload you provided doesn't conform to the schema. The .parameters property should be object. You sent []."
}
Authorization information is missing or invalid. Provide a valid API token as the authorization
header, e.g. authorization:*.*.my-admin-token
.
- application/json
- Schema
- Example (from schema)
Schema
- id string
The ID of the error instance
- name string
The name of the error kind
- message string
A description of what went wrong.
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "AuthenticationRequired",
"message": "You must log in to use Unleash. Your request had no authorization header, so we could not authorize you. Try logging in at /auth/simple/login."
}
The requested resource was not found.
- application/json
- Schema
- Example (from schema)
Schema
- id string
The ID of the error instance
- name string
The name of the error kind
- message string
A description of what went wrong.
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "NotFoundError",
"message": "Could not find the addon with ID \"12345\"."
}
Authorization
name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
Request
Request
curl -L -X GET '<your-unleash-url>/api/admin/roles/:roleId' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
curl -L -X GET '<your-unleash-url>/api/admin/roles/:roleId' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
curl -L -X GET '<your-unleash-url>/api/admin/roles/:roleId' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
curl -L -X GET '<your-unleash-url>/api/admin/roles/:roleId' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
curl -L -X GET '<your-unleash-url>/api/admin/roles/:roleId' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
curl -L -X GET '<your-unleash-url>/api/admin/roles/:roleId' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
curl -L -X GET '<your-unleash-url>/api/admin/roles/:roleId' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
curl -L -X GET '<your-unleash-url>/api/admin/roles/:roleId' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
curl -L -X GET '<your-unleash-url>/api/admin/roles/:roleId' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'