Skip to Content
Docs
API referenceManagement API

Resources

List resources

GET
/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.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Query Parameters

resource_type?string

Filter by resource type

organization_id?string

Only resources belonging to this organization

instance_level?boolean

Only resources in no organization: the instance's own. Exclusive with organization_id

parent_id?string

Only the direct children of this organization or resource, or of the instance root (its instance id, or root)

external_id?string

Exact match on the id the caller gave the resource

search?string

Free text matched against the name and the external id, case-insensitively

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/resources'
Example Response
{  "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  }}

Create resource

POST
/resources

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.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Request Body

Resource creation details

application/json
  1. body

Resource creation details

external_id?string
metadata?

Metadata replaces the resource's metadata when set.

name?string
organization_id?string
parent?

Parent is always set.

resource_type*string

Response Body

Created

application/json
  1. response
created_at?string
external_id?string
id?string
metadata?

Metadata replaces the resource's metadata when set.

name?string
object?string
organization_id?string
parent?

Parent is always set.

resource_type?string
updated_at?string
Example Request
curl -X POST 'https://api.us.pontive.com/v1/resources' \  -H 'Content-Type: application/json' \  -d '{  "resource_type": "string"}'
Example Response
{  "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"}

Get resource

GET
/resources/{resource_id}

Retrieve a resource by its ID, with its parent.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

resource_id*string

Resource ID

Response Body

OK

application/json
  1. response
created_at?string
external_id?string
id?string
metadata?

Metadata replaces the resource's metadata when set.

name?string
object?string
organization_id?string
parent?

Parent is always set.

resource_type?string
updated_at?string
Example Request
curl -X GET 'https://api.us.pontive.com/v1/resources/string'
Example Response
{  "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"}

Update resource

PATCH
/resources/{resource_id}

Change a resource's name or metadata. Its type, external id and organization never change; its parent changes through the parent endpoints.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

resource_id*string

Resource ID

Request Body

Fields to change

application/json
  1. body

Fields to change

clear_metadata?boolean

ClearMetadata empties the metadata; metadata must then be omitted.

metadata?

Metadata replaces the resource's metadata when set.

name?string

Response Body

OK

application/json
  1. response
created_at?string
external_id?string
id?string
metadata?

Metadata replaces the resource's metadata when set.

name?string
object?string
organization_id?string
parent?

Parent is always set.

resource_type?string
updated_at?string
Example Request
curl -X PATCH 'https://api.us.pontive.com/v1/resources/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "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"}

Delete resource

DELETE
/resources/{resource_id}

Deregister a resource. One that has children is refused with 409 unless cascade=true, which also deregisters its whole subtree.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

resource_id*string

Resource ID

Query Parameters

cascade?boolean

Also deregister its whole subtree (required when it has children)

Response Body

OK

application/json
  1. response
deregistered_ids?array<string>
Example Request
curl -X DELETE 'https://api.us.pontive.com/v1/resources/string'
Example Response
{  "deregistered_ids": [    "string"  ]}

List resource members

GET
/resources/{resource_id}/members

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.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

resource_id*string

Resource ID

Query Parameters

user_ids?array<string>

Filter by user IDs

emails?array<string>

Filter by emails

roles?array<string>

Filter by roles

search?string

search query

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, joined_at, email. Default: -created_at

Response Body

OK

application/json
  1. response
data?array<>

List of members

object?string

The object type

pagination?

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

Example Request
curl -X GET 'https://api.us.pontive.com/v1/resources/string/members'
Example Response
{  "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  }}
POST
/resources/{resource_id}/members

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.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

resource_id*string

Resource ID

Request Body

Member to add

application/json
  1. body

Member to add

roles*array<string>
user_id*string

Response Body

Created

application/json
  1. response
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?array<>
updated_at?string
user?
Example Request
curl -X POST 'https://api.us.pontive.com/v1/resources/string/members' \  -H 'Content-Type: application/json' \  -d '{  "roles": [    "string"  ],  "user_id": "string"}'
Example Response
{  "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 a resource member

GET
/resources/{resource_id}/members/{user_id}

Get one member of a resource by user ID

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

resource_id*string

Resource ID

user_id*string

User ID

Response Body

OK

application/json
  1. response
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?array<>
updated_at?string
user?
Example Request
curl -X GET 'https://api.us.pontive.com/v1/resources/string/members/string'
Example Response
{  "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"  }}
PATCH
/resources/{resource_id}/members/{user_id}

Replace the roles a member holds on a resource

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

resource_id*string

Resource ID

user_id*string

User ID

Request Body

New roles

application/json
  1. body

New roles

roles*array<string>

Response Body

OK

application/json
  1. response
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?array<>
updated_at?string
user?
Example Request
curl -X PATCH 'https://api.us.pontive.com/v1/resources/string/members/string' \  -H 'Content-Type: application/json' \  -d '{  "roles": [    "string"  ]}'
Example Response
{  "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"  }}
DELETE
/resources/{resource_id}/members/{user_id}

Remove a user from a resource. Their membership of the resource's organization stays.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

resource_id*string

Resource ID

user_id*string

User ID

Response Body

No Content

Example Request
curl -X DELETE 'https://api.us.pontive.com/v1/resources/string/members/string'
Example Response
Empty
PUT
/resources/{resource_id}/parent

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.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

resource_id*string

Resource ID

Request Body

The parent

application/json
  1. body

The parent

resource_id*string

The parent: org_…, res_…, or the instance root (its instance id, or "root").

Response Body

OK

application/json
  1. response
created_at?string
external_id?string
id?string
metadata?

Metadata replaces the resource's metadata when set.

name?string
object?string
organization_id?string
parent?

Parent is always set.

resource_type?string
updated_at?string
Example Request
curl -X PUT 'https://api.us.pontive.com/v1/resources/string/parent' \  -H 'Content-Type: application/json' \  -d '{  "resource_id": "string"}'
Example Response
{  "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"}