Get Role by ID (Read-Only)
GET/api/roles/{id}
Read-only, like every roles endpoint. The response also reports how many active staff users are assigned to the role, which is what an integration needs before anybody edits it in the admin area. The serialised permissions column is only included when include_permissions is set.
Headers
| Field | Type | Description |
|---|---|---|
| authtoken | String | Authentication token, generated from admin area |
Parameters
| Field | Type | Description |
|---|---|---|
| id | Number | Role unique ID |
| include_permissions | String | optional Send 1, true, yes or on to include the serialised permissions column |
curl -X GET "https://yoursite.com/api/roles/123" \
-H "authtoken: YOUR_API_TOKEN" Success-Response:
HTTP/1.1 200 OK
{ "id": "1", "title": "Project manager", "deleted": "0", "assigned_users": 4 } Error-Response:
HTTP/1.1 404 Not Found
{ "status": false, "messages": { "error": "No data were found" } }