Skip to content
Docs
Operation

Get Role

GET/roles/{id}
Fetch the details of a specific role. Returns the role's name, description, and complete list of permissions. Use this to show what a role can do or to load it into an editor.

When to use this

  • Displaying role details in an admin panel
  • Loading a role for editing
  • Checking what permissions a role grants

Path parameters

idstringRequired
Role ID

Returns

Role retrieved successfully

Errors

400
Bad Request - Invalid input
401
Unauthorized - Authentication required
403
Forbidden - Insufficient permissions
404
Not Found - Resource not found
500
Internal Server Error

Every error names its code and links to it. All error codes

Notes

Tip
The `permissions` array shows all the access this role grants, like `events.create` or `venues.read`.

Related

import { BackstageClient } from '@ticketlayer/backstage';const client = new BackstageClient({  organisationSlug: 'your-org',});client.setAccessToken('YOUR_ACCESS_TOKEN');// Get role detailsconst role = await client.role.get('{{ROLE_ID}}');console.log(`Role: ${role.name || role.id}`);
Response 200
{
  "id": "rol_abc123",
  "organisationId": "org_xyz789",
  "name": "Event Manager",
  "description": "Manages events and related resources",
  "isDeleted": false,
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-20T14:45:00Z",
  "permissions": [
    "events.*",
    "venues.read:all",
    "orders.read"
  ],
  "isSystemRole": false
}

Try it in test mode

Path parameters
Role ID