List Admin Roles

An overview of the List Admin Roles endpoint

Endpoint Description

The List Admin Roles endpoint provides the list of roles and their descriptions that can be assigned to admins. These roles determine the admins permissions within R1 Discover.

HTTP Method

GET /api/v2/admins/roles

Request

Headers:

  • Content-Type: application/json - Specifies that the request body format is JSON.

  • Accept: application/json - Indicates that the client expects a JSON response.

  • Authorization: Bearer {token} - A valid Bearer token must be provided to authenticate the request.

Request Examples

curl --request GET \
    --get "https://api.r1learning.com/api/v2/admins/roles" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: Bearer {token}"

Response

Meta:

Each List endpoint will contain a meta element which will describe the returned package. In this endpoint, the meta will provide the following information:

  • total_items (Integer): The number of admin roles returned

  • total pages (integer): The number of pages returned in the call to the endpoint. (Total Items / per_page limit)

  • current_page (integer): Indicates the current page number of the results

  • per_page (integer): Indicates the number of results (topics) that will be listed on a single page. The default is 50, the limit is 100.

Data Dictionary:

  • name (string): Name of the admin role.

  • description (string): The description of the admin role

Response Examples

{
    "meta": {
        "total_items": 4,
        "total_pages": 1,
        "current_page": 1,
        "per_page": 50
    },
    "admin_roles": [
        {
            "name": "Admin",
            "description": "View, Edit, and Create Users at same Program & Location"
        },
        {
            "name": "Admin-Read",
            "description": "View (not Edit) Users at same Program & Location"
        },
        {
            "name": "Lead Admin",
            "description": "View, Edit, and Create Admins and Users at same Program & Location"
        },
        {
            "name": "Lead Admin - Read",
            "description": "View (not Edit) Admins and Users at same Program & Location"
        }
    ]
} 
Link to the endpoint in Postman

Notes

  • Authorization Required: Ensure the provided Bearer token is valid and has sufficient privileges to access the endpoint.

Last updated