Get Role

This endpoint retrieves a specific Role.

Request

To retrieve a single Role please make a GET request to the following URL:

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

Path Parameters

ParameterTypeDescription
role_labelStringThe label of the Role

Header

ParameterRequired?Description
X-Auth-TokenYesAuthentication Token of account
$ curl -X GET 'https://industrial.api.ubidots.com/api/v2.0/roles/dashboards-viewer' \
 -H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
{
  "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

Returns a Role Object with the requested Role.