Skip to main content
GET
http://localhost:3000
/
roles
/
by-scope
/
{scopeId}
curl -X GET 'https://api.example.com/roles/by-scope/scope_123' \
  -H 'Authorization: Bearer YOUR_TOKEN'
[
  {
    "id": "role_1",
    "name": "Admin",
    "description": "Full administrative access",
    "scopeId": "scope_123"
  },
  {
    "id": "role_2",
    "name": "Viewer",
    "description": "Read-only access",
    "scopeId": "scope_123"
  }
]

Path Parameters

scopeId
string
required
The scope ID to get roles for

Response

Returns an array of role objects belonging to the specified scope.
roles
array
curl -X GET 'https://api.example.com/roles/by-scope/scope_123' \
  -H 'Authorization: Bearer YOUR_TOKEN'
[
  {
    "id": "role_1",
    "name": "Admin",
    "description": "Full administrative access",
    "scopeId": "scope_123"
  },
  {
    "id": "role_2",
    "name": "Viewer",
    "description": "Read-only access",
    "scopeId": "scope_123"
  }
]