Resource types
List the instance's resource types: the reserved root and org types (org in b2b instances only), and the custom types.
x-pontive-instance-id<token>Instance ID for the request
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
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'{ "data": [ { "created_at": "string", "description": "string", "instance_id": "string", "key": "string", "name": "string", "object": "string", "parents": [ "string" ], "policy": { "allow_members_to_leave": true, "invitation_expiry_days": 0, "roles_on_join": [ "string" ] }, "reserved": true, "updated_at": "string" } ], "object": "string", "pagination": { "limit": 0, "page": 0, "total": 0, "total_pages": 0 }}Register a resource type in the instance's registry. Only custom types can be created: root and org are reserved and seeded.
x-pontive-instance-id<token>Instance ID for the request
Create Resource Type Request
application/json- body
Create Resource Type Request
allow_members_to_leave?booleanThe membership policy. Roles on join are set once the type's roles exist.
description?stringinvitation_expiry_days?integerkey*stringname?stringparents?array<string>The parent type keys: at least one (parents_required). The type's shortest chain of parent types from root or org, self-references aside, is at most 8 levels (max_depth_exceeded) and must exist (cycle_detected): deeper, or with no chain, no resource of the type could ever be registered.
Created
application/json- response
created_at?stringdescription?stringinstance_id?stringkey?stringname?stringobject?stringparents?array<string>Parents are the types this type's objects may sit under: at least one on every type but root. Each is one edge, whose relation in the authorization model is the parent's key.
policy?Policy is a custom type's membership policy; defaults on the reserved types.
reserved?booleanReserved is true for the seeded root and org types: they cannot be deleted, and only their name and description change.
updated_at?stringcurl -X POST 'https://api.us.pontive.com/v1/authz/resource-types' \ -H 'Content-Type: application/json' \ -d '{ "key": "string"}'{ "created_at": "string", "description": "string", "instance_id": "string", "key": "string", "name": "string", "object": "string", "parents": [ "string" ], "policy": { "allow_members_to_leave": true, "invitation_expiry_days": 0, "roles_on_join": [ "string" ] }, "reserved": true, "updated_at": "string"}Get a resource type by its key.
x-pontive-instance-id<token>Instance ID for the request
resource_type*stringResource type key
OK
application/json- response
created_at?stringdescription?stringinstance_id?stringkey?stringname?stringobject?stringparents?array<string>Parents are the types this type's objects may sit under: at least one on every type but root. Each is one edge, whose relation in the authorization model is the parent's key.
policy?Policy is a custom type's membership policy; defaults on the reserved types.
reserved?booleanReserved is true for the seeded root and org types: they cannot be deleted, and only their name and description change.
updated_at?stringcurl -X GET 'https://api.us.pontive.com/v1/authz/resource-types/string'{ "created_at": "string", "description": "string", "instance_id": "string", "key": "string", "name": "string", "object": "string", "parents": [ "string" ], "policy": { "allow_members_to_leave": true, "invitation_expiry_days": 0, "roles_on_join": [ "string" ] }, "reserved": true, "updated_at": "string"}Update a resource type. Cannot update: key (immutable). The reserved root and org types accept only name and description.
x-pontive-instance-id<token>Instance ID for the request
resource_type*stringResource type key
If-Match?stringThe ETag the document was read with: a stale one is refused 412 precondition_failed (D42)
Update Resource Type Request
application/json- body
Update Resource Type Request
allow_members_to_leave?booleanThe membership policy fields; each omitted is left unchanged.
description?stringinvitation_expiry_days?integer0 clears it to the instance's.
name?stringparents?array<string>Replaces the parent type keys when present; an empty list is refused (parents_required), a type never loses its last parent type. The new set must leave this type, and every type under it, within 8 levels of root or org (max_depth_exceeded) and with a chain of parent types to root (cycle_detected).
roles_on_join?array<string>OK
application/json- response
created_at?stringdescription?stringinstance_id?stringkey?stringname?stringobject?stringparents?array<string>Parents are the types this type's objects may sit under: at least one on every type but root. Each is one edge, whose relation in the authorization model is the parent's key.
policy?Policy is a custom type's membership policy; defaults on the reserved types.
reserved?booleanReserved is true for the seeded root and org types: they cannot be deleted, and only their name and description change.
updated_at?stringcurl -X PATCH 'https://api.us.pontive.com/v1/authz/resource-types/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "created_at": "string", "description": "string", "instance_id": "string", "key": "string", "name": "string", "object": "string", "parents": [ "string" ], "policy": { "allow_members_to_leave": true, "invitation_expiry_days": 0, "roles_on_join": [ "string" ] }, "reserved": true, "updated_at": "string"}Delete a resource type from the registry by its key. The reserved root and organization types cannot be deleted.
x-pontive-instance-id<token>Instance ID for the request
resource_type*stringResource type key
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'