Skip to content

List protections.

Method

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

Description

Retrieves protections assigned to resources in the tenant. Use the limit and page_token query parameters to paginate through all protections.

Path params
tenant_id string required

Tenant for which to list protections.

Query params
resource_id string

ID of the resource whose protections to list.

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}/protections

Successful response (200) schema
object

ProtectionPage contains the results of listing protections.

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

object

Protection represents a policy applied to a resource.

id string

Protection ID.

resource_id string

Resource ID protected by the policy.

policy_id string

Policy ID applied by the protection.

job_id string

Job ID of the periodic (or one-off) schedule. Jobs spawn tasks.

Response example
{
  "next_page_token": "string",
  "items": [
    {
      "id": "string",
      "resource_id": "string",
      "policy_id": "string",
      "job_id": "string"
    }
  ]
}