Skip to main content
POST
/
v1
/
tenants
/
{tenant_id}
/
permissions
/
bulk-check
bulk check api
curl --request POST \
  --url https://api.example.com/v1/tenants/{tenant_id}/permissions/bulk-check \
  --header 'Content-Type: application/json' \
  --data '
{
  "metadata": {
    "schema_version": "<string>",
    "snap_token": "<string>",
    "depth": 123
  },
  "items": [
    {
      "entity": {
        "type": "<string>",
        "id": "<string>"
      },
      "permission": "<string>",
      "subject": {
        "type": "<string>",
        "id": "<string>",
        "relation": "<string>"
      }
    }
  ],
  "context": {
    "tuples": [
      {
        "entity": {
          "type": "<string>",
          "id": "<string>"
        },
        "relation": "<string>",
        "subject": {
          "type": "<string>",
          "id": "<string>",
          "relation": "<string>"
        }
      }
    ],
    "attributes": [
      {
        "entity": {
          "type": "<string>",
          "id": "<string>"
        },
        "attribute": "<string>",
        "value": {
          "@type": "<string>"
        }
      }
    ],
    "data": {}
  },
  "arguments": [
    {
      "computedAttribute": {
        "name": "<string>"
      }
    }
  ]
}
'
{
  "results": [
    {
      "can": "CHECK_RESULT_UNSPECIFIED",
      "metadata": {
        "check_count": 123
      }
    }
  ]
}
The Bulk Check API allows you to check multiple permissions in a single request, significantly reducing network overhead and improving performance when you need to verify multiple access control decisions at once. Key Benefits:
  • Check up to 100 permissions in a single API call
  • Reduce network round trips by batching multiple checks
  • All checks are evaluated against the same snapshot of your authorization data
The bulk check is particularly useful for UI permission checks, where you need to verify access for multiple resources at once (e.g., showing/hiding buttons for multiple items in a list).

Path Parameters

tenant_id
string
required

Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant t1 for this field. Required, and must match the pattern \“[a-zA-Z0-9-,]+\“, max 64 bytes.

Body

application/json

PermissionBulkCheckRequest is the request message for the BulkCheck method in the Permission service.

metadata
object

PermissionCheckRequestMetadata metadata for the PermissionCheckRequest.

items
BULK CHECK · object[]

List of permission check requests, maximum 100 items.

context
object

Context encapsulates the information related to a single operation, including the tuples involved and the associated attributes.

arguments
object[]

Additional arguments associated with this request.

Response

A successful response.

PermissionBulkCheckResponse is the response message for the BulkCheck method in the Permission service.

results
object[]

List of permission check responses corresponding to each request.