Skip to main content
POST
cURL
Workload identity federation is in Private Preview.

Authorizations

Authorization
string
header
required

Send Authorization: Bearer <api_key>. The legacy Authorization: Api-Key <api_key> scheme is also accepted.

Body

application/json

Request to check a trust rule's condition and audience before saving them.

identity_provider_id
string
required

The identity provider the rule is for, which decides the claims it must pin

condition
string
required

A CEL expression over the token's claims that must evaluate to true. It must pin a specific claims.sub in a top-level && clause, plus any provider-required checks. Up to 4,096 characters.

Example:

"claims.repository_owner_id == '12345' && claims.sub.startsWith('repo:acme/models:') && claims.ref == 'refs/heads/main'"

audience
string
required

The token's aud must equal this, or contain it when aud is a list. Up to 1,024 characters.

Response

200 - application/json

Whether a create request would pass the checks the server runs on it.

valid
boolean
required

Whether the input passes every check

error
string | null

Why the input fails, as creating it would report. Null when it's valid.