Roles
The roles of one resource type (D18), filtered as GET /authz/roles is. With inheritable_from, the roles of that parent type a role on this type could inherit instead: each a valid parent_role_key for a RoleInheritance rule on it.
x-pontive-instance-id<token>Instance ID for the request
resource_type*stringResource type key
inheritable_from?stringA parent type: list its roles this type's roles may inherit
type?stringFilter by role type (system, custom)
name?stringFilter by role name (partial match)
resource_id?stringAlso include this organization instance's own instance-scoped roles
include_instance_scoped?booleanInclude every instance-scoped role alongside type-scoped ones (ignored when resource_id is set)
assignable_only?booleanOnly roles that may be assigned directly
agent_assignable_only?booleanOnly roles an agent may hold
permission?stringFilter by permission name
page?integerPage number
limit?integerItems per page
OK
application/json- response
data?array<>object?stringpagination?Pagination is the page answered (api-route-review D9).
curl -X GET 'https://api.us.pontive.com/v1/authz/resource-types/string/roles'{ "data": [ { "agent_assignable": true, "assignment_count": 0, "created_at": "string", "description": "string", "inheritance": [ { "parent_role_keys": [ "string" ], "parent_type": "string" } ], "inherited_only": true, "key": "string", "metadata": { "property1": "string", "property2": "string" }, "name": "string", "object": "string", "permission_count": 0, "permissions": [ "string" ], "resource_id": "string", "resource_type": "string", "type": "system", "updated_at": "string" } ], "object": "string", "pagination": { "limit": 0, "page": 0, "total": 0, "total_pages": 0 }}Create a custom role. Required: key, resource_type, permissions. Optional: description, name, metadata, resource_id. Setting resource_id (an organization id) makes the role instance-scoped — assignable only on that instance; it is immutable. Role keys are unique within a resource type and cannot collide with system roles.
x-pontive-instance-id<token>Instance ID for the request
resource_type*stringresource_type
Create Role Request
application/json- body
Create Role Request
agent_assignable?booleanAgentAssignable sets whether an agent may hold the role; omitted is true (pontive-spec 45 §6.2).
description?stringinheritance?array<>Inheritance is the optional set of inheritance rules, at most one per parent type. Each parent_type must be a declared parent type of resource_type, and each parent role key must exist on it.
inherited_only?booleanInheritedOnly makes the role held only through a parent role, never assigned directly. Requires inheritance; not on the root type.
key*stringmetadata?name?stringpermissions?array<string>resource_id?stringResourceID, when set, creates an instance-scoped role bound to this organization. Optional and immutable; omit for a type-scoped role (the default).
Created
application/json- response
agent_assignable?booleanAgentAssignable: an agent may hold the role through an installation (pontive-spec 45 §6.2). The seeded org and root owner roles are false; every other role defaults to true.
assignment_count?integercreated_at?stringdescription?stringinheritance?array<>inherited_only?booleanInheritedOnly: the role is held only through a parent role and can never be assigned directly to a member, group, service account or invitation (role_not_assignable). Pickers drop it (assignable_only).
key?stringmetadata?name?stringobject?stringpermission_count?integerpermissions?array<string>resource_id?stringresource_type?stringtype?string"system""custom"updated_at?stringcurl -X POST 'https://api.us.pontive.com/v1/authz/resource-types/string/roles' \ -H 'Content-Type: application/json' \ -d '{ "key": "string"}'{ "agent_assignable": true, "assignment_count": 0, "created_at": "string", "description": "string", "inheritance": [ { "parent_role_keys": [ "string" ], "parent_type": "string" } ], "inherited_only": true, "key": "string", "metadata": { "property1": "string", "property2": "string" }, "name": "string", "object": "string", "permission_count": 0, "permissions": [ "string" ], "resource_id": "string", "resource_type": "string", "type": "system", "updated_at": "string"}Get a role by key and resource_type. Returns name, description, resource_type, type, permissions, metadata, created_at, updated_at, assignment_count, permission_count.
x-pontive-instance-id<token>Instance ID for the request
resource_type*stringRole resource type
role_key*stringRole Key
OK
application/json- response
agent_assignable?booleanAgentAssignable: an agent may hold the role through an installation (pontive-spec 45 §6.2). The seeded org and root owner roles are false; every other role defaults to true.
assignment_count?integercreated_at?stringdescription?stringinheritance?array<>inherited_only?booleanInheritedOnly: the role is held only through a parent role and can never be assigned directly to a member, group, service account or invitation (role_not_assignable). Pickers drop it (assignable_only).
key?stringmetadata?name?stringobject?stringpermission_count?integerpermissions?array<string>resource_id?stringresource_type?stringtype?string"system""custom"updated_at?stringcurl -X GET 'https://api.us.pontive.com/v1/authz/resource-types/string/roles/string'{ "agent_assignable": true, "assignment_count": 0, "created_at": "string", "description": "string", "inheritance": [ { "parent_role_keys": [ "string" ], "parent_type": "string" } ], "inherited_only": true, "key": "string", "metadata": { "property1": "string", "property2": "string" }, "name": "string", "object": "string", "permission_count": 0, "permissions": [ "string" ], "resource_id": "string", "resource_type": "string", "type": "system", "updated_at": "string"}Update a custom role. Can update: description, name, permissions, metadata. Cannot update: key (immutable), resource_type (immutable). System roles cannot be updated.
x-pontive-instance-id<token>Instance ID for the request
resource_type*stringRole resource type
role_key*stringRole Key
If-Match?stringThe ETag the document was read with: a stale one is refused 412 precondition_failed (D42)
Update Role Request
application/json- body
Update Role Request
agent_assignable?booleanAgentAssignable, when provided, sets whether an agent may hold the role. Turning it off is refused while an agent installation holds the role or an agent requests it (409 role_held_by_agents).
description?stringinheritance?array<>Inheritance follows the same absent-vs-empty convention as permissions: omitted leaves existing rules unchanged; a provided (possibly empty) list replaces them wholesale.
inherited_only?booleanInheritedOnly, when provided, turns the flag on or off. Turning it on is refused while anything holds the role directly (role_in_use), on the root type, without inheritance, or on a seeded role.
metadata?name?stringpermissions?array<string>OK
application/json- response
agent_assignable?booleanAgentAssignable: an agent may hold the role through an installation (pontive-spec 45 §6.2). The seeded org and root owner roles are false; every other role defaults to true.
assignment_count?integercreated_at?stringdescription?stringinheritance?array<>inherited_only?booleanInheritedOnly: the role is held only through a parent role and can never be assigned directly to a member, group, service account or invitation (role_not_assignable). Pickers drop it (assignable_only).
key?stringmetadata?name?stringobject?stringpermission_count?integerpermissions?array<string>resource_id?stringresource_type?stringtype?string"system""custom"updated_at?stringcurl -X PATCH 'https://api.us.pontive.com/v1/authz/resource-types/string/roles/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "agent_assignable": true, "assignment_count": 0, "created_at": "string", "description": "string", "inheritance": [ { "parent_role_keys": [ "string" ], "parent_type": "string" } ], "inherited_only": true, "key": "string", "metadata": { "property1": "string", "property2": "string" }, "name": "string", "object": "string", "permission_count": 0, "permissions": [ "string" ], "resource_id": "string", "resource_type": "string", "type": "system", "updated_at": "string"}Delete a custom role. System roles cannot be deleted. Returns 204 No Content on success.
x-pontive-instance-id<token>Instance ID for the request
resource_type*stringRole resource type
role_key*stringRole Key
force?booleanForce delete (bypass confirmation when role is in use)
If-Match?stringThe ETag the document was read with: a stale one is refused 412 precondition_failed (D42)
No Content
curl -X DELETE 'https://api.us.pontive.com/v1/authz/resource-types/string/roles/string'Get a paginated list of roles (system and custom) in the directory. Filter by type (system/custom), resource_type, name (partial match), permission. By default only type-scoped roles are returned. Pass resource_id to also include that organization instance's own instance-scoped roles, or set include_instance_scoped=true to include every instance-scoped role alongside the type-scoped ones (ignored when resource_id is set).
x-pontive-instance-id<token>Instance ID for the request
type?stringFilter by role type (system, custom)
name?stringFilter by role name (partial match)
resource_type?stringFilter by resource type
resource_id?stringAlso include this organization instance's own instance-scoped roles
include_instance_scoped?booleanInclude every instance-scoped role alongside type-scoped ones (ignored when resource_id is set)
assignable_only?booleanOnly roles that may be assigned directly: drops inherited-only roles. What a role picker asks for
agent_assignable_only?booleanOnly roles an agent may hold (agent_assignable): what an agent's role picker asks for
permission?stringFilter by permission name
page?integerPage number
limit?integerItems per page
sort?stringSort field; prefix with - for descending (e.g. -created_at). Allowed: created_at, updated_at, name, key. Default: -created_at
search?stringSearch query
OK
application/json- response
data?array<>object?stringpagination?Pagination is the page answered (api-route-review D9).
curl -X GET 'https://api.us.pontive.com/v1/authz/roles'{ "data": [ { "agent_assignable": true, "assignment_count": 0, "created_at": "string", "description": "string", "inheritance": [ { "parent_role_keys": [ "string" ], "parent_type": "string" } ], "inherited_only": true, "key": "string", "metadata": { "property1": "string", "property2": "string" }, "name": "string", "object": "string", "permission_count": 0, "permissions": [ "string" ], "resource_id": "string", "resource_type": "string", "type": "system", "updated_at": "string" } ], "object": "string", "pagination": { "limit": 0, "page": 0, "total": 0, "total_pages": 0 }}