Skip to Content
Docs
API referenceManagement API

Roles

GET
/authz/resource-types/{resource_type}/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.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

resource_type*string

Resource type key

Query Parameters

inheritable_from?string

A parent type: list its roles this type's roles may inherit

type?string

Filter by role type (system, custom)

name?string

Filter by role name (partial match)

resource_id?string

Also include this organization instance's own instance-scoped roles

include_instance_scoped?boolean

Include every instance-scoped role alongside type-scoped ones (ignored when resource_id is set)

assignable_only?boolean

Only roles that may be assigned directly

agent_assignable_only?boolean

Only roles an agent may hold

permission?string

Filter by permission name

page?integer

Page number

limit?integer

Items per page

Response Body

OK

application/json
  1. response
data?array<>
object?string
pagination?

Pagination is the page answered (api-route-review D9).

Example Request
curl -X GET 'https://api.us.pontive.com/v1/authz/resource-types/string/roles'
Example Response
{  "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 custom role

POST
/authz/resource-types/{resource_type}/roles

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.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

resource_type*string

resource_type

Request Body

Create Role Request

application/json
  1. body

Create Role Request

agent_assignable?boolean

AgentAssignable sets whether an agent may hold the role; omitted is true (pontive-spec 45 §6.2).

description?string
inheritance?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?boolean

InheritedOnly makes the role held only through a parent role, never assigned directly. Requires inheritance; not on the root type.

key*string
metadata?
name?string
permissions?array<string>
resource_id?string

ResourceID, when set, creates an instance-scoped role bound to this organization. Optional and immutable; omit for a type-scoped role (the default).

Response Body

Created

application/json
  1. response
agent_assignable?boolean

AgentAssignable: 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?integer
created_at?string
description?string
inheritance?array<>
inherited_only?boolean

InheritedOnly: 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?string
metadata?
name?string
object?string
permission_count?integer
permissions?array<string>
resource_id?string
resource_type?string
type?string
Value in"system""custom"
updated_at?string
Example Request
curl -X POST 'https://api.us.pontive.com/v1/authz/resource-types/string/roles' \  -H 'Content-Type: application/json' \  -d '{  "key": "string"}'
Example Response
{  "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 role details

GET
/authz/resource-types/{resource_type}/roles/{role_key}

Get a role by key and resource_type. Returns name, description, resource_type, type, permissions, metadata, created_at, updated_at, assignment_count, permission_count.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

resource_type*string

Role resource type

role_key*string

Role Key

Response Body

OK

application/json
  1. response
agent_assignable?boolean

AgentAssignable: 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?integer
created_at?string
description?string
inheritance?array<>
inherited_only?boolean

InheritedOnly: 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?string
metadata?
name?string
object?string
permission_count?integer
permissions?array<string>
resource_id?string
resource_type?string
type?string
Value in"system""custom"
updated_at?string
Example Request
curl -X GET 'https://api.us.pontive.com/v1/authz/resource-types/string/roles/string'
Example Response
{  "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 custom role

PATCH
/authz/resource-types/{resource_type}/roles/{role_key}

Update a custom role. Can update: description, name, permissions, metadata. Cannot update: key (immutable), resource_type (immutable). System roles cannot be updated.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

resource_type*string

Role resource type

role_key*string

Role Key

Header Parameters

If-Match?string

The ETag the document was read with: a stale one is refused 412 precondition_failed (D42)

Request Body

Update Role Request

application/json
  1. body

Update Role Request

agent_assignable?boolean

AgentAssignable, 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?string
inheritance?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?boolean

InheritedOnly, 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?string
permissions?array<string>

Response Body

OK

application/json
  1. response
agent_assignable?boolean

AgentAssignable: 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?integer
created_at?string
description?string
inheritance?array<>
inherited_only?boolean

InheritedOnly: 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?string
metadata?
name?string
object?string
permission_count?integer
permissions?array<string>
resource_id?string
resource_type?string
type?string
Value in"system""custom"
updated_at?string
Example Request
curl -X PATCH 'https://api.us.pontive.com/v1/authz/resource-types/string/roles/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "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 custom role

DELETE
/authz/resource-types/{resource_type}/roles/{role_key}

Delete a custom role. System roles cannot be deleted. Returns 204 No Content on success.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

resource_type*string

Role resource type

role_key*string

Role Key

Query Parameters

force?boolean

Force delete (bypass confirmation when role is in use)

Header Parameters

If-Match?string

The ETag the document was read with: a stale one is refused 412 precondition_failed (D42)

Response Body

No Content

Example Request
curl -X DELETE 'https://api.us.pontive.com/v1/authz/resource-types/string/roles/string'
Example Response
Empty

List roles

GET
/authz/roles

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).

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Query Parameters

type?string

Filter by role type (system, custom)

name?string

Filter by role name (partial match)

resource_type?string

Filter by resource type

resource_id?string

Also include this organization instance's own instance-scoped roles

include_instance_scoped?boolean

Include every instance-scoped role alongside type-scoped ones (ignored when resource_id is set)

assignable_only?boolean

Only roles that may be assigned directly: drops inherited-only roles. What a role picker asks for

agent_assignable_only?boolean

Only roles an agent may hold (agent_assignable): what an agent's role picker asks for

permission?string

Filter by permission name

page?integer

Page number

limit?integer

Items per page

sort?string

Sort field; prefix with - for descending (e.g. -created_at). Allowed: created_at, updated_at, name, key. Default: -created_at

search?string

Search query

Response Body

OK

application/json
  1. response
data?array<>
object?string
pagination?

Pagination is the page answered (api-route-review D9).

Example Request
curl -X GET 'https://api.us.pontive.com/v1/authz/roles'
Example Response
{  "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  }}