Skip to content

List organization tenants

Method

GET https://papi.afi.ai/api/v1/orgs/{org_id}/tenants

Description

List organization tenants by organization ID. To list all available organizations, use 'limit' and 'page_token' as query parameters.

Path params
org_id string required

ID of the organization to list tenants for.

Query params
limit int32

Max number of items to return on a single page (default 100).

page_token string

Token from the previous list operation (next_page_token) to continue listing.

curl -X GET \
    -H 'Authorization: {api-key}' \
    https://papi.afi.ai/api/v1/orgs/{org_id}/tenants

Successful response (200) schema
object

TenantsPage is a result of listing orngaization tenants.

next_page_token string

Next page token to continue listing operation, i.e. to be set as next request page_token. Empty on last page.

items array of objects

Array of tenants.

object

Tenant describes single tenant object.

id string

Unique ID of the tenant.

external_id string

External (Google Workspace, Microsoft 365, etc.) ID of the tenant.

kind string

Kind of the tenant (gsuite for Google Workspace, o365 for Microsoft 365 etc.).

name string

Tenant name. Domain name for Google Workspace/Microsoft 365 tenants.

region string

Region where tenant resides in. 2 letter country or territory code in accordance with ISO 3166-1 alpha-2 (e.g. US, CA, AU, UK, EU etc.).

deleted boolean

Deleted is true if tenant was terminated and can no longer be queried. Deleted tenant subscriptions has 'canceled' state.

Response example
{
  "next_page_token": "string",
  "items": [
    {
      "id": "string",
      "external_id": "string",
      "kind": "string",
      "name": "string",
      "region": "string",
      "deleted": true
    }
  ]
}