Resources
Retrieve a paginated list of resources. Filter by resource_type, the organization they belong to (or instance_level for those in none), a parent (its direct children), and external_id, or search the name and external id by free text.
x-pontive-instance-id<token>Instance ID for the request
resource_type?stringFilter by resource type
organization_id?stringOnly resources belonging to this organization
instance_level?booleanOnly resources in no organization: the instance's own. Exclusive with organization_id
parent_id?stringOnly the direct children of this organization or resource, or of the instance root (its instance id, or root)
external_id?stringExact match on the id the caller gave the resource
search?stringFree text matched against the name and the external id, case-insensitively
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/resources'{ "data": [ { "created_at": "string", "external_id": "string", "id": "string", "metadata": { "property1": "string", "property2": "string" }, "name": "string", "object": "string", "organization_id": "string", "parent": { "resource_id": "string", "resource_type": "string" }, "resource_type": "string", "updated_at": "string" } ], "object": "string", "pagination": { "limit": 0, "page": 0, "total": 0, "total_pages": 0 }}Register an object another system owns, so members, roles and authorization can refer to it. It may belong to an organization (and is then deleted with it), and may sit under one parent — the organization it belongs to, or a resource belonging to it; for one in no organization, another such resource or the instance root (its instance id, or root) — of one of the parent types its resource type declares; roles held on the parent reach it by its type's inheritance rules. The parent is required: no resource is under nothing.
x-pontive-instance-id<token>Instance ID for the request
Resource creation details
application/json- body
Resource creation details
external_id?stringmetadata?Metadata replaces the resource's metadata when set.
name?stringorganization_id?stringparent?Parent is always set.
resource_type*stringCreated
application/json- response
created_at?stringexternal_id?stringid?stringmetadata?Metadata replaces the resource's metadata when set.
name?stringobject?stringorganization_id?stringparent?Parent is always set.
resource_type?stringupdated_at?stringcurl -X POST 'https://api.us.pontive.com/v1/resources' \ -H 'Content-Type: application/json' \ -d '{ "resource_type": "string"}'{ "created_at": "string", "external_id": "string", "id": "string", "metadata": { "property1": "string", "property2": "string" }, "name": "string", "object": "string", "organization_id": "string", "parent": { "resource_id": "string", "resource_type": "string" }, "resource_type": "string", "updated_at": "string"}Retrieve a resource by its ID, with its parent.
x-pontive-instance-id<token>Instance ID for the request
resource_id*stringResource ID
OK
application/json- response
created_at?stringexternal_id?stringid?stringmetadata?Metadata replaces the resource's metadata when set.
name?stringobject?stringorganization_id?stringparent?Parent is always set.
resource_type?stringupdated_at?stringcurl -X GET 'https://api.us.pontive.com/v1/resources/string'{ "created_at": "string", "external_id": "string", "id": "string", "metadata": { "property1": "string", "property2": "string" }, "name": "string", "object": "string", "organization_id": "string", "parent": { "resource_id": "string", "resource_type": "string" }, "resource_type": "string", "updated_at": "string"}Change a resource's name or metadata. Its type, external id and organization never change; its parent changes through the parent endpoints.
x-pontive-instance-id<token>Instance ID for the request
resource_id*stringResource ID
Fields to change
application/json- body
Fields to change
clear_metadata?booleanClearMetadata empties the metadata; metadata must then be omitted.
metadata?Metadata replaces the resource's metadata when set.
name?stringOK
application/json- response
created_at?stringexternal_id?stringid?stringmetadata?Metadata replaces the resource's metadata when set.
name?stringobject?stringorganization_id?stringparent?Parent is always set.
resource_type?stringupdated_at?stringcurl -X PATCH 'https://api.us.pontive.com/v1/resources/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "created_at": "string", "external_id": "string", "id": "string", "metadata": { "property1": "string", "property2": "string" }, "name": "string", "object": "string", "organization_id": "string", "parent": { "resource_id": "string", "resource_type": "string" }, "resource_type": "string", "updated_at": "string"}Deregister a resource. One that has children is refused with 409 unless cascade=true, which also deregisters its whole subtree.
x-pontive-instance-id<token>Instance ID for the request
resource_id*stringResource ID
cascade?booleanAlso deregister its whole subtree (required when it has children)
OK
application/json- response
deregistered_ids?array<string>curl -X DELETE 'https://api.us.pontive.com/v1/resources/string'{ "deregistered_ids": [ "string" ]}List the users holding roles on a resource itself. Users who reach it only by inheritance from a parent are not members and are not listed.
x-pontive-instance-id<token>Instance ID for the request
resource_id*stringResource ID
user_ids?array<string>Filter by user IDs
emails?array<string>Filter by emails
roles?array<string>Filter by roles
search?stringsearch query
page?integerPage number
limit?integerItems per page
sort?stringSort field; prefix with - for descending (e.g. -created_at). Allowed: created_at, updated_at, joined_at, email. Default: -created_at
OK
application/json- response
data?array<>List of members
object?stringThe object type
pagination?Pagination is the page answered (api-route-review D9).
curl -X GET 'https://api.us.pontive.com/v1/resources/string/members'{ "data": [ { "created_at": "string", "instance_id": "string", "joined_at": "string", "last_active_at": "string", "object": "string", "resource_id": "string", "resource_name": "string", "resource_type": "string", "roles": [ { "key": "string", "name": "string" } ], "updated_at": "string", "user": { "email": "string", "email_verified": true, "family_name": "string", "given_name": "string", "id": "string", "name": "string", "picture": "string", "status": "string", "username": "string" } } ], "object": "string", "pagination": { "limit": 0, "page": 0, "total": 0, "total_pages": 0 }}Add a user to a resource with roles of the resource's type. A user who is not a member of the resource's organization joins it too, with the membership settings' roles_on_join (none by default). A user who would take the organization past its member limit is refused 409 seat_limit_reached, and nothing is written.
x-pontive-instance-id<token>Instance ID for the request
resource_id*stringResource ID
Member to add
application/json- body
Member to add
roles*array<string>user_id*stringCreated
application/json- response
created_at?stringinstance_id?stringjoined_at?stringlast_active_at?stringobject?stringresource_id?stringresource_name?stringresource_type?stringroles?array<>updated_at?stringuser?curl -X POST 'https://api.us.pontive.com/v1/resources/string/members' \ -H 'Content-Type: application/json' \ -d '{ "roles": [ "string" ], "user_id": "string"}'{ "created_at": "string", "instance_id": "string", "joined_at": "string", "last_active_at": "string", "object": "string", "resource_id": "string", "resource_name": "string", "resource_type": "string", "roles": [ { "key": "string", "name": "string" } ], "updated_at": "string", "user": { "email": "string", "email_verified": true, "family_name": "string", "given_name": "string", "id": "string", "name": "string", "picture": "string", "status": "string", "username": "string" }}Get one member of a resource by user ID
x-pontive-instance-id<token>Instance ID for the request
resource_id*stringResource ID
user_id*stringUser ID
OK
application/json- response
created_at?stringinstance_id?stringjoined_at?stringlast_active_at?stringobject?stringresource_id?stringresource_name?stringresource_type?stringroles?array<>updated_at?stringuser?curl -X GET 'https://api.us.pontive.com/v1/resources/string/members/string'{ "created_at": "string", "instance_id": "string", "joined_at": "string", "last_active_at": "string", "object": "string", "resource_id": "string", "resource_name": "string", "resource_type": "string", "roles": [ { "key": "string", "name": "string" } ], "updated_at": "string", "user": { "email": "string", "email_verified": true, "family_name": "string", "given_name": "string", "id": "string", "name": "string", "picture": "string", "status": "string", "username": "string" }}Replace the roles a member holds on a resource
x-pontive-instance-id<token>Instance ID for the request
resource_id*stringResource ID
user_id*stringUser ID
New roles
application/json- body
New roles
roles*array<string>OK
application/json- response
created_at?stringinstance_id?stringjoined_at?stringlast_active_at?stringobject?stringresource_id?stringresource_name?stringresource_type?stringroles?array<>updated_at?stringuser?curl -X PATCH 'https://api.us.pontive.com/v1/resources/string/members/string' \ -H 'Content-Type: application/json' \ -d '{ "roles": [ "string" ]}'{ "created_at": "string", "instance_id": "string", "joined_at": "string", "last_active_at": "string", "object": "string", "resource_id": "string", "resource_name": "string", "resource_type": "string", "roles": [ { "key": "string", "name": "string" } ], "updated_at": "string", "user": { "email": "string", "email_verified": true, "family_name": "string", "given_name": "string", "id": "string", "name": "string", "picture": "string", "status": "string", "username": "string" }}Remove a user from a resource. Their membership of the resource's organization stays.
x-pontive-instance-id<token>Instance ID for the request
resource_id*stringResource ID
user_id*stringUser ID
No Content
curl -X DELETE 'https://api.us.pontive.com/v1/resources/string/members/string'Set the resource's parent, replacing the one it had: a move, with its subtree. The parent is the organization the resource belongs to, or a resource belonging to it; for a resource in no organization, another such resource or the instance root, by its instance id or root — of one of the parent types the resource's type declares. Roles held on the parent then reach the resource. A move that would make the resource its own ancestor is refused with 409, one that would nest it more than 8 levels deep with 400. Setting the parent it already has succeeds.
x-pontive-instance-id<token>Instance ID for the request
resource_id*stringResource ID
The parent
application/json- body
The parent
resource_id*stringThe parent: org_…, res_…, or the instance root (its instance id, or "root").
OK
application/json- response
created_at?stringexternal_id?stringid?stringmetadata?Metadata replaces the resource's metadata when set.
name?stringobject?stringorganization_id?stringparent?Parent is always set.
resource_type?stringupdated_at?stringcurl -X PUT 'https://api.us.pontive.com/v1/resources/string/parent' \ -H 'Content-Type: application/json' \ -d '{ "resource_id": "string"}'{ "created_at": "string", "external_id": "string", "id": "string", "metadata": { "property1": "string", "property2": "string" }, "name": "string", "object": "string", "organization_id": "string", "parent": { "resource_id": "string", "resource_type": "string" }, "resource_type": "string", "updated_at": "string"}