Skip to content

Get resource protection statistics.

Method

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

Description

Retrieves protection statistics for resources in the tenant, grouped by resource kind.

Path params
tenant_id string required

ID of the tenant for which to retrieve resource statistics.

curl -X GET \
    -H 'Authorization: {api-key}' \
    https://papi.afi.ai/api/v1/tenants/{tenant_id}/resources/statistics/summary

Successful response (200) schema
object

ResourceStats contains resource statistics per tenant.

tenants array of objects
object

ResourceTenantStats represents resource statistics for a single tenant.

tenant_id string

Tenant ID that owns the resources.

kind string

Tenant kind (`gsuite` for Google Workspace, `o365` for Microsoft 365, etc.).

name string

Tenant name.

resource_details array of objects

Detailed resource statistics for the tenant, aggregated per resource kind.

object

ResourceStatsDetailedEntry contains statistics per resource kind.

kind string

Resource kind.

count int32

Number of resources of this kind.

protected_count int32

Number of protected resources of this kind.

resources_total object

Aggregated information about all tenant resources.

object

ResourceStatsTotalEntry contains aggregated statistics for all resources.

count int32

Total count of resources.

protected_count int32

Total count of protected resources.

size_total int64

Total resource storage, in KB.

Response example
{
  "tenants": [
    {
      "tenant_id": "string",
      "kind": "string",
      "name": "string",
      "resource_details": [
        {
          "kind": "string",
          "count": 0,
          "protected_count": 0
        }
      ],
      "resources_total": {
        "count": 0,
        "protected_count": 0,
        "size_total": "int64-as-string"
      }
    }
  ]
}