v4

latestOpenAPI 3.1.02026-08-02261331761.5 KB
Tenants

Get Tenant

Gets a tenant, if such tenant exists. Otherwise returns 404.

get/v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}

Path parameters

tenant_idstring required

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

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

proj_idstring required

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

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").

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

Response

Successful Response

keystring required

A unique id by which Permit will identify the tenant. The tenant key must be url-friendly (slugified).

idstring uuid required

Unique id of the tenant

organization_idstring uuid required

Unique id of the organization that the tenant belongs to.

project_idstring uuid required

Unique id of the project that the tenant belongs to.

environment_idstring uuid required

Unique id of the environment that the tenant belongs to.

created_atstring date-time required

Date and time when the tenant was created (ISO_8601 format).

updated_atstring date-time required

Date and time when the tenant was last updated/modified (ISO_8601 format).

last_action_atstring date-time required

Date and time when the tenant was last active (ISO_8601 format). In other words, this is the last time a permission check was done on a resource belonging to this tenant.

namestring required

A descriptive name for the tenant

descriptionstring

an optional longer description of the tenant

attributesobject

Arbitraty tenant attributes that will be used to enforce attribute-based access control policies.

Example response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
  "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
  "environment_id": "40ef0e48-a11f-4963-a229-e396c9f7e7c4",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "last_action_at": "2019-08-24T14:15:22Z",
  "key": "stripeinc",
  "name": "Stripe Inc",
  "attributes": {
    "allowed_locations": [
      "US",
      "CA"
    ]
  }
}