Skip to content

Get the customization template for an OIDC subject claim for a repository

GET
/repos/{owner}/{repo}/actions/oidc/customization/sub

Gets the customization template for an OpenID Connect (OIDC) subject claim.

OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.

API method documentation

owner
required
string

The account owner of the repository. The name is not case sensitive.

repo
required
string

The name of the repository without the .git extension. The name is not case sensitive.

Status response

Media type application/json
Actions OIDC subject customization for a repository

Actions OIDC subject customization for a repository

object
use_default
required

Whether to use the default template or not. If true, the include_claim_keys field is ignored.

boolean
include_claim_keys

Array of unique strings. Each claim key can only contain alphanumeric characters and underscores.

Array<string>
use_immutable_subject

Whether the repository has opted in to the immutable OIDC subject claim format. When true, OIDC tokens will use a stable, repository-ID-based sub claim. If not set at the repository level, falls back to the organization-level setting.

boolean
sub_claim_prefix

The current sub claim prefix for this repository.

string
Examples
Example default
{
"use_default": false,
"include_claim_keys": [
"repo",
"context"
]
}

Bad Request

Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}