Skip to content

List resources

Method

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

Description

Get a list of resources available for the tenant. To list all available resources use 'limit' and 'page_token' as query parameters.

Path params
tenant_id string required

Tenant to get the list of all resources from.

Query params
limit int32

Max number of items to return on a single page.

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

Successful response (200) schema
object

ResourcePage is a result of listing resources.

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

object

Resource describes a single resource object.

id string

Unique ID of the resource.

external_id string

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

tenant_id string

Tenant where the resource belongs to.

name string

Resource name: user and email for Google Workspace/Microsoft 365 users, name for Shared Drives, etc.

kind string

Resource kind, e.g. office_user or office_teamdrive, etc.

archived boolean

Archived attribute, true for no longer backupable resources, e.g. deleted ones.

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