Skip to content

List child organizations.

Method

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

Description

Lists child organizations of the specified parent organization. The root organization and its sub-organizations form a hierarchy. Each organization in the hierarchy can own tenants and resources.

Use the limit and page_token query parameters to paginate through the hierarchy.

Path params
org_id string required

ID of the parent organization whose child organizations to list.

Query params
limit int32

Maximum number of items to return per page (default 100).

page_token string

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

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

Successful response (200) schema
object

OrgsPage contains the results of listing organizations.

next_page_token string

Token for the next page in the listing operation. Set this value as `page_token` in the subsequent request. Empty on the last page.

items array of objects

List of organizations.

object

Org represents an organization.

id string

Unique ID of the organization.

external_id string

Unique external ID of the organization.

kind string

Organization kind (distributor, msp, basic).

name string

Organization name.

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