To delete a Role please make a DELETE request to the following URL:
HTTP Method URL DELETE https://industrial.api.ubidots.com/api/v2.0/roles/<role_label>
Parameter Type Description role_label String The id or username of the User, username should use the prefix ~
Parameter Type Use Description token String Authentication Authorization Token can optionally be sent as a query parameter.
cURL(Request) 204 No Content 400 Bad Request 401 Unauthorized
$ curl -X DELETE 'https://industrial.api.ubidots.com/api/v2.0/roles/dashboards-viewer' \
-H 'Content-Type: application/json' \{
"url": "https://industrial.api.ubidots.com/api/v2.0/roles/dashboards-viewer-clone",
"label": "dashboards-viewer-clone",
"name": "Dashboards Viewer Clone",
"description": "",
"permissions": [
{
"label": "view_dashboard",
"name": "Permission to view a Dashboard.",
"model": "dashboard"
},
{
"label": "view_insightpg_data",
"name": "Permission to view a Widget data.",
"model": "dashboard"
},
{
"label": "view_insightpg_data",
"name": "Permission to view a Widget data.",
"model": "insight"
}
],
"createdAt": "2023-03-07T13:58:18.605688Z",
"permissionsCount": 3
}{
"code": 400001,
"message": "Validation Error.",
"detail": {
....
}
}{
"code": 401001,
"message": "Authentication credentials were not provided.",
"detail": "Authentication credentials were not provided."
}
If the Role was deleted successfully, returns status code 204.