diff --git a/lib/redirects/static/client-side-rest-api-redirects.json b/lib/redirects/static/client-side-rest-api-redirects.json index 7231aafacb..c1412397a2 100644 --- a/lib/redirects/static/client-side-rest-api-redirects.json +++ b/lib/redirects/static/client-side-rest-api-redirects.json @@ -279,6 +279,8 @@ "/rest/orgs/#update-an-organization": "/rest/orgs/orgs#update-an-organization", "/rest/actions#get-github-actions-cache-usage-for-an-organization": "/rest/actions/cache#get-github-actions-cache-usage-for-an-organization", "/rest/actions#list-repositories-with-github-actions-cache-usage-for-an-organization": "/rest/actions/cache#list-repositories-with-github-actions-cache-usage-for-an-organization", + "/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization": "/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization", + "/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization": "/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization", "/rest/actions#get-github-actions-permissions-for-an-organization": "/rest/actions/permissions#get-github-actions-permissions-for-an-organization", "/rest/actions#set-github-actions-permissions-for-an-organization": "/rest/actions/permissions#set-github-actions-permissions-for-an-organization", "/rest/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization": "/rest/actions/permissions#list-selected-repositories-enabled-for-github-actions-in-an-organization", @@ -475,6 +477,8 @@ "/rest/actions#download-job-logs-for-a-workflow-run": "/rest/actions/workflow-jobs#download-job-logs-for-a-workflow-run", "/rest/actions#re-run-job-for-workflow-run": "/rest/actions/workflow-runs#re-run-job-for-workflow-run", "/rest/actions#workflow-runs": "/rest/actions/workflow-runs", + "/rest/actions/oidc#get-the-opt-out-flag-of-an-oidc-subject-claim-customization-for-a-repository": "/rest/actions/oidc#get-the-opt-out-flag-of-an-oidc-subject-claim-customization-for-a-repository", + "/rest/actions/oidc#set-the-opt-out-flag-of-an-oidc-subject-claim-customization-for-a-repository": "/rest/actions/oidc#set-the-opt-out-flag-of-an-oidc-subject-claim-customization-for-a-repository", "/rest/actions#get-github-actions-permissions-for-a-repository": "/rest/actions/permissions#get-github-actions-permissions-for-a-repository", "/rest/actions#set-github-actions-permissions-for-a-repository": "/rest/actions/permissions#set-github-actions-permissions-for-a-repository", "/rest/actions#get-workflow-access-level-to-a-repository": "/rest/actions/permissions#get-workflow-access-level-to-a-repository", diff --git a/lib/rest/static/apps/enabled-for-apps.json b/lib/rest/static/apps/enabled-for-apps.json index d70d3b7893..5bacb19b3a 100644 --- a/lib/rest/static/apps/enabled-for-apps.json +++ b/lib/rest/static/apps/enabled-for-apps.json @@ -37,6 +37,18 @@ "verb": "get", "requestPath": "/orgs/{org}/actions/cache/usage-by-repository" }, + { + "slug": "get-the-customization-template-for-an-oidc-subject-claim-for-an-organization", + "subcategory": "oidc", + "verb": "get", + "requestPath": "/orgs/{org}/actions/oidc/customization/sub" + }, + { + "slug": "set-the-customization-template-for-an-oidc-subject-claim-for-an-organization", + "subcategory": "oidc", + "verb": "put", + "requestPath": "/orgs/{org}/actions/oidc/customization/sub" + }, { "slug": "get-github-actions-permissions-for-an-organization", "subcategory": "permissions", @@ -361,6 +373,18 @@ "verb": "post", "requestPath": "/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun" }, + { + "slug": "get-the-opt-out-flag-of-an-oidc-subject-claim-customization-for-a-repository", + "subcategory": "oidc", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/actions/oidc/customization/sub" + }, + { + "slug": "set-the-opt-out-flag-of-an-oidc-subject-claim-customization-for-a-repository", + "subcategory": "oidc", + "verb": "put", + "requestPath": "/repos/{owner}/{repo}/actions/oidc/customization/sub" + }, { "slug": "get-github-actions-permissions-for-a-repository", "subcategory": "permissions", diff --git a/lib/rest/static/decorated/api.github.com.json b/lib/rest/static/decorated/api.github.com.json index 605d1e0747..ccf06ecd7d 100644 --- a/lib/rest/static/decorated/api.github.com.json +++ b/lib/rest/static/decorated/api.github.com.json @@ -1717,6 +1717,317 @@ "description": "

No Content

" } ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/orgs/{org}/actions/oidc/customization/sub", + "title": "Get the customization template for an OIDC subject claim for an organization", + "category": "actions", + "subcategory": "oidc", + "parameters": [ + { + "name": "org", + "description": "

The organization name. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [], + "enabledForGitHubApps": true, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

A JSON serialized template for OIDC subject claim customization

", + "example": { + "include_claim_keys": [ + "repo", + "context" + ] + }, + "schema": { + "title": "Actions OIDC Subject customization", + "description": "Actions OIDC Subject customization", + "type": "object", + "properties": { + "include_claim_keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "include_claim_keys" + ] + } + } + } + ], + "previews": [], + "descriptionHTML": "

Gets the customization template for an OpenID Connect (OIDC) subject claim.\nYou must authenticate using an access token with the read:org scope to use this endpoint.\nGitHub Apps must have the organization_administration:write permission to use this endpoint.

", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

A JSON serialized template for OIDC subject claim customization

" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "put", + "requestPath": "/orgs/{org}/actions/oidc/customization/sub", + "title": "Set the customization template for an OIDC subject claim for an organization", + "category": "actions", + "subcategory": "oidc", + "parameters": [ + { + "name": "org", + "description": "

The organization name. The name is not case sensitive.

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [ + { + "type": "array of strings", + "items": { + "type": "string" + }, + "name": "include_claim_keys", + "in": "body", + "rawType": "array", + "description": "", + "isRequired": true, + "childParamsGroups": [] + } + ], + "enabledForGitHubApps": true, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "include_claim_keys": [ + "repo", + "context" + ] + }, + "parameters": { + "org": "ORG" + } + }, + "response": { + "statusCode": "201", + "contentType": "application/json", + "description": "

Empty response

", + "example": null, + "schema": { + "title": "Empty Object", + "description": "An object without any properties.", + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + ], + "previews": [], + "descriptionHTML": "

Creates or updates the customization template for an OpenID Connect (OIDC) subject claim.\nYou must authenticate using an access token with the write:org scope to use this endpoint.\nGitHub Apps must have the admin:org permission to use this endpoint.

", + "statusCodes": [ + { + "httpStatusCode": "201", + "description": "

Empty response

" + }, + { + "httpStatusCode": "403", + "description": "

Forbidden

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/actions/oidc/customization/sub", + "title": "Get the opt-out flag of an OIDC subject claim customization for a repository", + "category": "actions", + "subcategory": "oidc", + "parameters": [ + { + "name": "owner", + "description": "

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

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "

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

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [], + "enabledForGitHubApps": true, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "owner": "OWNER", + "repo": "REPO" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "

Status response

", + "example": { + "use_default": true + }, + "schema": { + "title": "The json payload enables/disables the use of sub claim customization", + "description": "OIDC Customer Subject", + "type": "object", + "properties": { + "use_default": { + "type": "boolean" + } + }, + "required": [ + "use_default" + ] + } + } + } + ], + "previews": [], + "descriptionHTML": "

Gets the opt-out flag of a GitHub Actions OpenID Connect (OIDC) subject claim customization for a repository.\nYou must authenticate using an access token with the repo scope to use this\nendpoint. GitHub Apps must have the organization_administration:read permission to use this endpoint.

", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "

Status response

" + }, + { + "httpStatusCode": "400", + "description": "

Bad Request

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + } + ] + }, + { + "serverUrl": "https://api.github.com", + "verb": "put", + "requestPath": "/repos/{owner}/{repo}/actions/oidc/customization/sub", + "title": "Set the opt-out flag of an OIDC subject claim customization for a repository", + "category": "actions", + "subcategory": "oidc", + "parameters": [ + { + "name": "owner", + "description": "

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

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "

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

", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [ + { + "type": "boolean", + "name": "use_default", + "in": "body", + "rawType": "boolean", + "description": "", + "isRequired": true, + "childParamsGroups": [] + } + ], + "enabledForGitHubApps": true, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "use_default": true + }, + "parameters": { + "owner": "OWNER", + "repo": "REPO" + } + }, + "response": { + "statusCode": "201", + "description": "

Empty response

" + } + } + ], + "previews": [], + "descriptionHTML": "

Sets the opt-out flag of a GitHub Actions OpenID Connect (OIDC) subject claim customization for a repository.\nYou must authenticate using an access token with the repo scope to use this\nendpoint. GitHub Apps must have the actions:write permission to use this endpoint.

", + "statusCodes": [ + { + "httpStatusCode": "201", + "description": "

Empty response

" + }, + { + "httpStatusCode": "400", + "description": "

Bad Request

" + }, + { + "httpStatusCode": "404", + "description": "

Resource not found

" + }, + { + "httpStatusCode": "422", + "description": "

Validation failed

" + } + ] } ], "permissions": [ diff --git a/lib/rest/static/dereferenced/api.github.com.deref.json b/lib/rest/static/dereferenced/api.github.com.deref.json index f65037184f..ab0bd0eb40 100644 --- a/lib/rest/static/dereferenced/api.github.com.deref.json +++ b/lib/rest/static/dereferenced/api.github.com.deref.json @@ -69996,6 +69996,211 @@ } } }, + "/orgs/{org}/actions/oidc/customization/sub": { + "get": { + "summary": "Get the customization template for an OIDC subject claim for an organization", + "description": "Gets the customization template for an OpenID Connect (OIDC) subject claim.\nYou must authenticate using an access token with the `read:org` scope to use this endpoint.\nGitHub Apps must have the `organization_administration:write` permission to use this endpoint.", + "tags": [ + "oidc" + ], + "operationId": "oidc/get-oidc-custom-sub-template-for-org", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization" + }, + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A JSON serialized template for OIDC subject claim customization", + "content": { + "application/json": { + "schema": { + "title": "Actions OIDC Subject customization", + "description": "Actions OIDC Subject customization", + "type": "object", + "properties": { + "include_claim_keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "include_claim_keys" + ] + }, + "examples": { + "default": { + "value": { + "include_claim_keys": [ + "repo", + "context" + ] + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": true, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "oidc" + } + }, + "put": { + "summary": "Set the customization template for an OIDC subject claim for an organization", + "description": "Creates or updates the customization template for an OpenID Connect (OIDC) subject claim.\nYou must authenticate using an access token with the `write:org` scope to use this endpoint.\nGitHub Apps must have the `admin:org` permission to use this endpoint.", + "tags": [ + "oidc" + ], + "operationId": "oidc/update-oidc-custom-sub-template-for-org", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization" + }, + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "title": "Actions OIDC Subject customization", + "description": "Actions OIDC Subject customization", + "type": "object", + "properties": { + "include_claim_keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "include_claim_keys" + ] + }, + "examples": { + "default": { + "value": { + "include_claim_keys": [ + "repo", + "context" + ] + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Empty response", + "content": { + "application/json": { + "schema": { + "title": "Empty Object", + "description": "An object without any properties.", + "type": "object", + "properties": { + }, + "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": true, + "enabledForGitHubApps": true, + "previews": [ + + ], + "category": "actions", + "subcategory": "oidc" + } + } + }, "/orgs/{org}/actions/permissions": { "get": { "summary": "Get GitHub Actions permissions for an organization", @@ -167127,6 +167332,381 @@ } } }, + "/repos/{owner}/{repo}/actions/oidc/customization/sub": { + "get": { + "summary": "Get the opt-out flag of an OIDC subject claim customization for a repository", + "description": "Gets the `opt-out` flag of a GitHub Actions OpenID Connect (OIDC) subject claim customization for a repository.\nYou must authenticate using an access token with the `repo` scope to use this\nendpoint. GitHub Apps must have the `organization_administration:read` permission to use this endpoint.", + "tags": [ + "actions" + ], + "operationId": "actions/get-custom-oidc-sub-claim-for-repo", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/oidc#get-the-opt-out-flag-of-an-oidc-subject-claim-customization-for-a-repository" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Status response", + "content": { + "application/json": { + "schema": { + "title": "The json payload enables/disables the use of sub claim customization", + "description": "OIDC Customer Subject", + "type": "object", + "properties": { + "use_default": { + "type": "boolean" + } + }, + "required": [ + "use_default" + ] + }, + "examples": { + "default": { + "value": { + "use_default": true + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + }, + "application/scim+json": { + "schema": { + "title": "Scim Error", + "description": "Scim Error", + "type": "object", + "properties": { + "message": { + "type": [ + "string", + "null" + ] + }, + "documentation_url": { + "type": [ + "string", + "null" + ] + }, + "detail": { + "type": [ + "string", + "null" + ] + }, + "status": { + "type": "integer" + }, + "scimType": { + "type": [ + "string", + "null" + ] + }, + "schemas": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": true, + "enabledForGitHubApps": true, + "previews": [ + + ], + "category": "actions", + "subcategory": "oidc" + } + }, + "put": { + "summary": "Set the opt-out flag of an OIDC subject claim customization for a repository", + "description": "Sets the `opt-out` flag of a GitHub Actions OpenID Connect (OIDC) subject claim customization for a repository.\nYou must authenticate using an access token with the `repo` scope to use this\nendpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.", + "tags": [ + "actions" + ], + "operationId": "actions/set-custom-oidc-sub-claim-for-repo", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/oidc#set-the-opt-out-flag-of-an-oidc-subject-claim-customization-for-a-repository" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "title": "The json payload enables/disables the use of sub claim customization", + "description": "OIDC Customer Subject", + "type": "object", + "properties": { + "use_default": { + "type": "boolean" + } + }, + "required": [ + "use_default" + ] + }, + "examples": { + "default": { + "value": { + "use_default": true + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Empty response", + "content": { + "application/json": { + "schema": { + "title": "Empty Object", + "description": "An object without any properties.", + "type": "object", + "properties": { + }, + "additionalProperties": false + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + }, + "application/scim+json": { + "schema": { + "title": "Scim Error", + "description": "Scim Error", + "type": "object", + "properties": { + "message": { + "type": [ + "string", + "null" + ] + }, + "documentation_url": { + "type": [ + "string", + "null" + ] + }, + "detail": { + "type": [ + "string", + "null" + ] + }, + "status": { + "type": "integer" + }, + "scimType": { + "type": [ + "string", + "null" + ] + }, + "schemas": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "422": { + "description": "Validation failed", + "content": { + "application/json": { + "schema": { + "title": "Validation Error Simple", + "description": "Validation Error Simple", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": true, + "enabledForGitHubApps": true, + "previews": [ + + ], + "category": "actions", + "subcategory": "oidc" + } + } + }, "/repos/{owner}/{repo}/actions/permissions": { "get": { "summary": "Get GitHub Actions permissions for a repository",