Delete Role

This endpoint deletes a specific Role.

Request

To delete a Role please make a DELETE request to the following URL:

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

Path Parameters

ParameterTypeDescription
role_labelStringThe id or username of the User, username should use the prefix ~

Query Parameters

ParameterTypeUseDescription
tokenStringAuthenticationAuthorization Token can optionally be sent as a query parameter.

Header

ParameterRequired?Description
X-Auth-TokenYesAuthentication Token of account
$ 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."
}

Response

If the Role was deleted successfully, returns status code 204.