Get all Roles

This endpoint retrieves all Roles.

Request

To retrieve all Roles please make a GET request to the following URL:

HTTP MethodURL
GEThttps://industrial.api.ubidots.com/api/v2.0/roles/

Header

ParameterRequired?Description
X-Auth-TokenYesAuthentication Token of account
$ curl -X GET 'https://industrial.api.ubidots.com/api/v2.0/roles/' \
 -H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "url": "https://industrial.ubidots.com/api/v2.0/roles/dashboards-viewer",
      "label": "dashboards-viewer",
      "name": "Dashboards Viewer",
      "description": "These users can only see the dashboards of their organization.",
      "permissions": [
        {
          "label": "view_dashboard",
          "name": "Permission to view a Dashboard.",
          "model": "dashboard"
        },
        {
          "label": "view_widget",
          "name": "Permission to view a Widget.",
          "model": "dashboard"
        },
        {
          "label": "view_widget_data",
          "name": "Permission to view a Widget data.",
          "model": "dashboard"
        },
        {
          "label": "view_widget",
          "name": "Permission to view a Widget.",
          "model": "widget"
        },
        {
          "label": "view_widget_data",
          "name": "Permission to view a Widget data.",
          "model": "widget"
        }
      ],
      "createdAt": "2022-06-02T13:06:51.598397Z",
      "isActive": true,
      "permissionsCount": 5
    }
 }
{
    "code": 400001,
    "message": "Validation Error.",
    "detail": {
        ....
    }
}
{
    "code": 401001,
    "message": "Authentication credentials were not provided.",
    "detail": "Authentication credentials were not provided."
}

Response

An object with an array results containing all Roles.