Skip to content

List tenant resources.

Method

GET https://papi.afi.ai/api/v1/tenants/{tenant_id}/resources

Description

Retrieves resources owned by the tenant. Use the limit and page_token query parameters to paginate through all resources.

Path params
tenant_id string required

ID of the tenant whose resources to list.

Query params
limit int32

Maximum number of items to return per page.

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/tenants/{tenant_id}/resources

Successful response (200) schema
object

ResourcePage contains the results of listing resources.

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 resources.

object

Resource describes a single managed resource.

id string

Unique ID of the resource.

external_id string

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

tenant_id string

Tenant that owns the resource.

name string

Resource name (for example, a user's email for Google Workspace or Microsoft 365 tenants, or the name of a Shared Drive).

kind string

Resource kind (for example, office_user or office_teamdrive).

archived boolean

Indicates whether the resource is archived. When true, the resource can no longer be backed up (for example, if it was deleted).

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