---
agentTools:
  projectIndex: https://developer-docs.gomotive.com/llms.txt
---

# View the permissions of a user

**Purpose**: Use this API to view all the available permissions pertaining to a user's role such as an admin, or a fleet manager, or a driver. This API will list out all the available permissions to that particular user role.

> 📘 NOTE
>
> You must specify the `name` and the `status` of the role to view its associated permissions in the Query Parameters. Refer to the query parameters section for more info.

## Response Parameters

### id

* **Type**: Integer
* **Description**: The unique identifier for the user role.

### name

* **Type**: String
* **Description**: The name of the user role.

### permissions

* **Type**: Array of Strings
* **Description**: List of permissions granted to the user role.

### status

* **Type**: String
* **Description**: The status of the user role (e.g., active).

### created\_at

* **Type**: String (DateTime)
* **Description**: The date and time when the user role was created.

### updated\_at

* **Type**: String (DateTime)
* **Description**: The date and time when the user role was last updated.

### last\_edited\_by

* **Type**: Object
* **Description**: Information about the user who last edited the role.

### **id**

* **Type**: Integer
* **Description**: The unique identifier of the user who last edited.

### **first\_name**

* **Type**: String
* **Description**: The first name of the user who last edited.

### **last\_name**

* **Type**: String
* **Description**: The last name of the user who last edited.

### is\_editable

* **Type**: Boolean
* **Description**: Indicates whether the user role can be edited.

### type

* **Type**: String
* **Description**: The type of the user role (e.g., default or custom).

### assigned\_users\_count

* **Type**: Integer
* **Description**: The number of users assigned to this role.

***

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Motive",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.gomotive.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/user_roles": {
      "get": {
        "summary": "View the permissions of a user",
        "description": "",
        "operationId": "view-the-permissions-of-a-user-role",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "description": "Specify the name of the role for which you want to view the permissions.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Specify the status of the role. Allowed values are active and deactivated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "description": "Number of records to return per page.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 25
            }
          },
          {
            "name": "page_no",
            "in": "query",
            "description": "Current page number.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "View the permissions of a user role": {
                    "value": "  {\n  \"user_roles\": [\n    {\n      \"user_role\": {\n        \"id\": 61,\n        \"name\": \"Admin\",\n        \"permissions\": [\n          \"alerts.manage\",\n          \"app_marketplace.manage\",\n          \"app_marketplace.read\",\n          \"asset_gateways.assign\",\n          \"asset_locations.read\",\n          \"assets.manage\",\n          \"assets.read\",\n          \"company.manage\",\n          \"csa_insights.read\",\n          \"developer_access.manage\",\n          \"document_templates.manage\",\n          \"documents.manage\",\n          \"driver_hub.manage\",\n          \"driver_locations.read\",\n          \"driver_performance.manage\",\n          \"drivers.manage\",\n          \"drivers.read\",\n          \"driving_periods.manage\",\n          \"eld_devices.manage\",\n          \"eld_disconnects.read\",\n          \"facility_insights.read\",\n          \"fault_codes.read\",\n          \"fleet_users.manage\",\n          \"fuel_insights.read\",\n          \"fuel_purchase.manage\",\n          \"geofence.manage\",\n          \"groups.manage\",\n          \"idling.read\",\n          \"ifta.read\",\n          \"inspection_reports.manage\",\n          \"live_stream.manage\",\n          \"logs.edit\",\n          \"logs.read\",\n          \"maintenance.manage\",\n          \"messages.manage\",\n          \"oem_entities.manage\",\n          \"oem_entities.read\",\n          \"smart_load_board.read\",\n          \"speeding_dispute.manage\",\n          \"thermoking_control.manage\",\n          \"user_roles.manage\",\n          \"vehicle_gateways.assign\",\n          \"vehicle_locations.read\",\n          \"vehicles.manage\",\n          \"vehicles.read\",\n          \"video_downloading.read\",\n          \"video_monitoring.read\",\n          \"video_recall.read\"\n        ],\n        \"status\": \"active\",\n        \"created_at\": \"2022-07-06T14:45:48Z\",\n        \"updated_at\": \"2022-07-06T14:45:48Z\",\n        \"last_edited_by\": null,\n        \"is_editable\": false,\n        \"type\": \"default\",\n        \"assigned_users_count\": 0\n      }\n    },\n    {\n      \"user_role\": {\n        \"id\": 62,\n        \"name\": \"Foo\",\n        \"permissions\": [\n          \"drivers.read\",\n          \"logs.read\",\n          \"vehicles.read\"\n        ],\n        \"status\": \"active\",\n        \"created_at\": \"2022-07-06T14:50:48Z\",\n        \"updated_at\": \"2022-07-06T14:50:48Z\",\n        \"last_edited_by\": {\n          \"id\": 330,\n          \"first_name\": \"Hedy\",\n          \"last_name\": \"Nader\"\n        },\n        \"is_editable\": true,\n        \"type\": \"custom\",\n        \"assigned_users_count\": 0\n      }\n    },\n    {\n      \"user_role\": {\n        \"id\": 63,\n        \"name\": \"Bar\",\n        \"permissions\": [\n          \"drivers.read\",\n          \"logs.read\",\n          \"vehicles.read\"\n        ],\n        \"status\": \"active\",\n        \"created_at\": \"2022-07-06T14:55:48Z\",\n        \"updated_at\": \"2022-07-06T14:55:48Z\",\n        \"last_edited_by\": {\n          \"id\": 330,\n          \"first_name\": \"Hedy\",\n          \"last_name\": \"Nader\"\n        },\n        \"is_editable\": true,\n        \"type\": \"custom\",\n        \"assigned_users_count\": 0\n      }\n    }\n  ],\n  \"pagination\": {\n    \"per_page\": 25,\n    \"page_no\": 1,\n    \"total\": 3\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "user_roles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "user_role": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 61,
                                "default": 0
                              },
                              "name": {
                                "type": "string",
                                "example": "Admin"
                              },
                              "permissions": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "example": "alerts.manage"
                                }
                              },
                              "status": {
                                "type": "string",
                                "example": "active"
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2022-07-06T14:45:48Z"
                              },
                              "updated_at": {
                                "type": "string",
                                "example": "2022-07-06T14:45:48Z"
                              },
                              "last_edited_by": {},
                              "is_editable": {
                                "type": "boolean",
                                "example": false,
                                "default": true
                              },
                              "type": {
                                "type": "string",
                                "example": "default"
                              },
                              "assigned_users_count": {
                                "type": "integer",
                                "example": 0,
                                "default": 0
                              }
                            }
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "per_page": {
                          "type": "integer",
                          "example": 25,
                          "default": 0
                        },
                        "page_no": {
                          "type": "integer",
                          "example": 1,
                          "default": 0
                        },
                        "total": {
                          "type": "integer",
                          "example": 3,
                          "default": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "66acf64a829e88001980fbf2:66ccca27c79bd400278ad558"
}
```