Skip to content

List protections

Method

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

Description

Get a list of protections assigned to tenant resource(s). To list all available protections use 'limit' and 'page_token' as query parameters.

Path params
tenant_id string required

Tenant for which to get the list of all protections.

Query params
resource_id string

ID of the resource to list protections for.

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

Successful response (200) schema
object

Protection is a result of listing protections.

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

object

Protection describes the relation between resources and policies, i.e. a policies applied to the resource.

id string

Protection ID.

resource_id string

Resource ID protected by the policy.

policy_id string

Policy ID applied by protection.

job_id string

Job ID describing a periodic (or one-shot) schedule. Jobs spawn tasks.

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