Skip to main content
POST
Create a GitHub Actions trust policy

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required
repository_owner
string
required
repository_name
string
required
role_slug
string
required
repository_id
integer<int64>
required
Required range: x >= 1
repository_owner_id
integer<int64>
required
Required range: x >= 1
ref
string | null

Exact value without wildcards.

environment
string | null

Exact value without wildcards.

job_workflow_ref
string | null

Exact value without wildcards.

allow_pull_request
boolean
default:false
scopes
string[] | null
ttl_seconds
integer
default:900
Required range: 60 <= x <= 3600

Response

Policy operation completed.

name
string
required
repository_owner
string
required
repository_name
string
required
role_slug
string
required
repository_id
integer<int64>
required
Required range: x >= 1
repository_owner_id
integer<int64>
required
Required range: x >= 1
ref
string | null
required

Exact value without wildcards.

environment
string | null
required

Exact value without wildcards.

job_workflow_ref
string | null
required

Exact value without wildcards.

allow_pull_request
boolean
default:false
required
scopes
string[] | null
required
ttl_seconds
integer
default:900
required
Required range: 60 <= x <= 3600
id
string<uuid>
required
created_at
string<date-time>
required
service_account_id
string<uuid>
required