Groups

List all groups.

get/v2/schema/{proj_id}/{env_id}/groups

Request

  • Base URL
    https://api.permit.io (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Path parameters

proj_idstring required

Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").

env_idstring required

Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").

Query parameters

tenantstring

The tenant key or id to filter by

resourcestring

The resource key or id to filter by

include_total_countboolean

Include total count in response(will make the request slower)

pageinteger

Page number of the results to fetch, starting at 1.

per_pageinteger

The number of results per page (max 100).

searchstring

Text search for the object name or key

Response

Successful Response

assigned_rolesstring[]

List of roles that are assigned to this group

usersstring[]

List of user ids that are assigned to this group

group_resource_type_keystring

The key of the resource type that the group belongs to.

group_instance_keystring required

Either the unique id of the resource instance that that the group belongs to, or the URL-friendly key of the <resource_key:resource_instance_key> (i.e: file:my_file)

group_tenantstring required

The tenant key or id that the group belongs to.

Example response

[
  {
    "group_resource_type_key": "company",
    "group_instance_key": "Acme",
    "group_tenant": "business",
    "assigned_roles": [
      "rnd:backend#admin",
      "marketing:social_media#editor"
    ],
    "users": [
      "user_1",
      "user_2"
    ]
  }
]

Changes