List RBAC Roles
List the roles defined on this endpoint. Roles are named permission bundles assigned to RBAC clients via memberships — they decide which HTTP methods and paths each authenticated visitor is allowed to use, and an optional per-role rate limit.
A role's permissions is a structured object (allow/deny method & path lists), not a flat list of permission keys.
Path parameters
id string (uuid) Req
Endpoint UUID.
Response (200 OK)
JSON array of role objects:
id int64
Numeric role ID.
name string
Role name (unique per endpoint).
description string
Free-form description shown in the dashboard. Omitted when empty.
priority int
Ordering weight used when a client holds multiple roles (higher priority wins conflicts).
is_default boolean
Whether new RBAC clients (created via API or through self-registration) get this role auto-assigned.
permissions object
Structured allow/deny policy. Fields:
allowed_methods, denied_methods (string arrays, upper-cased), allowed_paths, denied_paths (string arrays), rate_limit_rps (int64), headers & metadata (string maps). Omitted sub-fields default to empty/none.created_at, updated_at datetime
RFC 3339 UTC.
To count members per role, query /rbac/memberships; member counts are not embedded here.
Errors
401 Unauthorized
Missing auth.
403 Forbidden
Caller lacks the
endpoints:read permission in the active account.404 Not Found
Endpoint doesn't exist or doesn't belong to the calling account.
Request
curl "https://api.ngris.com/v1/endpoints/<uuid>/rbac/roles" \
-H "X-API-KEY: <your_api_key>"
Python
from ngris import Ngris
client = Ngris(api_key="<your_api_key>")
for r in client.endpoint_rbac.list_roles("<endpoint_uuid>"):
badge = " (default)" if r["is_default"] else ""
perms = r.get("permissions", {})
print(f"{r['name']}{badge}: {perms.get('allowed_methods', [])}")
Response — 200 OK
[
{
"id": 1,
"name": "admin",
"description": "Full access",
"priority": 100,
"is_default": false,
"permissions": {},
"created_at": "2026-04-01T00:00:00Z",
"updated_at": "2026-04-01T00:00:00Z"
},
{
"id": 3,
"name": "readonly",
"description": "GET-only access",
"priority": 10,
"is_default": true,
"permissions": {
"allowed_methods": ["GET", "HEAD"],
"denied_paths": ["/admin"],
"rate_limit_rps": 20
},
"created_at": "2026-04-01T00:00:00Z",
"updated_at": "2026-04-01T00:00:00Z"
}
]