List Subject Roles
List all roles assigned to a subject.
GET /v1/entities/{id}/roles
Request
Headers
| Header | Value |
|---|---|
Authorization | Bearer azx_... |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | The subject ID. |
Response
200 OK
Returns an array of role objects.
[
{
"id": "r1a2b3c4-d5e6-7890-abcd-ef1234567890",
"name": "editor",
"description": "Can read and write all resources",
"tenant_id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"metadata": null,
"created_by": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"updated_by": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"created_at": "2026-01-15T08:00:00Z",
"updated_at": "2026-01-15T08:00:00Z"
}
]
| Field | Type | Description |
|---|---|---|
id | string (uuid) | Role ID. |
name | string | Role name. |
description | string | Role description. |
tenant_id | string (uuid) | Tenant the role belongs to. |
metadata | object|null | Arbitrary metadata stored with the role. |
created_by | string (uuid) | User who created the role. |
updated_by | string (uuid) | User who last updated the role. |
created_at | string (ISO 8601) | When the role was created. |
updated_at | string (ISO 8601) | When the role was last updated. |
Error responses
| Status | Description |
|---|---|
401 | Missing or invalid API key |
404 | Subject not found |
Example
curl https://api.vengtoo.com/v1/entities/a1b2c3d4-e5f6-7890-abcd-ef1234567890/roles \
-H "Authorization: Bearer azx_..."