This endpoint retrieves a specific Role.
Request
To retrieve a single Role please make a GET request to the following URL:
HTTP Method | URL |
---|---|
GET | https://industrial.api.ubidots.com/api/v2.0/roles/<role_label> |
Path Parameters
Parameter | Type | Description |
---|---|---|
role_label | String | The label of the Role |
Header
Parameter | Required? | Description |
---|---|---|
X-Auth-Token | Yes | Authentication 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.