Role Object

Describes the JSON object of a Role.

A Role in Ubidots is a group of permissions defined by the user to view, create, or edit resources (Devices, Dashboards, Events, Tokens and End users) within an Ubidots-powered App.

PropertyTypeDescription
urlStringUrl of Role
labelStringLabel of Role
nameStringName of Role
descriptionStringDescription of Role
permissionsObjectPermissions of Role:
- label: Label of the permission.
- name: Name of the permission.
- model: Entity related to the permission (Dashboard, event, device, etc).
createdAtStringDate Role was created
isActiveBooleanTrue is Role is active
permissionsCountIntegerNumber of permissions assigned to the Role
{
   "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
}

Permissions available

This is a list of the permissions available:

{
    {
    "label": "add_organization",
    "name": "Permission to create an Organization.",
    "model": "organization"
  },
  {
    "label": "change_organization",
    "name": "Permission to change an existing Organization.",
    "model": "organization"
  },
  {
    "label": "delete_organization",
    "name": "Permission to delete an existing Organization.",
    "model": "organization"
  },
  {
    "label": "view_organization",
    "name": "Permission to view an Organization.",
    "model": "organization"
  },
  {
    "label": "add_role",
    "name": "Permission to create a Role.",
    "model": "role"
  },
  {
    "label": "change_role",
    "name": "Permission to change an existing Role.",
    "model": "role"
  },
  {
    "label": "delete_role",
    "name": "Permission to delete an existing Role.",
    "model": "role"
  },
  {
    "label": "view_role",
    "name": "Permission to view a Role.",
    "model": "role"
  },
  {
    "label": "add_user",
    "name": "Permission to create a User.",
    "model": "user"
  },
  {
    "label": "change_user",
    "name": "Permission to change an existing User.",
    "model": "user"
  },
  {
    "label": "delete_user",
    "name": "Permission to delete an existing User.",
    "model": "user"
  },
  {
    "label": "view_user",
    "name": "Permission to view a User.",
    "model": "user"
  },
  {
    "label": "add_dashboard",
    "name": "Permission to create a Dashboard.",
    "model": "dashboard"
  },
  {
    "label": "add_widget",
    "name": "Permission to create a Widget.",
    "model": "dashboard"
  },
  {
    "label": "change_dashboard",
    "name": "Permission to change an existing Dashboard.",
    "model": "dashboard"
  },
  {
    "label": "change_widget",
    "name": "Permission to change an existing Widget.",
    "model": "dashboard"
  },
  {
    "label": "delete_dashboard",
    "name": "Permission to delete an existing Dashboard.",
    "model": "dashboard"
  },
  {
    "label": "delete_widget",
    "name": "Permission to delete an existing Widget.",
    "model": "dashboard"
  },
  {
    "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": "add_widget",
    "name": "Permission to create a Widget.",
    "model": "widget"
  },
  {
    "label": "change_widget",
    "name": "Permission to change an existing Widget.",
    "model": "widget"
  },
  {
    "label": "delete_widget",
    "name": "Permission to delete an existing Widget.",
    "model": "widget"
  },
  {
    "label": "view_widget",
    "name": "Permission to view a Widget.",
    "model": "widget"
  },
  {
    "label": "view_widget_data",
    "name": "Permission to view a Widget data.",
    "model": "widget"
  },
  {
    "label": "add_report",
    "name": "Permission to create a Report.",
    "model": "report"
  },
  {
    "label": "change_report",
    "name": "Permission to change an existing Report.",
    "model": "report"
  },
  {
    "label": "delete_report",
    "name": "Permission to delete an existing Report.",
    "model": "report"
  },
  {
    "label": "view_report",
    "name": "Permission to view a Report.",
    "model": "report"
  },
  {
    "label": "add_device",
    "name": "Permission to create a Device.",
    "model": "device"
  },
  {
    "label": "add_value",
    "name": "Permission to create a Value.",
    "model": "device"
  },
  {
    "label": "add_variable",
    "name": "Permission to create a Variable.",
    "model": "device"
  },
  {
    "label": "change_device",
    "name": "Permission to change an existing Device.",
    "model": "device"
  },
  {
    "label": "change_value",
    "name": "Permission to change an existing Value.",
    "model": "device"
  },
  {
    "label": "change_variable",
    "name": "Permission to change an existing Variable.",
    "model": "device"
  },
  {
    "label": "delete_device",
    "name": "Permission to delete an existing Device.",
    "model": "device"
  },
  {
    "label": "delete_value",
    "name": "Permission to delete an existing Value.",
    "model": "device"
  },
  {
    "label": "delete_variable",
    "name": "Permission to delete an existing Variable.",
    "model": "device"
  },
  {
    "label": "view_device",
    "name": "Permission to view a Device.",
    "model": "device"
  },
  {
    "label": "view_statistics_value",
    "name": "Permission to view a Variable statistics",
    "model": "device"
  },
  {
    "label": "view_value",
    "name": "Permission to view a Value.",
    "model": "device"
  },
  {
    "label": "view_variable",
    "name": "Permission to view a Variable.",
    "model": "device"
  },
  {
    "label": "view_widgets_value",
    "name": "Permission to view Values of Widgets",
    "model": "device"
  },
  {
    "label": "add_devicegroup",
    "name": "Permission to create Devices Groups.",
    "model": "devicegroup"
  },
  {
    "label": "change_devicegroup",
    "name": "Permission to change existing Devices Groups.",
    "model": "devicegroup"
  },
  {
    "label": "delete_devicegroup",
    "name": "Permission to delete existing Devices Groups.",
    "model": "devicegroup"
  },
  {
    "label": "view_devicegroup",
    "name": "Permission to view Devices Groups.",
    "model": "devicegroup"
  },
  {
    "label": "add_value",
    "name": "Permission to create a Value.",
    "model": "variable"
  },
  {
    "label": "add_variable",
    "name": "Permission to create a Variable.",
    "model": "variable"
  },
  {
    "label": "change_value",
    "name": "Permission to change an existing Value.",
    "model": "variable"
  },
  {
    "label": "change_variable",
    "name": "Permission to change an existing Variable.",
    "model": "variable"
  },
  {
    "label": "delete_value",
    "name": "Permission to delete an existing Value.",
    "model": "variable"
  },
  {
    "label": "delete_variable",
    "name": "Permission to delete an existing Variable.",
    "model": "variable"
  },
  {
    "label": "view_statistics_value",
    "name": "Permission to view a Variable statistics",
    "model": "variable"
  },
  {
    "label": "view_value",
    "name": "Permission to view a Value.",
    "model": "variable"
  },
  {
    "label": "view_variable",
    "name": "Permission to view a Variable.",
    "model": "variable"
  },
  {
    "label": "view_widgets_value",
    "name": "Permission to view Values of Widgets",
    "model": "variable"
  },
  {
    "label": "add_event",
    "name": "Permission to create an Event.",
    "model": "event"
  },
  {
    "label": "change_event",
    "name": "Permission to change an existing Event.",
    "model": "event"
  },
  {
    "label": "delete_event",
    "name": "Permission to delete an existing Event.",
    "model": "event"
  },
  {
    "label": "view_event",
    "name": "Permission to view an Event.",
    "model": "event"
  }
}