Skip to Content
Docs
API referenceManagement API

Groups

List groups

GET
/groups

List the instance's groups, filtered by owner (D6, D15, D44): owner_type root lists the instance's own groups, org the organizations', a resource type key that type's resources'; owner_id narrows to one owner's. Neither lists every group.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Query Parameters

owner_type?string

root, org, or the owning resource's type key

owner_id?string

One owner's prefixed id: inst_, org_ or res_

search?string

Matches the name

external_id?string

An identity provider's id for the group

page?integer

Page number

limit?integer

Items per page

sort?string

Sort field; prefix with - for descending. Allowed: created_at, updated_at, name. Default: -created_at

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/groups'
Example Response
{  "data": [    {      "created_at": "string",      "external_id": "string",      "id": "string",      "member_count": 0,      "metadata": {        "property1": "string",        "property2": "string"      },      "name": "string",      "object": "string",      "owner_id": "string",      "owner_type": "string",      "updated_at": "string"    }  ],  "object": "string",  "pagination": {    "limit": 0,    "page": 0,    "total": 0,    "total_pages": 0  }}

Create a group

POST
/groups

Create a group, owned by the instance root, an organization or a resource (D5, D6, D44): owner_type is root (the default), org or the owning resource's type key, owner_id its prefixed id (org_, res_; for root the inst_ id or empty). An instance group (root) holds any of the instance's users and is granted roles only on the instance root and resources in no organization; an organization's is a set of its members granted on the organization or its resources; a resource's holds its organization's members and is granted only on the resource and the resources beneath it.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Request Body

Group

application/json
  1. body

Group

external_id?string

ExternalID is an identity provider's id for the group, unique in its owner.

metadata?

Metadata replaces the group's metadata when set.

name*string
owner_id?string

OwnerID is the owner's prefixed id: org_ or res_; for root the inst_ id or empty.

owner_type?string

OwnerType is root (the default), org, or the owning resource's type key, which must be that resource's type.

Response Body

Created

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

Metadata replaces the group's metadata when set.

name?string
object?string
owner_id?string

OwnerID is the owner's prefixed id: inst_, org_ or res_.

owner_type?string

OwnerType is the owner's resource-type key: root, org, or the owning resource's type key.

updated_at?string
Example Request
curl -X POST 'https://api.us.pontive.com/v1/groups' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
Example Response
{  "created_at": "string",  "external_id": "string",  "id": "string",  "member_count": 0,  "metadata": {    "property1": "string",    "property2": "string"  },  "name": "string",  "object": "string",  "owner_id": "string",  "owner_type": "string",  "updated_at": "string"}

Get a group

GET
/groups/{group_id}

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

group_id*string

Group ID

Response Body

OK

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

Metadata replaces the group's metadata when set.

name?string
object?string
owner_id?string

OwnerID is the owner's prefixed id: inst_, org_ or res_.

owner_type?string

OwnerType is the owner's resource-type key: root, org, or the owning resource's type key.

updated_at?string
Example Request
curl -X GET 'https://api.us.pontive.com/v1/groups/string'
Example Response
{  "created_at": "string",  "external_id": "string",  "id": "string",  "member_count": 0,  "metadata": {    "property1": "string",    "property2": "string"  },  "name": "string",  "object": "string",  "owner_id": "string",  "owner_type": "string",  "updated_at": "string"}

Update a group

PATCH
/groups/{group_id}

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

group_id*string

Group ID

Request Body

Changes

application/json
  1. body

Changes

external_id?string

ExternalID, when set, replaces it; an empty string clears it.

metadata?

Metadata replaces the group's metadata when set.

name?string

Response Body

OK

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

Metadata replaces the group's metadata when set.

name?string
object?string
owner_id?string

OwnerID is the owner's prefixed id: inst_, org_ or res_.

owner_type?string

OwnerType is the owner's resource-type key: root, org, or the owning resource's type key.

updated_at?string
Example Request
curl -X PATCH 'https://api.us.pontive.com/v1/groups/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "created_at": "string",  "external_id": "string",  "id": "string",  "member_count": 0,  "metadata": {    "property1": "string",    "property2": "string"  },  "name": "string",  "object": "string",  "owner_id": "string",  "owner_type": "string",  "updated_at": "string"}

Delete a group

DELETE
/groups/{group_id}

Delete a group with its members and grants. Its members lose what the group gave them.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

group_id*string

Group ID

Response Body

No Content

Example Request
curl -X DELETE 'https://api.us.pontive.com/v1/groups/string'
Example Response
Empty

List a group's members

GET
/groups/{group_id}/members

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

group_id*string

Group ID

Query Parameters

search?string

Matches email and 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/groups/string/members'
Example Response
{  "data": [    {      "group_id": "string",      "joined_at": "string",      "object": "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 members to a group

POST
/groups/{group_id}/members

Add users to a group. Each must be a member of the group's organization (user_not_in_organization); one already in the group is left as they are.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

group_id*string

Group ID

Request Body

Users

application/json
  1. body

Users

user_ids*array<string>

Each must be a member of the group's organization; an instance group takes any of the instance's users.

Response Body

OK

application/json
  1. response
added?integer

How many were added; users already in the group are not counted.

Example Request
curl -X POST 'https://api.us.pontive.com/v1/groups/string/members' \  -H 'Content-Type: application/json' \  -d '{  "user_ids": [    "string"  ]}'
Example Response
{  "added": 0}
DELETE
/groups/{group_id}/members/{user_id}

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

group_id*string

Group ID

user_id*string

User ID

Response Body

No Content

Example Request
curl -X DELETE 'https://api.us.pontive.com/v1/groups/string/members/string'
Example Response
Empty

List a group's roles

GET
/groups/{group_id}/roles

List the roles a group holds, per resource

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

group_id*string

Group ID

Query Parameters

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/groups/string/roles'
Example Response
{  "data": [    {      "group_id": "string",      "object": "string",      "resource_id": "string",      "resource_type": "string",      "roles": [        "string"      ]    }  ],  "object": "string",  "pagination": {    "limit": 0,    "page": 0,    "total": 0,    "total_pages": 0  }}
PUT
/groups/{group_id}/roles

Replace the roles a group holds on one resource — its organization, or a resource of it (resource_not_in_organization) — with roles of that resource's type. No roles removes the grant.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

group_id*string

Group ID

Request Body

Grant

application/json
  1. body

Grant

resource_id*string

ResourceID is org_…, res_…, or for the root the instance id (inst_…) or the alias "root".

resource_type*string
roles?array<string>

Response Body

OK

application/json
  1. response
group_id?string
object?string
resource_id?string
resource_type?string
roles?array<string>
Example Request
curl -X PUT 'https://api.us.pontive.com/v1/groups/string/roles' \  -H 'Content-Type: application/json' \  -d '{  "resource_id": "string",  "resource_type": "string"}'
Example Response
{  "group_id": "string",  "object": "string",  "resource_id": "string",  "resource_type": "string",  "roles": [    "string"  ]}
GET
/organizations/{organization}/group-roles

The groups holding roles on an organization itself, each with its roles there (api-route-review D43). A group holding roles only on the organization's resources is not listed; the groups the organization owns are GET /groups?owner_type=org&owner_id=….

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

organization*string

The organization's id, or its slug

Query Parameters

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/organizations/string/group-roles'
Example Response
{  "data": [    {      "group_id": "string",      "object": "string",      "resource_id": "string",      "resource_type": "string",      "roles": [        "string"      ]    }  ],  "object": "string",  "pagination": {    "limit": 0,    "page": 0,    "total": 0,    "total_pages": 0  }}
GET
/resources/{resource_id}/group-roles

The groups holding roles on a resource, whoever owns them, each with its roles there (api-route-review D43). The groups the resource owns are GET /groups?owner_type=&owner_id=….

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Path Parameters

resource_id*string

Resource ID

Query Parameters

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/string/group-roles'
Example Response
{  "data": [    {      "group_id": "string",      "object": "string",      "resource_id": "string",      "resource_type": "string",      "roles": [        "string"      ]    }  ],  "object": "string",  "pagination": {    "limit": 0,    "page": 0,    "total": 0,    "total_pages": 0  }}
GET
/root/group-roles

The groups holding roles on the instance root, each with its roles there (api-route-review D43): the read edge from the other side of GET /groups/{group_id}/roles. The groups the root owns are GET /groups?owner_type=root.

Authorization

headerx-pontive-instance-id<token>

Instance ID for the request

Query Parameters

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/root/group-roles'
Example Response
{  "data": [    {      "group_id": "string",      "object": "string",      "resource_id": "string",      "resource_type": "string",      "roles": [        "string"      ]    }  ],  "object": "string",  "pagination": {    "limit": 0,    "page": 0,    "total": 0,    "total_pages": 0  }}