Skip to main content
POST
/
v1
/
regions
/
global
/
auth
/
check
Check permissions
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    checks: [{action: 'compute.instances.create', resource: 'proj-abc123'}],
    subject: 'user-xyz789'
  })
};

fetch('https://api.k0rdent.ai/v1/regions/global/auth/check', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "results": [
    {
      "allowed": true
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer token authentication using OAuth2/OIDC tokens

Body

application/json
checks
object[]
required

List of permission checks to evaluate. Each check specifies an action and a target resource. Maximum 100 checks per request.

Required array length: 1 - 100 elements
subject
string

Principal to evaluate. Can be a user ID, API key ID, or service account clientId. If omitted, defaults to the authenticated caller. Only tenant administrators can specify a subject other than themselves.

Example:

"user-xyz789"

Response

Permission check results.

results
object[]
required

Positional results — results[i] corresponds to checks[i] in the request.