Skip to content
Kapten
Esc
↑↓navigate↵open⌘Jpreview

Check the caller's Permissions

Answers each check for the caller, for example to show only the actions they may take. Requires being a member. Organization Permissions (organization, member, invitation, team, ac, audit) take no context. Permissions on Platform API resources are checked on the resource named by its own context ID, on the project for an environment check with only project_id, or else on the organization; a read without context is allowed when the caller can read any resource of that type in the organization. Resources outside the organization answer false.

POST/organizations/{organizationId}/permission-checks
Authorization
AuthorizationBearer token (JWT) · headerrequired

An access token issued by this service (RFC 9068), in the Authorization header as Bearer <token>.

Path parameters
organizationIdstring<uuid>required
Request body
requiredapplication/json
checkspermission_check[]required
max items 200
Show properties
Array of permission_check
permissionstringrequired

A resource:action Permission.

project_idstring<uuid>
environment_idstring<uuid>
cluster_idstring<uuid>
integration_idstring<uuid>
Responses
200

One answer per check, in order.

allowedboolean[]required
default

The request failed.

errorstringrequired

Stable machine-readable code.

Allowed:invalid_requestunauthorizedforbiddennot_foundconflictgoneunavailableinternal
messagestringrequired

Human-readable explanation.

Request
curl -X POST 'https://auth.kapten.io/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/permission-checks' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "checks": [
    {
      "permission": "string",
      "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
      "environment_id": "40ef0e48-a11f-4963-a229-e396c9f7e7c4",
      "cluster_id": "d3d1bfdf-67c4-41fa-b065-858242731616",
      "integration_id": "55d7337e-1d0a-49fc-9826-925ba40df035"
    }
  ]
}'
Response
{
  "allowed": [
    true
  ]
}

Was this page helpful?