Roles
Roles for the organization's own administrators. A role is a named set of scopes; viewer, security and admin are built in and can't be changed. A role assignment gives a role to a group, never to a person: what someone signed in may do is the union of their groups' roles, worked out on every request. The break-glass group (a group with break_glass) is always admin.
The role assignment model
A role given to a group: every member holds the role's scopes while they're in the group.
Properties
- Name
id- Type
- string
- Description
Role assignment ID.
- Name
etag- Type
- string
- Description
Current version.
- Name
group_id- Type
- string
- Description
The group whose members hold the role.
- Name
role_id- Type
- string
- Description
The role.
- Name
labels- Type
- object
- Description
Labels.
- Name
managed_by- Type
- string
- Description
The tool that manages this resource, such as
terraform. Can benull.
- Name
created_at- Type
- timestamp
- Description
When it was created.
- Name
updated_at- Type
- timestamp
- Description
When it last changed.
List roles
Needs the role-assignments:read scope.
Query parameters
- Name
page_size- Type
- integer
- Description
Results per page, 1 to 200.
0or absent means 50; more than 200 means 200 (AIP-158).
- Name
page_token- Type
- string
- Description
next_page_tokenfrom the previous page.
- Name
updated_since- Type
- timestamp
- Description
Only resources changed at or after this time.
- Name
group_id- Type
- string
- Description
Only assignments to this group.
- Name
role_id- Type
- string
- Description
Only assignments of this role.
Request
curl https://acme.ext.passway.com/v1/role-assignments \
-H "Authorization: Bearer $PASSWAY_TOKEN"
Response
{
"data": [
{
"id": "rasg_01jd8k3m2v9x4q7r5t6w8y0z1a",
"etag": "3f9a",
"group_id": "grp_01jd8k3m2v9x4q7r5t6w8y0z1a",
"role_id": "role_01jd8k3m2v9x4q7r5t6w8y0z1a",
"labels": {
"passway.example/cost-center": "4410",
"team": "facilities"
},
"managed_by": "terraform",
"created_at": "2026-11-30T14:02:11Z",
"updated_at": "2026-11-30T14:02:11Z"
}
],
"next_page_token": null
}
Create a role assignment
The caller must already hold every scope the role gives, or it's refused with 403. A group has each role at most once (409).
Needs the role-assignments:write scope.
Headers
- Name
Idempotency-Key- Type
- string
- Description
A unique key, such as a UUID. Repeating a successful request with the same key within 24 hours returns the original response; reusing it for a different request returns
422; repeating it while the first is still running returns409withRetry-After.
Required attributes
- Name
group_id- Type
- string
- Description
The group whose members will hold the role.
- Name
role_id- Type
- string
- Description
The role.
Optional attributes
- Name
labels- Type
- object
- Description
Labels.
- Name
managed_by- Type
- string
- Description
The tool that manages this resource. Terraform sets
terraform.
Request
curl -X POST https://acme.ext.passway.com/v1/role-assignments \
-H "Authorization: Bearer $PASSWAY_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"group_id": "grp_01jd8k3m2v9x4q7r5t6w8y0z1a",
"role_id": "role_01jd8k3m2v9x4q7r5t6w8y0z1a",
"labels": {
"passway.example/cost-center": "4410",
"team": "facilities"
},
"managed_by": "terraform"
}'
Response
{
"id": "rasg_01jd8k3m2v9x4q7r5t6w8y0z1a",
"etag": "3f9a",
"group_id": "grp_01jd8k3m2v9x4q7r5t6w8y0z1a",
"role_id": "role_01jd8k3m2v9x4q7r5t6w8y0z1a",
"labels": {
"passway.example/cost-center": "4410",
"team": "facilities"
},
"managed_by": "terraform",
"created_at": "2026-11-30T14:02:11Z",
"updated_at": "2026-11-30T14:02:11Z"
}
Get a role assignment
Needs the role-assignments:read scope.
Path parameters
- Name
role_assignment_id- Type
- string
- Description
Role assignment ID:
rasg_followed by 1 to 64 lowercase letters and digits.
Request
curl https://acme.ext.passway.com/v1/role-assignments/rasg_01jd8k3m2v9x4q7r5t6w8y0z1a \
-H "Authorization: Bearer $PASSWAY_TOKEN"
Response
{
"id": "rasg_01jd8k3m2v9x4q7r5t6w8y0z1a",
"etag": "3f9a",
"group_id": "grp_01jd8k3m2v9x4q7r5t6w8y0z1a",
"role_id": "role_01jd8k3m2v9x4q7r5t6w8y0z1a",
"labels": {
"passway.example/cost-center": "4410",
"team": "facilities"
},
"managed_by": "terraform",
"created_at": "2026-11-30T14:02:11Z",
"updated_at": "2026-11-30T14:02:11Z"
}
Update a role assignment
A JSON merge patch (RFC 7396): fields in the body replace the current ones, null removes a field where the schema allows null, and objects such as labels are merged. Requires If-Match with the current etag.
Needs the role-assignments:write scope.
Path parameters
- Name
role_assignment_id- Type
- string
- Description
Role assignment ID:
rasg_followed by 1 to 64 lowercase letters and digits.
Headers
- Name
If-Match- Type
- string
- Description
The resource's current
etag, in double quotes. Required.
Optional attributes
- Name
labels- Type
- object
- Description
Labels to set or remove, or
nullto remove every label. Can benull.
- Name
managed_by- Type
- string
- Description
New managing tool, or
nullto clear it. Can benull.
Request
curl -X PATCH https://acme.ext.passway.com/v1/role-assignments/rasg_01jd8k3m2v9x4q7r5t6w8y0z1a \
-H "Authorization: Bearer $PASSWAY_TOKEN" \
-H 'If-Match: "3f9a"' \
-H "Content-Type: application/merge-patch+json" \
-d '{
"labels": {
"old-label": null,
"team": "security"
}
}'
Response
{
"id": "rasg_01jd8k3m2v9x4q7r5t6w8y0z1a",
"etag": "3f9a",
"group_id": "grp_01jd8k3m2v9x4q7r5t6w8y0z1a",
"role_id": "role_01jd8k3m2v9x4q7r5t6w8y0z1a",
"labels": {
"passway.example/cost-center": "4410",
"team": "facilities"
},
"managed_by": "terraform",
"created_at": "2026-11-30T14:02:11Z",
"updated_at": "2026-11-30T14:02:11Z"
}
Delete a role assignment
The caller must hold every scope the role gives.
Needs the role-assignments:write scope.
Path parameters
- Name
role_assignment_id- Type
- string
- Description
Role assignment ID:
rasg_followed by 1 to 64 lowercase letters and digits.
Headers
- Name
If-Match- Type
- string
- Description
The resource's current
etag, in double quotes. Required.
Request
curl -X DELETE https://acme.ext.passway.com/v1/role-assignments/rasg_01jd8k3m2v9x4q7r5t6w8y0z1a \
-H "Authorization: Bearer $PASSWAY_TOKEN" \
-H 'If-Match: "3f9a"'
Response
204 Deleted
Who is calling, and what they may do
For a person signed in: who they are, every scope they hold now, and the role and group each comes from. For an API client or agent: its scopes. Anyone signed in may ask; a person with no role gets 403, as for everything on /v1.
Request
curl https://acme.ext.passway.com/v1/me \
-H "Authorization: Bearer $PASSWAY_TOKEN"
Response
{
"actor_type": "person",
"actor_id": "…",
"person": null,
"scopes": [
"…"
],
"roles": [
{
"group_id": "grp_01jd8k3m2v9x4q7r5t6w8y0z1a",
"role_id": "role_01jd8k3m2v9x4q7r5t6w8y0z1a",
"break_glass": true
}
]
}
List roles
The built-in roles first: role_viewer reads everything, role_security also suspends, resumes and revokes credentials, and role_admin has every scope. Then the organization's own, by name.
Needs the roles:read scope.
Query parameters
- Name
page_size- Type
- integer
- Description
Results per page, 1 to 200.
0or absent means 50; more than 200 means 200 (AIP-158).
- Name
page_token- Type
- string
- Description
next_page_tokenfrom the previous page.
Request
curl https://acme.ext.passway.com/v1/roles \
-H "Authorization: Bearer $PASSWAY_TOKEN"
Response
{
"data": [
{
"id": "role_01jd8k3m2v9x4q7r5t6w8y0z1a",
"name": "Security",
"description": "…",
"scopes": [
"…"
],
"built_in": true,
"created_at": "2026-11-30T14:02:11Z",
"updated_at": "2026-11-30T14:02:11Z"
}
],
"next_page_token": null
}
Make a role
A role of the organization's own, with exactly the scopes chosen, now and later, such as a help desk's: read people, suspend credentials. To start from a built-in role, copy its scopes. The caller must hold every scope it gives. Raises com.passway.role.created.
Needs the roles:write scope.
Headers
- Name
Idempotency-Key- Type
- string
- Description
A unique key, such as a UUID. Repeating a successful request with the same key within 24 hours returns the original response; reusing it for a different request returns
422; repeating it while the first is still running returns409withRetry-After.
Required attributes
- Name
name- Type
- string
- Description
Display name, unique among the organization's roles and the built-in ones.
- Name
scopes- Type
- array of strings
- Description
The scopes it gives: exactly these, now and later.
Optional attributes
- Name
description- Type
- string
- Description
What it's for.
Request
curl -X POST https://acme.ext.passway.com/v1/roles \
-H "Authorization: Bearer $PASSWAY_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "Help desk",
"scopes": [
"…"
]
}'
Response
{
"id": "role_01jd8k3m2v9x4q7r5t6w8y0z1a",
"name": "Security",
"description": "…",
"scopes": [
"…"
],
"built_in": true,
"created_at": "2026-11-30T14:02:11Z",
"updated_at": "2026-11-30T14:02:11Z"
}
Get a role
Needs the roles:read scope.
Path parameters
- Name
role_id- Type
- string
- Description
Role ID:
role_followed by 1 to 64 lowercase letters and digits.
Request
curl https://acme.ext.passway.com/v1/roles/role_01jd8k3m2v9x4q7r5t6w8y0z1a \
-H "Authorization: Bearer $PASSWAY_TOKEN"
Response
{
"id": "role_01jd8k3m2v9x4q7r5t6w8y0z1a",
"name": "Security",
"description": "…",
"scopes": [
"…"
],
"built_in": true,
"created_at": "2026-11-30T14:02:11Z",
"updated_at": "2026-11-30T14:02:11Z"
}
Change a role
The organization's own roles only: built-in ones return 409. The caller must hold every scope the role gives, before and after. Its holders have the new scopes from their next request. Raises com.passway.role.updated.
Needs the roles:write scope.
Path parameters
- Name
role_id- Type
- string
- Description
Role ID:
role_followed by 1 to 64 lowercase letters and digits.
Headers
- Name
If-Match- Type
- string
- Description
The resource's current
etag, in double quotes. Required.
Optional attributes
- Name
name- Type
- string
- Description
New name.
- Name
description- Type
- string
- Description
New description.
- Name
scopes- Type
- array of strings
- Description
The scopes, replacing the current ones.
Request
curl -X PATCH https://acme.ext.passway.com/v1/roles/role_01jd8k3m2v9x4q7r5t6w8y0z1a \
-H "Authorization: Bearer $PASSWAY_TOKEN" \
-H 'If-Match: "3f9a"' \
-H "Content-Type: application/merge-patch+json" \
-d '{}'
Response
{
"id": "role_01jd8k3m2v9x4q7r5t6w8y0z1a",
"name": "Security",
"description": "…",
"scopes": [
"…"
],
"built_in": true,
"created_at": "2026-11-30T14:02:11Z",
"updated_at": "2026-11-30T14:02:11Z"
}
Delete a role
The organization's own roles only, once no group has them (409 with /problems/has-dependents otherwise). Built-in roles return 409. The caller must hold every scope it gives. Raises com.passway.role.deleted.
Needs the roles:write scope.
Path parameters
- Name
role_id- Type
- string
- Description
Role ID:
role_followed by 1 to 64 lowercase letters and digits.
Headers
- Name
If-Match- Type
- string
- Description
The resource's current
etag, in double quotes. Required.
Request
curl -X DELETE https://acme.ext.passway.com/v1/roles/role_01jd8k3m2v9x4q7r5t6w8y0z1a \
-H "Authorization: Bearer $PASSWAY_TOKEN" \
-H 'If-Match: "3f9a"'
Response
204 Success
Who holds a role
Everyone who holds the role now, and the group each holds it through: active people in a group the role is assigned to, and for role_admin, the break-glass group's members.
Needs the roles:read scope.
Path parameters
- Name
role_id- Type
- string
- Description
Role ID:
role_followed by 1 to 64 lowercase letters and digits.
Request
curl https://acme.ext.passway.com/v1/roles/role_01jd8k3m2v9x4q7r5t6w8y0z1a/holders \
-H "Authorization: Bearer $PASSWAY_TOKEN"
Response
{
"role_id": "role_01jd8k3m2v9x4q7r5t6w8y0z1a",
"holders": [
{
"person_id": "per_01jd8k3m2v9x4q7r5t6w8y0z1a",
"group_id": "grp_01jd8k3m2v9x4q7r5t6w8y0z1a",
"break_glass": true
}
]
}