Skip to content

Instantly share code, notes, and snippets.

@kfcampbell
Created February 1, 2023 19:46
Show Gist options
  • Save kfcampbell/5bca32e4f1ad570ae3443560f71c3728 to your computer and use it in GitHub Desktop.
Save kfcampbell/5bca32e4f1ad570ae3443560f71c3728 to your computer and use it in GitHub Desktop.
Modified GitHub OpenAPI spec
This file has been truncated, but you can view the full file.
{
"openapi": "3.0.3",
"info": {
"version": "1.1.4",
"title": "GitHub v3 REST API",
"description": "GitHub's v3 REST API.",
"license": {
"name": "MIT",
"url": "https://spdx.org/licenses/MIT"
},
"termsOfService": "https://docs.github.com/articles/github-terms-of-service",
"contact": {
"name": "Support",
"url": "https://support.github.com/contact?tags=dotcom-rest-api"
},
"x-github-plan": "api.github.com"
},
"tags": [
{
"name": "actions",
"description": "Endpoints to manage GitHub Actions using the REST API."
},
{
"name": "activity",
"description": "Activity APIs provide access to notifications, subscriptions, and timelines."
},
{
"name": "apps",
"description": "Information for integrations and installations."
},
{
"name": "billing",
"description": "Monitor charges and usage from Actions and Packages."
},
{
"name": "checks",
"description": "Rich interactions with checks run by your integrations."
},
{
"name": "code-scanning",
"description": "Retrieve code scanning alerts from a repository."
},
{
"name": "codes-of-conduct",
"description": "Insight into codes of conduct for your communities."
},
{
"name": "codespaces",
"description": "Endpoints to manage Codespaces using the REST API."
},
{
"name": "emojis",
"description": "List emojis available to use on GitHub."
},
{
"name": "enterprise-admin",
"description": "Administer a GitHub enterprise."
},
{
"name": "dependabot",
"description": "Endpoints to manage Dependabot."
},
{
"name": "dependency-graph",
"description": "Endpoints to access Dependency Graph features."
},
{
"name": "gists",
"description": "View, modify your gists."
},
{
"name": "git",
"description": "Raw Git functionality."
},
{
"name": "gitignore",
"description": "View gitignore templates"
},
{
"name": "interactions",
"description": "Owner or admin management of users interactions."
},
{
"name": "issues",
"description": "Interact with GitHub Issues."
},
{
"name": "licenses",
"description": "View various OSS licenses."
},
{
"name": "markdown",
"description": "Render GitHub flavored markdown"
},
{
"name": "merge-queue",
"description": "Interact with GitHub Merge Queues."
},
{
"name": "meta",
"description": "Endpoints that give information about the API."
},
{
"name": "migrations",
"description": "Move projects to or from GitHub."
},
{
"name": "orgs",
"description": "Interact with GitHub Orgs."
},
{
"name": "packages",
"description": "Manage packages for authenticated users and organizations."
},
{
"name": "projects",
"description": "Interact with GitHub Projects."
},
{
"name": "pulls",
"description": "Interact with GitHub Pull Requests."
},
{
"name": "rate-limit",
"description": "Check your current rate limit status"
},
{
"name": "reactions",
"description": "Interact with reactions to various GitHub entities."
},
{
"name": "repos",
"description": "Interact with GitHub Repos."
},
{
"name": "search",
"description": "Look for stuff on GitHub."
},
{
"name": "secret-scanning",
"description": "Retrieve secret scanning alerts from a repository."
},
{
"name": "server-statistics",
"description": "GHES statistics"
},
{
"name": "teams",
"description": "Interact with GitHub Teams."
},
{
"name": "users",
"description": "Interact with and view information about users and also current user."
}
],
"servers": [
{
"url": "https://api.github.com"
}
],
"externalDocs": {
"description": "GitHub v3 REST API",
"url": "https://docs.github.com/rest/"
},
"paths": {
"/": {
"get": {
"summary": "GitHub API Root",
"description": "Get Hypermedia links to resources accessible in GitHub's REST API",
"tags": [
"meta"
],
"operationId": "meta/root",
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/root"
},
"examples": {
"default": {
"$ref": "#/components/examples/root"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "meta"
},
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/overview/resources-in-the-rest-api#root-endpoint"
}
}
},
"/app": {
"get": {
"summary": "Get the authenticated app",
"description": "Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the \"[List installations for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)\" endpoint.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/get-authenticated",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#get-the-authenticated-app"
},
"parameters": [
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/integration"
},
"examples": {
"default": {
"$ref": "#/components/examples/integration"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "apps",
"subcategory": null
}
}
},
"/app-manifests/{code}/conversions": {
"post": {
"summary": "Create a GitHub App from a manifest",
"description": "Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`.",
"tags": [
"apps"
],
"operationId": "apps/create-from-manifest",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#create-a-github-app-from-a-manifest"
},
"parameters": [
{
"name": "code",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/integration"
},
{
"type": "object",
"properties": {
"client_id": {
"type": "string"
},
"client_secret": {
"type": "string"
},
"webhook_secret": {
"type": "string",
"nullable": true
},
"pem": {
"type": "string"
}
},
"required": [
"client_id",
"client_secret",
"webhook_secret",
"pem"
],
"additionalProperties": true
}
]
},
"examples": {
"default": {
"$ref": "#/components/examples/integration-from-manifest"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed_simple"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": null
}
}
},
"/app/hook/config": {
"get": {
"summary": "Get a webhook configuration for an app",
"description": "Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see \"[Creating a GitHub App](/developers/apps/creating-a-github-app).\"\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/get-webhook-config-for-app",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#get-a-webhook-configuration-for-an-app"
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhook-config"
},
"examples": {
"default": {
"$ref": "#/components/examples/webhook-config"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "webhooks"
}
},
"patch": {
"summary": "Update a webhook configuration for an app",
"description": "Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see \"[Creating a GitHub App](/developers/apps/creating-a-github-app).\"\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/update-webhook-config-for-app",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#update-a-webhook-configuration-for-an-app"
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"url": {
"$ref": "#/components/schemas/webhook-config-url"
},
"content_type": {
"$ref": "#/components/schemas/webhook-config-content-type"
},
"secret": {
"$ref": "#/components/schemas/webhook-config-secret"
},
"insecure_ssl": {
"$ref": "#/components/schemas/webhook-config-insecure-ssl"
}
}
},
"examples": {
"default": {
"value": {
"content_type": "json",
"insecure_ssl": "0",
"secret": "********",
"url": "https://example.com/webhook"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhook-config"
},
"examples": {
"default": {
"$ref": "#/components/examples/webhook-config"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "webhooks"
}
}
},
"/app/hook/deliveries": {
"get": {
"summary": "List deliveries for an app webhook",
"description": "Returns a list of webhook deliveries for the webhook configured for a GitHub App.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/list-webhook-deliveries",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook"
},
"parameters": [
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/cursor"
},
{
"name": "redelivery",
"in": "query",
"required": false,
"schema": {
"type": "boolean"
}
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/hook-delivery-item"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/hook-delivery-items"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/bad_request"
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "webhooks"
}
}
},
"/app/hook/deliveries/{delivery_id}": {
"get": {
"summary": "Get a delivery for an app webhook",
"description": "Returns a delivery for the webhook configured for a GitHub App.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/get-webhook-delivery",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#get-a-delivery-for-an-app-webhook"
},
"parameters": [
{
"$ref": "#/components/parameters/delivery-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/hook-delivery"
},
"examples": {
"default": {
"$ref": "#/components/examples/hook-delivery"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/bad_request"
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "webhooks"
}
}
},
"/app/hook/deliveries/{delivery_id}/attempts": {
"post": {
"summary": "Redeliver a delivery for an app webhook",
"description": "Redeliver a delivery for the webhook configured for a GitHub App.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/redeliver-webhook-delivery",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook"
},
"parameters": [
{
"$ref": "#/components/parameters/delivery-id"
}
],
"responses": {
"202": {
"$ref": "#/components/responses/accepted"
},
"400": {
"$ref": "#/components/responses/bad_request"
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "webhooks"
}
}
},
"/app/installations": {
"get": {
"summary": "List installations for the authenticated app",
"description": "You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.\n\nThe permissions the installation has are included under the `permissions` key.",
"tags": [
"apps"
],
"operationId": "apps/list-installations",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app"
},
"parameters": [
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/since"
},
{
"name": "outdated",
"in": "query",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "The permissions the installation has are included under the `permissions` key.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/installation"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/base-installation-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "apps",
"subcategory": null
}
}
},
"/app/installations/{installation_id}": {
"get": {
"summary": "Get an installation for the authenticated app",
"description": "Enables an authenticated GitHub App to find an installation's information using the installation id.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/get-installation",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#get-an-installation-for-the-authenticated-app"
},
"parameters": [
{
"$ref": "#/components/parameters/installation-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/installation"
},
"examples": {
"default": {
"$ref": "#/components/examples/base-installation"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "apps",
"subcategory": null
}
},
"delete": {
"summary": "Delete an installation for the authenticated app",
"description": "Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the \"[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)\" endpoint.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/delete-installation",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#delete-an-installation-for-the-authenticated-app"
},
"parameters": [
{
"$ref": "#/components/parameters/installation-id"
}
],
"responses": {
"204": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": null
}
}
},
"/app/installations/{installation_id}/access_tokens": {
"post": {
"summary": "Create an installation access token for an app",
"description": "Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/create-installation-access-token",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps/#create-an-installation-access-token-for-an-app"
},
"parameters": [
{
"$ref": "#/components/parameters/installation-id"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"repositories": {
"description": "List of repository names that the token should have access to",
"type": "array",
"items": {
"type": "string",
"example": "rails"
}
},
"repository_ids": {
"description": "List of repository IDs that the token should have access to",
"example": [
1
],
"type": "array",
"items": {
"type": "integer"
}
},
"permissions": {
"$ref": "#/components/schemas/app-permissions"
}
}
},
"examples": {
"default": {
"value": {
"repository": "Hello-World",
"permissions": {
"issues": "write",
"contents": "read"
}
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/installation-token"
},
"examples": {
"default": {
"$ref": "#/components/examples/installation-token"
}
}
}
}
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "apps",
"subcategory": null
}
}
},
"/app/installations/{installation_id}/suspended": {
"put": {
"summary": "Suspend an app installation",
"description": "Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/suspend-installation",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#suspend-an-app-installation"
},
"parameters": [
{
"$ref": "#/components/parameters/installation-id"
}
],
"responses": {
"204": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": null
}
},
"delete": {
"summary": "Unsuspend an app installation",
"description": "Removes a GitHub App installation suspension.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/unsuspend-installation",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#unsuspend-an-app-installation"
},
"parameters": [
{
"$ref": "#/components/parameters/installation-id"
}
],
"responses": {
"204": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": null
}
}
},
"/applications/{client_id}/grant": {
"delete": {
"summary": "Delete an app authorization",
"description": "OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted.\nDeleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized).",
"operationId": "apps/delete-authorization",
"tags": [
"apps"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#delete-an-app-authorization"
},
"parameters": [
{
"$ref": "#/components/parameters/client-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_token": {
"type": "string",
"description": "The OAuth access token used to authenticate to the GitHub API."
}
},
"required": [
"access_token"
]
},
"examples": {
"default": {
"value": {
"access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a"
}
}
}
}
}
},
"responses": {
"204": {
"description": "Response"
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "oauth-applications"
}
}
},
"/applications/{client_id}/token": {
"post": {
"summary": "Check a token",
"description": "OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`.",
"tags": [
"apps"
],
"operationId": "apps/check-token",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#check-a-token"
},
"parameters": [
{
"$ref": "#/components/parameters/client-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"access_token": {
"description": "The access_token of the OAuth application.",
"type": "string"
}
},
"required": [
"access_token"
],
"type": "object"
},
"examples": {
"default": {
"value": {
"access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/authorization"
},
"examples": {
"default": {
"$ref": "#/components/examples/authorization-with-user"
}
}
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "oauth-applications"
}
},
"patch": {
"summary": "Reset a token",
"description": "OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the \"token\" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.",
"tags": [
"apps"
],
"operationId": "apps/reset-token",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#reset-a-token"
},
"parameters": [
{
"$ref": "#/components/parameters/client-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"access_token": {
"description": "The access_token of the OAuth application.",
"type": "string"
}
},
"required": [
"access_token"
],
"type": "object"
},
"examples": {
"default": {
"value": {
"access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/authorization"
},
"examples": {
"default": {
"$ref": "#/components/examples/authorization-with-user"
}
}
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "oauth-applications"
}
},
"delete": {
"summary": "Delete an app token",
"description": "OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password.",
"tags": [
"apps"
],
"operationId": "apps/delete-token",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#delete-an-app-token"
},
"parameters": [
{
"$ref": "#/components/parameters/client-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_token": {
"type": "string",
"description": "The OAuth access token used to authenticate to the GitHub API."
}
},
"required": [
"access_token"
]
},
"examples": {
"default": {
"value": {
"access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a"
}
}
}
}
}
},
"responses": {
"204": {
"description": "Response"
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "oauth-applications"
}
}
},
"/applications/{client_id}/token/scoped": {
"post": {
"summary": "Create a scoped access token",
"description": "Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.",
"tags": [
"apps"
],
"operationId": "apps/scope-token",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#create-a-scoped-access-token"
},
"parameters": [
{
"$ref": "#/components/parameters/client-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"access_token": {
"type": "string",
"description": "The OAuth access token used to authenticate to the GitHub API.",
"example": "e72e16c7e42f292c6912e7710c838347ae178b4a"
},
"target": {
"description": "The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified.",
"type": "string",
"example": "octocat"
},
"target_id": {
"description": "The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified.",
"example": 1,
"type": "integer"
},
"repositories": {
"description": "The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified.",
"type": "array",
"items": {
"type": "string",
"example": "rails"
}
},
"repository_ids": {
"description": "The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified.",
"example": [
1
],
"type": "array",
"items": {
"type": "integer"
}
},
"permissions": {
"$ref": "#/components/schemas/app-permissions"
}
},
"required": [
"access_token"
]
},
"examples": {
"default": {
"value": {
"access_token": "e72e16c7e42f292c6912e7710c838347ae178b4a",
"target": "octocat",
"permissions": {
"metadata": "read",
"issues": "write",
"contents": "read"
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/authorization"
},
"examples": {
"default": {
"$ref": "#/components/examples/scope-token"
}
}
}
}
},
"401": {
"$ref": "#/components/responses/requires_authentication"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "oauth-applications"
}
}
},
"/apps/{app_slug}": {
"get": {
"summary": "Get an app",
"description": "**Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`).\n\nIf the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/get-by-slug",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps/#get-an-app"
},
"parameters": [
{
"$ref": "#/components/parameters/app-slug"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/integration"
},
"examples": {
"default": {
"$ref": "#/components/examples/integration"
}
}
}
}
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "apps",
"subcategory": null
}
}
},
"/codes_of_conduct": {
"get": {
"summary": "Get all codes of conduct",
"description": "",
"tags": [
"codes-of-conduct"
],
"operationId": "codes-of-conduct/get-all-codes-of-conduct",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/codes-of-conduct#get-all-codes-of-conduct"
},
"parameters": [
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/code-of-conduct"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/code-of-conduct-simple-items"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "codes-of-conduct",
"subcategory": null
}
}
},
"/codes_of_conduct/{key}": {
"get": {
"summary": "Get a code of conduct",
"description": "",
"tags": [
"codes-of-conduct"
],
"operationId": "codes-of-conduct/get-conduct-code",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/codes-of-conduct#get-a-code-of-conduct"
},
"parameters": [
{
"name": "key",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/code-of-conduct"
},
"examples": {
"default": {
"$ref": "#/components/examples/code-of-conduct"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"304": {
"$ref": "#/components/responses/not_modified"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "codes-of-conduct",
"subcategory": null
}
}
},
"/emojis": {
"get": {
"summary": "Get emojis",
"description": "Lists all the emojis available to use on GitHub.",
"operationId": "emojis/get",
"tags": [
"emojis"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/emojis#get-emojis"
},
"parameters": [
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/emojis-get"
}
}
}
},
"description": "Response"
},
"304": {
"$ref": "#/components/responses/not_modified"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "emojis",
"subcategory": null
}
}
},
"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}": {
"put": {
"summary": "Enable a selected organization for GitHub Actions in an enterprise",
"description": "Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise).\"\n\nYou must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/enable-selected-organization-github-actions-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#enable-a-selected-organization-for-github-actions-in-an-enterprise"
},
"parameters": [
{
"$ref": "#/components/parameters/enterprise"
},
{
"$ref": "#/components/parameters/org-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "permissions"
}
}
},
"/enterprises/{enterprise}/actions/runner-groups": {
"get": {
"summary": "List self-hosted runner groups for an enterprise",
"description": "Lists all self-hosted runner groups for an enterprise.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/list-self-hosted-runner-groups-for-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise"
},
"parameters": [
{
"$ref": "#/components/parameters/enterprise"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/visible-to-organization"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"total_count": {
"type": "number"
},
"runner_groups": {
"type": "array",
"items": {
"$ref": "#/components/schemas/runner-groups-enterprise"
}
}
},
"required": [
"total_count",
"runner_groups"
]
},
"examples": {
"default": {
"$ref": "#/components/examples/runner-groups-enterprise"
}
}
}
}
}
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
}
},
"post": {
"summary": "Create a self-hosted runner group for an enterprise",
"description": "Creates a new self-hosted runner group for an enterprise.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/create-self-hosted-runner-group-for-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#create-self-hosted-runner-group-for-an-enterprise"
},
"parameters": [
{
"$ref": "#/components/parameters/enterprise"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"description": "Name of the runner group.",
"type": "string"
},
"visibility": {
"description": "Visibility of a runner group. You can select all organizations or select individual organization.",
"type": "string",
"enum": [
"selected",
"all"
]
},
"selected_organization_ids": {
"description": "List of organization IDs that can access the runner group.",
"type": "array",
"items": {
"type": "integer",
"description": "Unique identifier of the organization."
}
},
"runners": {
"description": "List of runner IDs to add to the runner group.",
"type": "array",
"items": {
"type": "integer",
"description": "Unique identifier of the runner."
}
},
"allows_public_repositories": {
"description": "Whether the runner group can be used by `public` repositories.",
"type": "boolean",
"default": false
},
"restricted_to_workflows": {
"description": "If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array.",
"type": "boolean",
"default": false
},
"selected_workflows": {
"description": "List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`.",
"type": "array",
"items": {
"type": "string",
"description": "Name of workflow the runner group should be allowed to run. Note that a ref, tag, or long SHA is required.",
"example": "octo-org/octo-repo/.github/workflows/deploy.yaml@main"
}
}
},
"required": [
"name"
]
},
"examples": {
"default": {
"value": {
"name": "Expensive hardware runners",
"visibility": "selected",
"selected_organization_ids": [
32,
91
],
"runners": [
9,
2
]
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/runner-groups-enterprise"
},
"examples": {
"default": {
"$ref": "#/components/examples/runner-group-enterprise"
}
}
}
}
}
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
}
}
},
"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": {
"get": {
"summary": "Get a self-hosted runner group for an enterprise",
"description": "Gets a specific self-hosted runner group for an enterprise.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/get-self-hosted-runner-group-for-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-enterprise"
},
"parameters": [
{
"$ref": "#/components/parameters/enterprise"
},
{
"$ref": "#/components/parameters/runner-group-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/runner-groups-enterprise"
},
"examples": {
"default": {
"$ref": "#/components/examples/runner-group-enterprise"
}
}
}
}
}
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
}
}
},
"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": {
"put": {
"summary": "Add organization access to a self-hosted runner group in an enterprise",
"description": "Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see \"[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise).\"\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise"
},
"parameters": [
{
"$ref": "#/components/parameters/enterprise"
},
{
"$ref": "#/components/parameters/runner-group-id"
},
{
"$ref": "#/components/parameters/org-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
}
}
},
"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": {
"delete": {
"summary": "Remove a self-hosted runner from a group for an enterprise",
"description": "Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-enterprise"
},
"parameters": [
{
"$ref": "#/components/parameters/enterprise"
},
{
"$ref": "#/components/parameters/runner-group-id"
},
{
"$ref": "#/components/parameters/runner-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
}
}
},
"/enterprises/{enterprise}/actions/runners/{runner_id}": {
"delete": {
"summary": "Delete a self-hosted runner from an enterprise",
"description": "Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"operationId": "enterprise-admin/delete-self-hosted-runner-from-enterprise",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#delete-self-hosted-runner-from-an-enterprise"
},
"parameters": [
{
"$ref": "#/components/parameters/enterprise"
},
{
"$ref": "#/components/parameters/runner-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runners"
}
}
},
"/enterprises/{enterprise}/actions/runners/{runner_id}/labels": {
"get": {
"summary": "List labels for a self-hosted runner for an enterprise",
"description": "Lists all labels for a self-hosted runner configured in an enterprise.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"tags": [
"enterprise-admin"
],
"operationId": "enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-enterprise"
},
"parameters": [
{
"$ref": "#/components/parameters/enterprise"
},
{
"$ref": "#/components/parameters/runner-id"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/actions_runner_labels"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"enabledForGitHubApps": false,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runners"
}
},
"post": {
"summary": "Add custom labels to a self-hosted runner for an enterprise",
"description": "Add custom labels to a self-hosted runner configured in an enterprise.\n\nYou must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.",
"tags": [
"enterprise-admin"
],
"operationId": "enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise"
},
"parameters": [
{
"$ref": "#/components/parameters/enterprise"
},
{
"$ref": "#/components/parameters/runner-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"labels"
],
"properties": {
"labels": {
"type": "array",
"minItems": 1,
"maxItems": 100,
"description": "The names of the custom labels to add to the runner.",
"items": {
"type": "string"
}
}
}
},
"examples": {
"default": {
"value": {
"labels": [
"gpu",
"accelerated"
]
}
}
}
}
}
},
"responses": {
"200": {
"$ref": "#/components/responses/actions_runner_labels"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed_simple"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "actions",
"subcategory": "self-hosted-runners"
}
}
},
"/enterprises/{enterprise}/code_security_and_analysis": {
"get": {
"summary": "Get code security and analysis features for an enterprise",
"description": "Gets code security and analysis settings for the specified enterprise.\nTo use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope.",
"tags": [
"enterprise-admin"
],
"operationId": "secret-scanning/get-security-analysis-settings-for-enterprise",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/enterprise-admin#get-code-security-analysis-features-for-an-enterprise"
},
"parameters": [
{
"$ref": "#/components/parameters/enterprise"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/enterprise-security-analysis-settings"
},
"examples": {
"default": {
"$ref": "#/components/examples/enterprise-security-analysis-settings"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "enterprise-admin",
"subcategory": "code-security-and-analysis"
}
},
"patch": {
"summary": "Update code security and analysis features for an enterprise",
"description": "Updates the settings for advanced security, secret scanning, and push protection for new repositories in an enterprise.\nTo use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope.",
"tags": [
"enterprise-admin"
],
"operationId": "secret-scanning/patch-security-analysis-settings-for-enterprise",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/enterprise-admin#update-code-security-and-analysis-features-for-an-enterprise"
},
"parameters": [
{
"$ref": "#/components/parameters/enterprise"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"advanced_security_enabled_for_new_repositories": {
"type": "boolean",
"description": "Whether GitHub Advanced Security is automatically enabled for new repositories. For more information, see \"[About GitHub Advanced Security](https://docs.github.com/get-started/learning-about-github/about-github-advanced-security).\""
},
"secret_scanning_enabled_for_new_repositories": {
"type": "boolean",
"description": "Whether secret scanning is automatically enabled for new repositories. For more information, see \"[About secret scanning](https://docs.github.com/code-security/secret-scanning/about-secret-scanning).\""
},
"secret_scanning_push_protection_enabled_for_new_repositories": {
"type": "boolean",
"description": "Whether secret scanning push protection is automatically enabled for new repositories. For more information, see \"[Protecting pushes with secret scanning](https://docs.github.com/code-security/secret-scanning/protecting-pushes-with-secret-scanning).\""
},
"secret_scanning_push_protection_custom_link": {
"type": "string",
"nullable": true,
"description": "The URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see \"[Protecting pushes with secret scanning](https://docs.github.com/code-security/secret-scanning/protecting-pushes-with-secret-scanning).\"\nTo disable this functionality, set this field to `null`."
}
}
},
"examples": {
"default": {
"value": {
"advanced_security_enabled_for_new_repositories": true,
"secret_scanning_enabled_for_new_repositories": true,
"secret_scanning_push_protection_enabled_for_new_repositories": true,
"secret_scanning_push_protection_custom_link": "https://github.com/test-org/test-repo/blob/main/README.md"
}
}
}
}
}
},
"responses": {
"204": {
"description": "Action started"
},
"422": {
"description": "The action could not be taken due to an in progress enablement, or a policy is preventing enablement"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "enterprise-admin",
"subcategory": "code-security-and-analysis"
}
}
},
"/enterprises/{enterprise}/dependabot/alerts": {
"get": {
"summary": "List Dependabot alerts for an enterprise",
"description": "Lists Dependabot alerts for repositories that are owned by the specified enterprise.\nTo use this endpoint, you must be a member of the enterprise, and you must use an\naccess token with the `repo` scope or `security_events` scope.\nAlerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. For more information about security managers, see \"[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).\"",
"tags": [
"dependabot"
],
"operationId": "dependabot/list-alerts-for-enterprise",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-enterprise"
},
"parameters": [
{
"$ref": "#/components/parameters/enterprise"
},
{
"$ref": "#/components/parameters/dependabot-alert-comma-separated-states"
},
{
"$ref": "#/components/parameters/dependabot-alert-comma-separated-severities"
},
{
"$ref": "#/components/parameters/dependabot-alert-comma-separated-ecosystems"
},
{
"$ref": "#/components/parameters/dependabot-alert-comma-separated-packages"
},
{
"$ref": "#/components/parameters/dependabot-alert-scope"
},
{
"$ref": "#/components/parameters/dependabot-alert-sort"
},
{
"$ref": "#/components/parameters/direction"
},
{
"$ref": "#/components/parameters/pagination-before"
},
{
"$ref": "#/components/parameters/pagination-after"
},
{
"$ref": "#/components/parameters/pagination-first"
},
{
"$ref": "#/components/parameters/pagination-last"
},
{
"$ref": "#/components/parameters/per-page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/dependabot-alert-with-repository"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/dependabot-alerts-for-organization"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed_simple"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"previews": [
],
"category": "dependabot",
"subcategory": "alerts"
}
}
},
"/enterprises/{enterprise}/secret-scanning/alerts": {
"get": {
"summary": "List secret scanning alerts for an enterprise",
"description": "Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest.\nTo use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).",
"tags": [
"secret-scanning"
],
"operationId": "secret-scanning/list-alerts-for-enterprise",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise"
},
"parameters": [
{
"$ref": "#/components/parameters/enterprise"
},
{
"$ref": "#/components/parameters/secret-scanning-alert-state"
},
{
"$ref": "#/components/parameters/secret-scanning-alert-secret-type"
},
{
"$ref": "#/components/parameters/secret-scanning-alert-resolution"
},
{
"$ref": "#/components/parameters/secret-scanning-alert-sort"
},
{
"$ref": "#/components/parameters/direction"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/pagination-before"
},
{
"$ref": "#/components/parameters/pagination-after"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/organization-secret-scanning-alert"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/organization-secret-scanning-alert-list"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"503": {
"$ref": "#/components/responses/service_unavailable"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "secret-scanning",
"subcategory": null
}
}
},
"/enterprises/{enterprise}/{security_product}/{enablement}": {
"post": {
"summary": "Enable or disable a security feature",
"description": "Enables or disables the specified security feature for all repositories in an enterprise.\n\nTo use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope.",
"tags": [
"enterprise-admin"
],
"operationId": "secret-scanning/post-security-product-enablement-for-enterprise",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/enterprise-admin#enable-or-disable-a-security-feature"
},
"parameters": [
{
"$ref": "#/components/parameters/enterprise"
},
{
"$ref": "#/components/parameters/enterprise-security-product"
},
{
"$ref": "#/components/parameters/enterprise-security-product-enablement"
}
],
"responses": {
"204": {
"description": "Action started"
},
"422": {
"description": "The action could not be taken due to an in progress enablement, or a policy is preventing enablement"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "enterprise-admin",
"subcategory": "code-security-and-analysis"
}
}
},
"/events": {
"get": {
"summary": "List public events",
"description": "We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago.",
"tags": [
"activity"
],
"operationId": "activity/list-public-events",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-public-events"
},
"parameters": [
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/event"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/public-events-items"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"503": {
"$ref": "#/components/responses/service_unavailable"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "activity",
"subcategory": "events"
}
}
},
"/feeds": {
"get": {
"summary": "Get feeds",
"description": "GitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user:\n\n* **Timeline**: The GitHub global public timeline\n* **User**: The public timeline for any user, using [URI template](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia)\n* **Current user public**: The public timeline for the authenticated user\n* **Current user**: The private timeline for the authenticated user\n* **Current user actor**: The private timeline for activity created by the authenticated user\n* **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.\n* **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.\n\n**Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens.",
"tags": [
"activity"
],
"operationId": "activity/get-feeds",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#get-feeds"
},
"parameters": [
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/feed"
},
"examples": {
"default": {
"$ref": "#/components/examples/feed"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "activity",
"subcategory": "feeds"
}
}
},
"/gists": {
"get": {
"summary": "List gists for the authenticated user",
"description": "Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists:",
"tags": [
"gists"
],
"operationId": "gists/list",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user"
},
"parameters": [
{
"$ref": "#/components/parameters/since"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/base-gist"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/base-gist-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
}
},
"post": {
"summary": "Create a gist",
"description": "Allows you to add a new gist with one or more files.\n\n**Note:** Don't name your files \"gistfile\" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally.",
"operationId": "gists/create",
"tags": [
"gists"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#create-a-gist"
},
"parameters": [
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"description": {
"description": "Description of the gist",
"example": "Example Ruby script",
"type": "string"
},
"files": {
"description": "Names and content for the files that make up the gist",
"example": {
"hello.rb": {
"content": "puts \"Hello, World!\""
}
},
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"content": {
"description": "Content of the file",
"readOnly": false,
"type": "string"
}
},
"required": [
"content"
]
}
},
"public": {
"oneOf": [
{
"description": "Flag indicating whether the gist is public",
"example": true,
"type": "boolean",
"default": false
},
{
"type": "string",
"example": "true",
"default": "false",
"enum": [
"true",
"false"
]
}
]
}
},
"required": [
"files"
],
"type": "object"
},
"examples": {
"default": {
"summary": "Creating a gist",
"value": {
"description": "Example of a gist",
"public": false,
"files": {
"README.md": {
"content": "Hello World"
}
}
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/gist-simple"
},
"examples": {
"default": {
"$ref": "#/components/examples/gist"
}
}
}
},
"headers": {
"Location": {
"example": "https://api.github.com/gists/aa5a315d61ae9438b18d",
"schema": {
"type": "string"
}
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
}
}
},
"/gists/public": {
"get": {
"summary": "List public gists",
"description": "List public gists sorted by most recently updated to least recently updated.\n\nNote: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page.",
"tags": [
"gists"
],
"operationId": "gists/list-public",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#list-public-gists"
},
"parameters": [
{
"$ref": "#/components/parameters/since"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/base-gist"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/base-gist-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
}
}
},
"/gists/starred": {
"get": {
"summary": "List starred gists",
"description": "List the authenticated user's starred gists:",
"tags": [
"gists"
],
"operationId": "gists/list-starred",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#list-starred-gists"
},
"parameters": [
{
"$ref": "#/components/parameters/since"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/base-gist"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/base-gist-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"401": {
"$ref": "#/components/responses/requires_authentication"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
}
}
},
"/gists/{gist_id}": {
"get": {
"summary": "Get a gist",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/get",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#get-a-gist"
},
"parameters": [
{
"$ref": "#/components/parameters/gist-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/gist-simple"
},
"examples": {
"default": {
"$ref": "#/components/examples/gist"
}
}
}
}
},
"403": {
"$ref": "#/components/responses/forbidden_gist"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"304": {
"$ref": "#/components/responses/not_modified"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
}
},
"patch": {
"summary": "Update a gist",
"description": "Allows you to update a gist's description and to update, delete, or rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged.",
"tags": [
"gists"
],
"operationId": "gists/update",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists/#update-a-gist"
},
"parameters": [
{
"$ref": "#/components/parameters/gist-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"description": {
"description": "The description of the gist.",
"example": "Example Ruby script",
"type": "string"
},
"files": {
"description": "The gist files to be updated, renamed, or deleted. Each `key` must match the current filename\n(including extension) of the targeted gist file. For example: `hello.py`.\n\nTo delete a file, set the whole file to null. For example: `hello.py : null`.",
"example": {
"hello.rb": {
"content": "blah",
"filename": "goodbye.rb"
}
},
"type": "object",
"additionalProperties": {
"type": "object",
"nullable": true,
"properties": {
"content": {
"description": "The new content of the file.",
"type": "string"
},
"filename": {
"description": "The new filename for the file.",
"type": "string",
"nullable": true
}
},
"anyOf": [
{
"required": [
"content"
]
},
{
"required": [
"filename"
]
},
{
"type": "object",
"maxProperties": 0
}
]
}
}
},
"anyOf": [
{
"required": [
"description"
]
},
{
"required": [
"files"
]
}
],
"type": "object",
"nullable": true
},
"examples": {
"updateGist": {
"summary": "Updating a gist",
"value": {
"description": "An updated gist description",
"files": {
"README.md": {
"content": "Hello World from GitHub"
}
}
}
},
"deleteFile": {
"summary": "Deleting a gist file",
"value": {
"files": {
"hello.py": null
}
}
},
"renameFile": {
"summary": "Renaming a gist file",
"value": {
"files": {
"hello.py": {
"filename": "goodbye.py"
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/gist-simple"
},
"examples": {
"updateGist": {
"$ref": "#/components/examples/gist"
},
"deleteFile": {
"$ref": "#/components/examples/delete-gist-file"
},
"renameFile": {
"$ref": "#/components/examples/rename-gist-file"
}
}
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
}
},
"delete": {
"summary": "Delete a gist",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/delete",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#delete-a-gist"
},
"parameters": [
{
"$ref": "#/components/parameters/gist-id"
}
],
"responses": {
"204": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
}
}
},
"/gists/{gist_id}/comments": {
"get": {
"summary": "List gist comments",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/list-comments",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#list-gist-comments"
},
"parameters": [
{
"$ref": "#/components/parameters/gist-id"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/gist-comment"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/gist-comment-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": "comments"
}
},
"post": {
"summary": "Create a gist comment",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/create-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#create-a-gist-comment"
},
"parameters": [
{
"$ref": "#/components/parameters/gist-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"body": {
"description": "The comment text.",
"type": "string",
"maxLength": 65535,
"example": "Body of the attachment"
}
},
"type": "object",
"required": [
"body"
]
},
"examples": {
"default": {
"summary": "Creating a comment in a gist",
"value": {
"body": "This is a comment to a gist"
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/gist-comment"
},
"examples": {
"default": {
"$ref": "#/components/examples/gist-comment"
}
}
}
},
"headers": {
"Location": {
"example": "https://api.github.com/gists/a6db0bec360bb87e9418/comments/1",
"schema": {
"type": "string"
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": "comments"
}
}
},
"/gists/{gist_id}/comments/{comment_id}": {
"get": {
"summary": "Get a gist comment",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/get-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#get-a-gist-comment"
},
"parameters": [
{
"$ref": "#/components/parameters/gist-id"
},
{
"$ref": "#/components/parameters/comment-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/gist-comment"
},
"examples": {
"default": {
"$ref": "#/components/examples/gist-comment"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"403": {
"$ref": "#/components/responses/forbidden_gist"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": "comments"
}
},
"patch": {
"summary": "Update a gist comment",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/update-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#update-a-gist-comment"
},
"parameters": [
{
"$ref": "#/components/parameters/gist-id"
},
{
"$ref": "#/components/parameters/comment-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"body": {
"description": "The comment text.",
"type": "string",
"maxLength": 65535,
"example": "Body of the attachment"
}
},
"type": "object",
"required": [
"body"
]
},
"examples": {
"default": {
"summary": "Updating a comment in a gist",
"value": {
"body": "This is an update to a comment in a gist"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/gist-comment"
},
"examples": {
"default": {
"$ref": "#/components/examples/gist-comment"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": "comments"
}
},
"delete": {
"summary": "Delete a gist comment",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/delete-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#delete-a-gist-comment"
},
"parameters": [
{
"$ref": "#/components/parameters/gist-id"
},
{
"$ref": "#/components/parameters/comment-id"
}
],
"responses": {
"204": {
"description": "Response"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": "comments"
}
}
},
"/gists/{gist_id}/commits": {
"get": {
"summary": "List gist commits",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/list-commits",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#list-gist-commits"
},
"parameters": [
{
"$ref": "#/components/parameters/gist-id"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/gist-commit"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/gist-commit-items"
}
}
}
},
"headers": {
"Link": {
"example": "<https://api.github.com/resource?page=2>; rel=\"next\"",
"schema": {
"type": "string"
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
}
}
},
"/gists/{gist_id}/forks": {
"get": {
"summary": "List gist forks",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/list-forks",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#list-gist-forks"
},
"parameters": [
{
"$ref": "#/components/parameters/gist-id"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/gist-simple"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/gist-fork-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
}
},
"post": {
"summary": "Fork a gist",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/fork",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#fork-a-gist"
},
"parameters": [
{
"$ref": "#/components/parameters/gist-id"
}
],
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/base-gist"
},
"examples": {
"default": {
"$ref": "#/components/examples/base-gist"
}
}
}
},
"headers": {
"Location": {
"example": "https://api.github.com/gists/aa5a315d61ae9438b18d",
"schema": {
"type": "string"
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
}
}
},
"/gists/{gist_id}/star": {
"get": {
"summary": "Check if a gist is starred",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/check-is-starred",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred"
},
"parameters": [
{
"$ref": "#/components/parameters/gist-id"
}
],
"responses": {
"204": {
"description": "Response if gist is starred"
},
"404": {
"description": "Not Found if gist is not starred",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
},
"additionalProperties": false
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
}
},
"put": {
"summary": "Star a gist",
"description": "Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs).\"",
"tags": [
"gists"
],
"operationId": "gists/star",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#star-a-gist"
},
"parameters": [
{
"$ref": "#/components/parameters/gist-id"
}
],
"responses": {
"204": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
}
},
"delete": {
"summary": "Unstar a gist",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/unstar",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#unstar-a-gist"
},
"parameters": [
{
"$ref": "#/components/parameters/gist-id"
}
],
"responses": {
"204": {
"description": "Response"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
}
}
},
"/gists/{gist_id}/{sha}": {
"get": {
"summary": "Get a gist revision",
"description": "",
"tags": [
"gists"
],
"operationId": "gists/get-revision",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gists#get-a-gist-revision"
},
"parameters": [
{
"$ref": "#/components/parameters/gist-id"
},
{
"name": "sha",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/gist-simple"
},
"examples": {
"default": {
"$ref": "#/components/examples/gist"
}
}
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "gists",
"subcategory": null
}
}
},
"/gitignore/templates": {
"get": {
"summary": "Get all gitignore templates",
"description": "List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user).",
"operationId": "gitignore/get-all-templates",
"tags": [
"gitignore"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates"
},
"parameters": [
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"examples": {
"default": {
"value": [
"Actionscript",
"Android",
"AppceleratorTitanium",
"Autotools",
"Bancha",
"C",
"C++"
]
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "gitignore",
"subcategory": null
}
}
},
"/gitignore/templates/{name}": {
"get": {
"summary": "Get a gitignore template",
"description": "The API also allows fetching the source of a single template.\nUse the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents.",
"operationId": "gitignore/get-template",
"tags": [
"gitignore"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/gitignore#get-a-gitignore-template"
},
"parameters": [
{
"name": "name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/gitignore-template"
},
"examples": {
"default": {
"$ref": "#/components/examples/gitignore-template"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "gitignore",
"subcategory": null
}
}
},
"/installation/repositories": {
"get": {
"summary": "List repositories accessible to the app installation",
"description": "List repositories that an app installation can access.\n\nYou must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/list-repos-accessible-to-installation",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-app-installation"
},
"parameters": [
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"repositories"
],
"properties": {
"total_count": {
"type": "integer"
},
"repositories": {
"type": "array",
"items": {
"$ref": "#/components/schemas/repository"
}
},
"repository_selection": {
"type": "string",
"example": "selected"
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/repository-paginated-2"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "apps",
"subcategory": "installations"
}
}
},
"/installation/token": {
"delete": {
"summary": "Revoke an installation access token",
"description": "Revokes the installation token you're using to authenticate as an installation and access this endpoint.\n\nOnce an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the \"[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)\" endpoint.\n\nYou must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/revoke-installation-access-token",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#revoke-an-installation-access-token"
},
"parameters": [
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "apps",
"subcategory": "installations"
}
}
},
"/issues": {
"get": {
"summary": "List issues assigned to the authenticated user",
"description": "List issues assigned to the authenticated user across all visible repositories including owned repositories, member\nrepositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not\nnecessarily assigned to you.\n\n\n**Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe `pull_request` key. Be aware that the `id` of a pull request returned from \"Issues\" endpoints will be an _issue id_. To find out the pull\nrequest id, use the \"[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)\" endpoint.",
"tags": [
"issues"
],
"operationId": "issues/list",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user"
},
"parameters": [
{
"name": "filter",
"description": "Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"assigned",
"created",
"mentioned",
"subscribed",
"repos",
"all"
],
"default": "assigned"
}
},
{
"name": "state",
"description": "Indicates the state of the issues to return.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"open",
"closed",
"all"
],
"default": "open"
}
},
{
"$ref": "#/components/parameters/labels"
},
{
"name": "sort",
"description": "What to sort results by.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"created",
"updated",
"comments"
],
"default": "created"
}
},
{
"$ref": "#/components/parameters/direction"
},
{
"$ref": "#/components/parameters/since"
},
{
"name": "collab",
"in": "query",
"required": false,
"schema": {
"type": "boolean"
}
},
{
"name": "orgs",
"in": "query",
"required": false,
"schema": {
"type": "boolean"
}
},
{
"name": "owned",
"in": "query",
"required": false,
"schema": {
"type": "boolean"
}
},
{
"name": "pulls",
"in": "query",
"required": false,
"schema": {
"type": "boolean"
}
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/issue"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/issue-with-repo-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "issues",
"subcategory": null
}
}
},
"/licenses": {
"get": {
"summary": "Get all commonly used licenses",
"description": "",
"tags": [
"licenses"
],
"operationId": "licenses/get-all-commonly-used",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses"
},
"parameters": [
{
"name": "featured",
"in": "query",
"required": false,
"schema": {
"type": "boolean"
}
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/license-simple"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/license-simple-items"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "licenses",
"subcategory": null
}
}
},
"/licenses/{license}": {
"get": {
"summary": "Get a license",
"description": "",
"tags": [
"licenses"
],
"operationId": "licenses/get",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/licenses#get-a-license"
},
"parameters": [
{
"name": "license",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/license"
},
"examples": {
"default": {
"$ref": "#/components/examples/license"
}
}
}
}
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"304": {
"$ref": "#/components/responses/not_modified"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "licenses",
"subcategory": null
}
}
},
"/markdown": {
"post": {
"summary": "Render a Markdown document",
"description": "",
"operationId": "markdown/render",
"tags": [
"markdown"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/markdown#render-a-markdown-document"
},
"parameters": [
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"text": {
"description": "The Markdown text to render in HTML.",
"type": "string"
},
"mode": {
"description": "The rendering mode.",
"enum": [
"markdown",
"gfm"
],
"default": "markdown",
"example": "markdown",
"type": "string"
},
"context": {
"description": "The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository.",
"type": "string"
}
},
"required": [
"text"
],
"type": "object"
},
"examples": {
"default": {
"summary": "Rendering markdown",
"value": {
"text": "Hello **world**"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"headers": {
"Content-Type": {
"$ref": "#/components/headers/content-type"
},
"Content-Length": {
"example": "279",
"schema": {
"type": "string"
}
},
"X-CommonMarker-Version": {
"$ref": "#/components/headers/x-common-marker-version"
}
},
"content": {
"text/html": {
"schema": {
"type": "string"
},
"examples": {
"default": {
"summary": "Example response",
"value": "<p>Hello <strong>world</strong></p>"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "markdown",
"subcategory": null
}
}
},
"/markdown/raw": {
"post": {
"summary": "Render a Markdown document in raw mode",
"description": "You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less.",
"operationId": "markdown/render-raw",
"tags": [
"markdown"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/markdown#render-a-markdown-document-in-raw-mode"
},
"parameters": [
],
"requestBody": {
"required": false,
"content": {
"text/plain": {
"schema": {
"type": "string"
},
"examples": {
"default": {
"value": {
"text": "Hello **world**"
}
}
}
},
"text/x-markdown": {
"schema": {
"type": "string"
},
"examples": {
"default": {
"summary": "Rendering markdown",
"value": {
"text": "Hello **world**"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"headers": {
"X-CommonMarker-Version": {
"$ref": "#/components/headers/x-common-marker-version"
}
},
"content": {
"text/html": {
"schema": {
"type": "string"
},
"examples": {
"default": {
"summary": "Example response",
"value": "<p>Hello <strong>world</strong></p>"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "markdown",
"subcategory": null
}
}
},
"/marketplace_listing/accounts/{account_id}": {
"get": {
"summary": "Get a subscription plan for an account",
"description": "Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.\n\nGitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/get-subscription-plan-for-account",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account"
},
"parameters": [
{
"$ref": "#/components/parameters/account-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/marketplace-purchase"
},
"examples": {
"default": {
"$ref": "#/components/examples/marketplace-purchase"
}
}
}
}
},
"404": {
"description": "Not Found when the account has not purchased the listing",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/basic-error"
}
}
}
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "marketplace"
}
}
},
"/marketplace_listing/plans": {
"get": {
"summary": "List plans",
"description": "Lists all plans that are part of your GitHub Marketplace listing.\n\nGitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/list-plans",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#list-plans"
},
"parameters": [
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/marketplace-listing-plan"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/marketplace-listing-plan-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "marketplace"
}
}
},
"/marketplace_listing/plans/{plan_id}/accounts": {
"get": {
"summary": "List accounts for a plan",
"description": "Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.\n\nGitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/list-accounts-for-plan",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan"
},
"parameters": [
{
"$ref": "#/components/parameters/plan-id"
},
{
"$ref": "#/components/parameters/sort"
},
{
"name": "direction",
"description": "To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/marketplace-purchase"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/marketplace-purchase-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "marketplace"
}
}
},
"/marketplace_listing/stubbed/accounts/{account_id}": {
"get": {
"summary": "Get a subscription plan for an account (stubbed)",
"description": "Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.\n\nGitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/get-subscription-plan-for-account-stubbed",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account-stubbed"
},
"parameters": [
{
"$ref": "#/components/parameters/account-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/marketplace-purchase"
},
"examples": {
"default": {
"$ref": "#/components/examples/marketplace-purchase"
}
}
}
}
},
"404": {
"description": "Not Found when the account has not purchased the listing"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "marketplace"
}
}
},
"/marketplace_listing/stubbed/plans": {
"get": {
"summary": "List plans (stubbed)",
"description": "Lists all plans that are part of your GitHub Marketplace listing.\n\nGitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/list-plans-stubbed",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#list-plans-stubbed"
},
"parameters": [
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/marketplace-listing-plan"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/marketplace-listing-plan-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "marketplace"
}
}
},
"/marketplace_listing/stubbed/plans/{plan_id}/accounts": {
"get": {
"summary": "List accounts for a plan (stubbed)",
"description": "Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.\n\nGitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/list-accounts-for-plan-stubbed",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan-stubbed"
},
"parameters": [
{
"$ref": "#/components/parameters/plan-id"
},
{
"$ref": "#/components/parameters/sort"
},
{
"name": "direction",
"description": "To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/marketplace-purchase"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/marketplace-purchase-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": "marketplace"
}
}
},
"/meta": {
"get": {
"summary": "Get GitHub meta information",
"description": "Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see \"[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/).\"\n\n**Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses.",
"tags": [
"meta"
],
"operationId": "meta/get",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/meta#get-github-meta-information"
},
"parameters": [
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/api-overview"
},
"examples": {
"default": {
"$ref": "#/components/examples/api-overview"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "meta",
"subcategory": null
}
}
},
"/networks/{owner}/{repo}/events": {
"get": {
"summary": "List public events for a network of repositories",
"description": "",
"tags": [
"activity"
],
"operationId": "activity/list-public-events-for-repo-network",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-public-events-for-a-network-of-repositories"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/event"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/public-repo-events-items"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"301": {
"$ref": "#/components/responses/moved_permanently"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "activity",
"subcategory": "events"
}
}
},
"/notifications": {
"get": {
"summary": "List notifications for the authenticated user",
"description": "List all notifications for the current user, sorted by most recently updated.",
"tags": [
"activity"
],
"operationId": "activity/list-notifications-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user"
},
"parameters": [
{
"$ref": "#/components/parameters/all"
},
{
"$ref": "#/components/parameters/participating"
},
{
"$ref": "#/components/parameters/since"
},
{
"$ref": "#/components/parameters/before"
},
{
"$ref": "#/components/parameters/page"
},
{
"name": "per_page",
"description": "The number of results per page (max 50).",
"in": "query",
"schema": {
"type": "integer",
"default": 50
}
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/thread"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/thread-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "notifications"
}
},
"put": {
"summary": "Mark notifications as read",
"description": "Marks all notifications as \"read\" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as \"read.\" To check whether any \"unread\" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`.",
"tags": [
"activity"
],
"operationId": "activity/mark-notifications-as-read",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#mark-notifications-as-read"
},
"parameters": [
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"last_read_at": {
"description": "Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp.",
"type": "string",
"format": "date-time"
},
"read": {
"description": "Whether the notification has been read.",
"type": "boolean"
}
}
},
"examples": {
"default": {
"value": {
"last_read_at": "2022-06-10T00:00:00Z",
"read": true
}
}
}
}
}
},
"responses": {
"202": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/notifications-mark-read"
}
}
}
}
},
"205": {
"description": "Reset Content"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "notifications"
}
}
},
"/notifications/threads/{thread_id}": {
"get": {
"summary": "Get a thread",
"description": "Gets information about a notification thread.",
"tags": [
"activity"
],
"operationId": "activity/get-thread",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#get-a-thread"
},
"parameters": [
{
"$ref": "#/components/parameters/thread-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/thread"
},
"examples": {
"default": {
"$ref": "#/components/examples/thread"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "notifications"
}
},
"patch": {
"summary": "Mark a thread as read",
"description": "Marks a thread as \"read.\" Marking a thread as \"read\" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications.",
"tags": [
"activity"
],
"operationId": "activity/mark-thread-as-read",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#mark-a-thread-as-read"
},
"parameters": [
{
"$ref": "#/components/parameters/thread-id"
}
],
"responses": {
"205": {
"description": "Reset Content"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "notifications"
}
}
},
"/notifications/threads/{thread_id}/subscription": {
"get": {
"summary": "Get a thread subscription for the authenticated user",
"description": "This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#get-a-repository-subscription).\n\nNote that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread.",
"tags": [
"activity"
],
"operationId": "activity/get-thread-subscription-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#get-a-thread-subscription-for-the-authenticated-user"
},
"parameters": [
{
"$ref": "#/components/parameters/thread-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/thread-subscription"
},
"examples": {
"default": {
"$ref": "#/components/examples/thread-subscription"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "notifications"
}
},
"put": {
"summary": "Set a thread subscription",
"description": "If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**.\n\nYou can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored.\n\nUnsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint.",
"tags": [
"activity"
],
"operationId": "activity/set-thread-subscription",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#set-a-thread-subscription"
},
"parameters": [
{
"$ref": "#/components/parameters/thread-id"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"properties": {
"ignored": {
"description": "Whether to block all notifications from a thread.",
"default": false,
"type": "boolean"
}
},
"type": "object"
},
"examples": {
"default": {
"value": {
"ignored": false
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/thread-subscription"
},
"examples": {
"default": {
"$ref": "#/components/examples/thread-subscription"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "notifications"
}
},
"delete": {
"summary": "Delete a thread subscription",
"description": "Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`.",
"tags": [
"activity"
],
"operationId": "activity/delete-thread-subscription",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#delete-a-thread-subscription"
},
"parameters": [
{
"$ref": "#/components/parameters/thread-id"
}
],
"responses": {
"204": {
"description": "Response"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "activity",
"subcategory": "notifications"
}
}
},
"/octocat": {
"get": {
"summary": "Get Octocat",
"description": "Get the octocat as ASCII art",
"tags": [
"meta"
],
"operationId": "meta/get-octocat",
"parameters": [
{
"name": "s",
"in": "query",
"description": "The words to show in Octocat's speech bubble",
"schema": {
"type": "string"
},
"required": false
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/octocat-stream": {
"schema": {
"type": "string"
},
"examples": {
"default": {
"$ref": "#/components/examples/octocat"
}
}
}
}
}
},
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/meta#get-octocat"
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "meta"
}
}
},
"/organizations": {
"get": {
"summary": "List organizations",
"description": "Lists all organizations, in the order that they were created on GitHub.\n\n**Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations.",
"tags": [
"orgs"
],
"operationId": "orgs/list",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-organizations"
},
"parameters": [
{
"$ref": "#/components/parameters/since-org"
},
{
"$ref": "#/components/parameters/per-page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/organization-simple"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/organization-simple-items"
}
}
}
},
"headers": {
"Link": {
"example": "<https://api.github.com/organizations?since=135>; rel=\"next\"",
"schema": {
"type": "string"
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": null
}
}
},
"/orgs/{org}": {
"get": {
"summary": "Get an organization",
"description": "To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/).\n\nGitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See \"[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)\" for details. For an example response, see 'Response with GitHub plan information' below.\"",
"tags": [
"orgs"
],
"operationId": "orgs/get",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#get-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/organization-full"
},
"examples": {
"default-response": {
"$ref": "#/components/examples/organization-full-default-response"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": null
}
},
"patch": {
"summary": "Update an organization",
"description": "**Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes).\n\nEnables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges.",
"tags": [
"orgs"
],
"operationId": "orgs/update",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#update-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"billing_email": {
"type": "string",
"description": "Billing email address. This address is not publicized."
},
"company": {
"type": "string",
"description": "The company name."
},
"email": {
"type": "string",
"description": "The publicly visible email address."
},
"twitter_username": {
"type": "string",
"description": "The Twitter username of the company."
},
"location": {
"type": "string",
"description": "The location."
},
"name": {
"type": "string",
"description": "The shorthand name of the company."
},
"description": {
"type": "string",
"description": "The description of the company."
},
"has_organization_projects": {
"type": "boolean",
"description": "Whether an organization can use organization projects."
},
"has_repository_projects": {
"type": "boolean",
"description": "Whether repositories that belong to the organization can use repository projects."
},
"default_repository_permission": {
"type": "string",
"description": "Default permission level members have for organization repositories.",
"enum": [
"read",
"write",
"admin",
"none"
],
"default": "read"
},
"members_can_create_repositories": {
"type": "boolean",
"description": "Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details.",
"default": true
},
"members_can_create_internal_repositories": {
"type": "boolean",
"description": "Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see \"[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)\" in the GitHub Help documentation."
},
"members_can_create_private_repositories": {
"type": "boolean",
"description": "Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see \"[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)\" in the GitHub Help documentation."
},
"members_can_create_public_repositories": {
"type": "boolean",
"description": "Whether organization members can create public repositories, which are visible to anyone. For more information, see \"[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)\" in the GitHub Help documentation."
},
"members_allowed_repository_creation_type": {
"type": "string",
"description": "Specifies which types of repositories non-admin organization members can create. `private` is only available to repositories that are part of an organization on GitHub Enterprise Cloud. \n**Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details.",
"enum": [
"all",
"private",
"none"
]
},
"members_can_create_pages": {
"type": "boolean",
"description": "Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted.",
"default": true
},
"members_can_create_public_pages": {
"type": "boolean",
"description": "Whether organization members can create public GitHub Pages sites. Existing published sites will not be impacted.",
"default": true
},
"members_can_create_private_pages": {
"type": "boolean",
"description": "Whether organization members can create private GitHub Pages sites. Existing published sites will not be impacted.",
"default": true
},
"members_can_fork_private_repositories": {
"type": "boolean",
"description": "Whether organization members can fork private organization repositories.",
"default": false
},
"web_commit_signoff_required": {
"type": "boolean",
"description": "Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface.",
"default": false
},
"blog": {
"type": "string",
"example": "\"http://github.blog\""
},
"advanced_security_enabled_for_new_repositories": {
"type": "boolean",
"description": "Whether GitHub Advanced Security is automatically enabled for new repositories.\n\nTo use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see \"[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).\"\n\nYou can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request."
},
"dependabot_alerts_enabled_for_new_repositories": {
"type": "boolean",
"description": "Whether Dependabot alerts is automatically enabled for new repositories.\n\nTo use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see \"[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).\"\n\nYou can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request."
},
"dependabot_security_updates_enabled_for_new_repositories": {
"type": "boolean",
"description": "Whether Dependabot security updates is automatically enabled for new repositories.\n\nTo use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see \"[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).\"\n\nYou can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request."
},
"dependency_graph_enabled_for_new_repositories": {
"type": "boolean",
"description": "Whether dependency graph is automatically enabled for new repositories.\n\nTo use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see \"[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).\"\n\nYou can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request."
},
"secret_scanning_enabled_for_new_repositories": {
"type": "boolean",
"description": "Whether secret scanning is automatically enabled for new repositories.\n\nTo use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see \"[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).\"\n\nYou can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request."
},
"secret_scanning_push_protection_enabled_for_new_repositories": {
"type": "boolean",
"description": "Whether secret scanning push protection is automatically enabled for new repositories.\n\nTo use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see \"[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).\"\n\nYou can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request."
},
"secret_scanning_push_protection_custom_link_enabled": {
"type": "boolean",
"description": "Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection."
},
"secret_scanning_push_protection_custom_link": {
"type": "string",
"description": "If `secret_scanning_push_protection_custom_link_enabled` is true, the URL that will be displayed to contributors who are blocked from pushing a secret."
}
}
},
"examples": {
"default": {
"value": {
"billing_email": "mona@github.com",
"company": "GitHub",
"email": "mona@github.com",
"twitter_username": "github",
"location": "San Francisco",
"name": "github",
"description": "GitHub, the company.",
"default_repository_permission": "read",
"members_can_create_repositories": true,
"members_allowed_repository_creation_type": "all"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/organization-full"
},
"examples": {
"default": {
"$ref": "#/components/examples/organization-full"
}
}
}
}
},
"422": {
"description": "Validation failed",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/validation-error"
},
{
"$ref": "#/components/schemas/validation-error-simple"
}
]
}
}
}
},
"409": {
"$ref": "#/components/responses/conflict"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": null
}
}
},
"/orgs/{org}/actions/cache/usage": {
"get": {
"summary": "Get GitHub Actions cache usage for an organization",
"description": "Gets the total GitHub Actions cache usage for an organization.\nThe data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.\nYou must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-actions-cache-usage-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/actions-cache-usage-org-enterprise"
},
"examples": {
"default": {
"$ref": "#/components/examples/actions-cache-usage-org-enterprise"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "cache"
}
}
},
"/orgs/{org}/actions/cache/usage-by-repository": {
"get": {
"summary": "List repositories with GitHub Actions cache usage for an organization",
"description": "Lists repositories and their GitHub Actions cache usage for an organization.\nThe data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.\nYou must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-actions-cache-usage-by-repo-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"repository_cache_usages"
],
"properties": {
"total_count": {
"type": "integer"
},
"repository_cache_usages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/actions-cache-usage-by-repository"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/org-actions-cache-usage-by-repo"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "cache"
}
}
},
"/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": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"200": {
"description": "A JSON serialized template for OIDC subject claim customization",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/oidc-custom-sub"
},
"examples": {
"default": {
"$ref": "#/components/examples/oidc-custom-sub"
}
}
}
}
}
},
"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": [
{
"$ref": "#/components/parameters/org"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/oidc-custom-sub"
},
"examples": {
"default": {
"$ref": "#/components/examples/oidc-custom-sub"
}
}
}
}
},
"responses": {
"201": {
"description": "Empty response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/empty-object"
},
"examples": {
"default": {
"value": null
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": true,
"previews": [
],
"category": "actions",
"subcategory": "oidc"
}
}
},
"/orgs/{org}/actions/permissions": {
"get": {
"summary": "Get GitHub Actions permissions for an organization",
"description": "Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.",
"operationId": "actions/get-github-actions-permissions-organization",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/actions-organization-permissions"
},
"examples": {
"default": {
"$ref": "#/components/examples/actions-organization-permissions"
}
}
}
}
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "permissions"
}
},
"put": {
"summary": "Set GitHub Actions permissions for an organization",
"description": "Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization.\n\nIf the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.",
"operationId": "actions/set-github-actions-permissions-organization",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"enabled_repositories": {
"$ref": "#/components/schemas/enabled-repositories"
},
"allowed_actions": {
"$ref": "#/components/schemas/allowed-actions"
}
},
"required": [
"enabled_repositories"
]
},
"examples": {
"default": {
"value": {
"enabled_repositories": "all",
"allowed_actions": "selected"
}
}
}
}
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "permissions"
}
}
},
"/orgs/{org}/actions/permissions/repositories": {
"get": {
"summary": "List selected repositories enabled for GitHub Actions in an organization",
"description": "Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization).\"\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.",
"operationId": "actions/list-selected-repositories-enabled-github-actions-organization",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"repositories"
],
"properties": {
"total_count": {
"type": "number"
},
"repositories": {
"type": "array",
"items": {
"$ref": "#/components/schemas/repository"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/repository-paginated"
}
}
}
}
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "permissions"
}
},
"put": {
"summary": "Set selected repositories enabled for GitHub Actions in an organization",
"description": "Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization).\"\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.",
"operationId": "actions/set-selected-repositories-enabled-github-actions-organization",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"selected_repository_ids": {
"description": "List of repository IDs to enable for GitHub Actions.",
"type": "array",
"items": {
"type": "integer",
"description": "Unique identifier of the repository."
}
}
},
"required": [
"selected_repository_ids"
]
},
"examples": {
"default": {
"value": {
"selected_repository_ids": [
32,
42
]
}
}
}
}
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "permissions"
}
}
},
"/orgs/{org}/actions/permissions/repositories/{repository_id}": {
"put": {
"summary": "Enable a selected repository for GitHub Actions in an organization",
"description": "Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization).\"\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.",
"operationId": "actions/enable-selected-repository-github-actions-organization",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/repository-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "permissions"
}
},
"delete": {
"summary": "Disable a selected repository for GitHub Actions in an organization",
"description": "Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization).\"\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.",
"operationId": "actions/disable-selected-repository-github-actions-organization",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/repository-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "permissions"
}
}
},
"/orgs/{org}/actions/permissions/selected-actions": {
"get": {
"summary": "Get allowed actions and reusable workflows for an organization",
"description": "Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization).\"\"\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.",
"operationId": "actions/get-allowed-actions-organization",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/selected-actions"
},
"examples": {
"default": {
"$ref": "#/components/examples/selected-actions"
}
}
}
}
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "permissions"
}
},
"put": {
"summary": "Set allowed actions and reusable workflows for an organization",
"description": "Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization).\"\n\nIf the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings.\n\nTo use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.",
"operationId": "actions/set-allowed-actions-organization",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/selected-actions"
},
"examples": {
"selected_actions": {
"$ref": "#/components/examples/selected-actions"
}
}
}
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "permissions"
}
}
},
"/orgs/{org}/actions/permissions/workflow": {
"get": {
"summary": "Get default workflow permissions for an organization",
"description": "Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization,\nas well as whether GitHub Actions can submit approving pull request reviews. For more information, see\n\"[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization).\"\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.",
"tags": [
"actions"
],
"operationId": "actions/get-github-actions-default-workflow-permissions-organization",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-default-workflow-permissions"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/actions-get-default-workflow-permissions"
},
"examples": {
"default": {
"$ref": "#/components/examples/actions-default-workflow-permissions"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "permissions"
}
},
"put": {
"summary": "Set default workflow permissions for an organization",
"description": "Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions\ncan submit approving pull request reviews. For more information, see\n\"[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization).\"\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.",
"tags": [
"actions"
],
"operationId": "actions/set-github-actions-default-workflow-permissions-organization",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-default-workflow-permissions"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"204": {
"description": "Success response"
},
"409": {
"description": "Conflict response when changing a setting is prevented by the owning enterprise"
}
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/actions-set-default-workflow-permissions"
},
"examples": {
"default": {
"$ref": "#/components/examples/actions-default-workflow-permissions"
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "permissions"
}
}
},
"/orgs/{org}/actions/required_workflows": {
"get": {
"summary": "List required workflows",
"description": "List all required workflows in an organization.\n\nYou must authenticate using an access token with the `read:org` scope to use this endpoint.\n\nFor more information, see \"[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows).\"",
"tags": [
"actions"
],
"operationId": "actions/list-required-workflows",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-required-workflows"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"required_workflows"
],
"properties": {
"total_count": {
"type": "integer"
},
"required_workflows": {
"type": "array",
"items": {
"$ref": "#/components/schemas/required-workflow"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/required-workflows-paginated"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "required-workflows"
}
},
"post": {
"summary": "Create a required workflow",
"description": "Create a required workflow in an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.\n\nFor more information, see \"[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows).\"",
"tags": [
"actions"
],
"operationId": "actions/create-required-workflow",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#create-a-required-workflow"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"workflow_file_path": {
"description": "Path of the workflow file to be configured as a required workflow.",
"type": "string"
},
"repository_id": {
"description": "The ID of the repository that contains the workflow file.",
"type": "string"
},
"scope": {
"description": "Enable the required workflow for all repositories or selected repositories in the organization.",
"type": "string",
"enum": [
"selected",
"all"
],
"default": "all"
},
"selected_repository_ids": {
"description": "A list of repository IDs where you want to enable the required workflow. You can only provide a list of repository ids when the `scope` is set to `selected`.",
"type": "array",
"items": {
"type": "integer",
"description": "Unique identifier of the repository."
}
}
},
"required": [
"workflow_file_path",
"repository_id"
]
},
"examples": {
"default": {
"value": {
"workflow_file_path": ".github/workflows/ci.yaml",
"repository_id": 53,
"scope": "selected",
"selected_repository_ids": [
32,
91
]
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/required-workflow"
},
"examples": {
"default": {
"$ref": "#/components/examples/required-workflow"
}
}
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed_simple"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "required-workflows"
}
}
},
"/orgs/{org}/actions/required_workflows/{required_workflow_id}": {
"get": {
"summary": "Get a required workflow",
"description": "Get a required workflow configured in an organization.\n\nYou must authenticate using an access token with the `read:org` scope to use this endpoint.\n\nFor more information, see \"[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows).\"",
"tags": [
"actions"
],
"operationId": "actions/get-required-workflow",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-a-required-workflow"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/required-workflow-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/required-workflow"
},
"examples": {
"default": {
"$ref": "#/components/examples/required-workflow"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "required-workflows"
}
},
"patch": {
"summary": "Update a required workflow",
"description": "Update a required workflow in an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.\n\nFor more information, see \"[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows).\"",
"tags": [
"actions"
],
"operationId": "actions/update-required-workflow",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#update-a-required-workflow"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/required-workflow-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"workflow_file_path": {
"description": "Path of the workflow file to be configured as a required workflow.",
"type": "string"
},
"repository_id": {
"description": "The ID of the repository that contains the workflow file.",
"type": "string"
},
"scope": {
"description": "Enable the required workflow for all repositories or selected repositories in the organization.",
"type": "string",
"enum": [
"selected",
"all"
],
"default": "all"
},
"selected_repository_ids": {
"description": "A list of repository IDs where you want to enable the required workflow. A list of repository IDs where you want to enable the required workflow. You can only provide a list of repository ids when the `scope` is set to `selected`.",
"type": "array",
"items": {
"type": "integer",
"description": "Unique identifier of the repository."
}
}
}
},
"examples": {
"default": {
"value": {
"workflow_file_path": ".github/workflows/ci.yaml",
"repository_id": 53,
"scope": "selected",
"selected_repository_ids": [
32,
91
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/required-workflow"
},
"examples": {
"default": {
"$ref": "#/components/examples/required-workflow"
}
}
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed_simple"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "required-workflows"
}
},
"delete": {
"summary": "Delete a required workflow",
"description": "Deletes a required workflow configured in an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.\n\nFor more information, see \"[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows).\"",
"tags": [
"actions"
],
"operationId": "actions/delete-required-workflow",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#delete-a-required-workflow"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/required-workflow-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "required-workflows"
}
}
},
"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories": {
"get": {
"summary": "List selected repositories for a required workflow",
"description": "Lists the selected repositories that are configured for a required workflow in an organization. To use this endpoint, the required workflow must be configured to run on selected repositories.\n\nYou must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this endpoint.\n\nFor more information, see \"[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows).\"",
"operationId": "actions/list-selected-repositories-required-workflow",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation https://docs.github.com/rest/reference/actions#list-selected-repositories-required-workflows",
"url": "https://docs.github.com/rest/reference/actions#list-selected-repositories-required-workflows"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/required-workflow-id"
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"repositories"
],
"properties": {
"total_count": {
"type": "number"
},
"repositories": {
"type": "array",
"items": {
"$ref": "#/components/schemas/repository"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/repository-paginated"
}
}
}
}
},
"404": {
"description": "Resource Not Found"
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "required-workflows"
}
},
"put": {
"summary": "Sets repositories for a required workflow",
"description": "Sets the repositories for a required workflow that is required for selected repositories.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.\n\nFor more information, see \"[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows).\"",
"tags": [
"actions"
],
"operationId": "actions/set-selected-repos-to-required-workflow",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-selected-repositories-for-a-required-workflow"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/required-workflow-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"selected_repository_ids": {
"description": "The IDs of the repositories for which the workflow should be required.",
"type": "array",
"items": {
"type": "integer",
"description": "Unique identifier of the repository."
}
}
},
"required": [
"selected_repository_ids"
]
},
"examples": {
"default": {
"value": {
"selected_repository_ids": [
32,
91
]
}
}
}
}
}
},
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "required-workflows"
}
}
},
"/orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}": {
"put": {
"summary": "Add a repository to a required workflow",
"description": "Adds a repository to a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.\n\nFor more information, see \"[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows).\"",
"tags": [
"actions"
],
"operationId": "actions/add-selected-repo-to-required-workflow",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#add-a-repository-to-selected-repositories-list-for-a-required-workflow"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/required-workflow-id"
},
{
"$ref": "#/components/parameters/repository-id"
}
],
"responses": {
"204": {
"description": "Success"
},
"404": {
"description": "Resource Not Found"
},
"422": {
"description": "Validation Error"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "required-workflows"
}
},
"delete": {
"summary": "Remove a selected repository from required workflow",
"description": "Removes a repository from a required workflow. To use this endpoint, the required workflow must be configured to run on selected repositories.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.\n\nFor more information, see \"[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows).\"",
"tags": [
"actions"
],
"operationId": "actions/remove-selected-repo-from-required-workflow",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#remove-a-repository-from-selected-repositories-list-for-a-required-workflow"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/required-workflow-id"
},
{
"$ref": "#/components/parameters/repository-id"
}
],
"responses": {
"204": {
"description": "Success"
},
"404": {
"description": "Resource Not Found"
},
"422": {
"description": "Validation Error"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "required-workflows"
}
}
},
"/orgs/{org}/actions/runner-groups": {
"get": {
"summary": "List self-hosted runner groups for an organization",
"description": "Lists all self-hosted runner groups configured in an organization and inherited from an enterprise.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/list-self-hosted-runner-groups-for-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/visible-to-repository"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"runner_groups"
],
"properties": {
"total_count": {
"type": "number"
},
"runner_groups": {
"type": "array",
"items": {
"$ref": "#/components/schemas/runner-groups-org"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/runner-groups-org"
}
}
}
}
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
}
},
"post": {
"summary": "Create a self-hosted runner group for an organization",
"description": "Creates a new self-hosted runner group for an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/create-self-hosted-runner-group-for-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"description": "Name of the runner group.",
"type": "string"
},
"visibility": {
"description": "Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories.",
"type": "string",
"enum": [
"selected",
"all",
"private"
],
"default": "all"
},
"selected_repository_ids": {
"description": "List of repository IDs that can access the runner group.",
"type": "array",
"items": {
"type": "integer",
"description": "Unique identifier of the repository."
}
},
"runners": {
"description": "List of runner IDs to add to the runner group.",
"type": "array",
"items": {
"type": "integer",
"description": "Unique identifier of the runner."
}
},
"allows_public_repositories": {
"description": "Whether the runner group can be used by `public` repositories.",
"type": "boolean",
"default": false
},
"restricted_to_workflows": {
"description": "If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array.",
"type": "boolean",
"default": false
},
"selected_workflows": {
"description": "List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`.",
"type": "array",
"items": {
"type": "string",
"description": "Name of workflow the runner group should be allowed to run. Note that a ref, tag, or long SHA is required.",
"example": "octo-org/octo-repo/.github/workflows/deploy.yaml@main"
}
}
},
"required": [
"name"
]
},
"examples": {
"default": {
"value": {
"name": "Expensive hardware runners",
"visibility": "selected",
"selected_repository_ids": [
32,
91
],
"runners": [
9,
2
]
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/runner-groups-org"
},
"examples": {
"default": {
"$ref": "#/components/examples/runner-group"
}
}
}
}
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
}
}
},
"/orgs/{org}/actions/runner-groups/{runner_group_id}": {
"get": {
"summary": "Get a self-hosted runner group for an organization",
"description": "Gets a specific self-hosted runner group for an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/get-self-hosted-runner-group-for-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/runner-group-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/runner-groups-org"
},
"examples": {
"default": {
"$ref": "#/components/examples/runner-group-item"
}
}
}
}
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
}
},
"patch": {
"summary": "Update a self-hosted runner group for an organization",
"description": "Updates the `name` and `visibility` of a self-hosted runner group in an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/update-self-hosted-runner-group-for-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/runner-group-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"description": "Name of the runner group.",
"type": "string"
},
"visibility": {
"description": "Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories.",
"type": "string",
"enum": [
"selected",
"all",
"private"
]
},
"allows_public_repositories": {
"description": "Whether the runner group can be used by `public` repositories.",
"type": "boolean",
"default": false
},
"restricted_to_workflows": {
"description": "If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array.",
"type": "boolean",
"default": false
},
"selected_workflows": {
"description": "List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`.",
"type": "array",
"items": {
"type": "string",
"description": "Name of workflow the runner group should be allowed to run. Note that a ref, tag, or long SHA is required.",
"example": "octo-org/octo-repo/.github/workflows/deploy.yaml@main"
}
}
},
"required": [
"name"
]
},
"examples": {
"default": {
"value": {
"name": "Expensive hardware runners",
"visibility": "selected"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/runner-groups-org"
},
"examples": {
"default": {
"$ref": "#/components/examples/runner-group"
}
}
}
}
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
}
},
"delete": {
"summary": "Delete a self-hosted runner group from an organization",
"description": "Deletes a self-hosted runner group for an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/delete-self-hosted-runner-group-from-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/runner-group-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
}
}
},
"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": {
"get": {
"summary": "List repository access to a self-hosted runner group in an organization",
"description": "Lists the repositories with access to a self-hosted runner group configured in an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/list-repo-access-to-self-hosted-runner-group-in-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/runner-group-id"
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/per-page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"repositories"
],
"properties": {
"total_count": {
"type": "number"
},
"repositories": {
"type": "array",
"items": {
"$ref": "#/components/schemas/minimal-repository"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/minimal-repository-paginated"
}
}
}
}
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
}
},
"put": {
"summary": "Set repository access for a self-hosted runner group in an organization",
"description": "Replaces the list of repositories that have access to a self-hosted runner group configured in an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/set-repo-access-to-self-hosted-runner-group-in-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/runner-group-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"selected_repository_ids": {
"description": "List of repository IDs that can access the runner group.",
"type": "array",
"items": {
"type": "integer",
"description": "Unique identifier of the repository."
}
}
},
"required": [
"selected_repository_ids"
]
},
"examples": {
"default": {
"value": {
"selected_repository_ids": [
32,
91
]
}
}
}
}
}
},
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
}
}
},
"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": {
"delete": {
"summary": "Remove repository access to a self-hosted runner group in an organization",
"description": "Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see \"[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization).\"\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/remove-repo-access-to-self-hosted-runner-group-in-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/runner-group-id"
},
{
"$ref": "#/components/parameters/repository-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
}
}
},
"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners": {
"get": {
"summary": "List self-hosted runners in a group for an organization",
"description": "Lists self-hosted runners that are in a specific organization group.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/list-self-hosted-runners-in-group-for-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/runner-group-id"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"runners"
],
"properties": {
"total_count": {
"type": "number"
},
"runners": {
"type": "array",
"items": {
"$ref": "#/components/schemas/runner"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/runner-paginated"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
}
},
"put": {
"summary": "Set self-hosted runners in a group for an organization",
"description": "Replaces the list of self-hosted runners that are part of an organization runner group.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/set-self-hosted-runners-in-group-for-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/runner-group-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"runners": {
"description": "List of runner IDs to add to the runner group.",
"type": "array",
"items": {
"type": "integer",
"description": "Unique identifier of the runner."
}
}
},
"required": [
"runners"
]
},
"examples": {
"default": {
"value": {
"runners": [
9,
2
]
}
}
}
}
}
},
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
}
}
},
"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": {
"put": {
"summary": "Add a self-hosted runner to a group for an organization",
"description": "Adds a self-hosted runner to a runner group configured in an organization.\n\nYou must authenticate using an access token with the `admin:org`\nscope to use this endpoint.",
"operationId": "actions/add-self-hosted-runner-to-group-for-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/runner-group-id"
},
{
"$ref": "#/components/parameters/runner-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
}
},
"delete": {
"summary": "Remove a self-hosted runner from a group for an organization",
"description": "Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"operationId": "actions/remove-self-hosted-runner-from-group-for-org",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/runner-group-id"
},
{
"$ref": "#/components/parameters/runner-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "self-hosted-runner-groups"
}
}
},
"/orgs/{org}/actions/runners": {
"get": {
"summary": "List self-hosted runners for an organization",
"description": "Lists all self-hosted runners configured in an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-self-hosted-runners-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"runners"
],
"properties": {
"total_count": {
"type": "integer"
},
"runners": {
"type": "array",
"items": {
"$ref": "#/components/schemas/runner"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/runner-paginated"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
}
},
"/orgs/{org}/actions/runners/downloads": {
"get": {
"summary": "List runner applications for an organization",
"description": "Lists binaries for the runner application that you can download and run.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-runner-applications-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/runner-application"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/runner-application-items"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
}
},
"/orgs/{org}/actions/runners/registration-token": {
"post": {
"summary": "Create a registration token for an organization",
"description": "Returns a token that you can pass to the `config` script. The token expires after one hour.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.\n\n#### Example using registration token\n\nConfigure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.\n\n```\n./config.sh --url https://github.com/octo-org --token TOKEN\n```",
"tags": [
"actions"
],
"operationId": "actions/create-registration-token-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/authentication-token"
},
"examples": {
"default": {
"$ref": "#/components/examples/authentication-token"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
}
},
"/orgs/{org}/actions/runners/remove-token": {
"post": {
"summary": "Create a remove token for an organization",
"description": "Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.\n\n#### Example using remove token\n\nTo remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this\nendpoint.\n\n```\n./config.sh remove --token TOKEN\n```",
"tags": [
"actions"
],
"operationId": "actions/create-remove-token-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/authentication-token"
},
"examples": {
"default": {
"$ref": "#/components/examples/authentication-token-2"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
}
},
"/orgs/{org}/actions/runners/{runner_id}": {
"get": {
"summary": "Get a self-hosted runner for an organization",
"description": "Gets a specific self-hosted runner configured in an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-self-hosted-runner-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/runner-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/runner"
},
"examples": {
"default": {
"$ref": "#/components/examples/runner"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
},
"delete": {
"summary": "Delete a self-hosted runner from an organization",
"description": "Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/delete-self-hosted-runner-from-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/runner-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
}
},
"/orgs/{org}/actions/runners/{runner_id}/labels": {
"get": {
"summary": "List labels for a self-hosted runner for an organization",
"description": "Lists all labels for a self-hosted runner configured in an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-labels-for-self-hosted-runner-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/runner-id"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/actions_runner_labels"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
},
"post": {
"summary": "Add custom labels to a self-hosted runner for an organization",
"description": "Add custom labels to a self-hosted runner configured in an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/add-custom-labels-to-self-hosted-runner-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/runner-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"labels"
],
"properties": {
"labels": {
"type": "array",
"minItems": 1,
"maxItems": 100,
"description": "The names of the custom labels to add to the runner.",
"items": {
"type": "string"
}
}
}
},
"examples": {
"default": {
"value": {
"labels": [
"gpu",
"accelerated"
]
}
}
}
}
}
},
"responses": {
"200": {
"$ref": "#/components/responses/actions_runner_labels"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed_simple"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
},
"put": {
"summary": "Set custom labels for a self-hosted runner for an organization",
"description": "Remove all previous custom labels and set the new custom labels for a specific\nself-hosted runner configured in an organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/set-custom-labels-for-self-hosted-runner-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/runner-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"labels"
],
"properties": {
"labels": {
"type": "array",
"minItems": 0,
"maxItems": 100,
"description": "The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels.",
"items": {
"type": "string"
}
}
}
},
"examples": {
"default": {
"value": {
"labels": [
"gpu",
"accelerated"
]
}
}
}
}
}
},
"responses": {
"200": {
"$ref": "#/components/responses/actions_runner_labels"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed_simple"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
},
"delete": {
"summary": "Remove all custom labels from a self-hosted runner for an organization",
"description": "Remove all custom labels from a self-hosted runner configured in an\norganization. Returns the remaining read-only labels from the runner.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/remove-all-custom-labels-from-self-hosted-runner-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/runner-id"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/actions_runner_labels_readonly"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
}
},
"/orgs/{org}/actions/runners/{runner_id}/labels/{name}": {
"delete": {
"summary": "Remove a custom label from a self-hosted runner for an organization",
"description": "Remove a custom label from a self-hosted runner configured\nin an organization. Returns the remaining labels from the runner.\n\nThis endpoint returns a `404 Not Found` status if the custom label is not\npresent on the runner.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/remove-custom-label-from-self-hosted-runner-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/runner-id"
},
{
"$ref": "#/components/parameters/runner-label-name"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/actions_runner_labels"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed_simple"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
}
},
"/orgs/{org}/actions/secrets": {
"get": {
"summary": "List organization secrets",
"description": "Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-org-secrets",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-organization-secrets"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"secrets"
],
"properties": {
"total_count": {
"type": "integer"
},
"secrets": {
"type": "array",
"items": {
"$ref": "#/components/schemas/organization-actions-secret"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/organization-actions-secret-paginated"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
}
}
},
"/orgs/{org}/actions/secrets/public-key": {
"get": {
"summary": "Get an organization public key",
"description": "Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-org-public-key",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-an-organization-public-key"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/actions-public-key"
},
"examples": {
"default": {
"$ref": "#/components/examples/actions-public-key"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
}
}
},
"/orgs/{org}/actions/secrets/{secret_name}": {
"get": {
"summary": "Get an organization secret",
"description": "Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/organization-actions-secret"
},
"examples": {
"default": {
"$ref": "#/components/examples/organization-actions-secret"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
}
},
"put": {
"summary": "Create or update an organization secret",
"description": "Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access\ntoken with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to\nuse this endpoint.\n\n#### Example encrypting a secret using Node.js\n\nEncrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library.\n\n```\nconst sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n```\n\n#### Example encrypting a secret using Python\n\nEncrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3.\n\n```\nfrom base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n```\n\n#### Example encrypting a secret using C#\n\nEncrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.\n\n```\nvar secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n```\n\n#### Example encrypting a secret using Ruby\n\nEncrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.\n\n```ruby\nrequire \"rbnacl\"\nrequire \"base64\"\n\nkey = Base64.decode64(\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\")\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(\"my_secret\")\n\n# Print the base64 encoded secret\nputs Base64.strict_encode64(encrypted_secret)\n```",
"tags": [
"actions"
],
"operationId": "actions/create-or-update-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"encrypted_value": {
"type": "string",
"description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint.",
"pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$"
},
"key_id": {
"type": "string",
"description": "ID of the key you used to encrypt the secret."
},
"visibility": {
"type": "string",
"description": "Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret.",
"enum": [
"all",
"private",
"selected"
]
},
"selected_repository_ids": {
"type": "array",
"description": "An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints.",
"items": {
"type": "integer"
}
}
},
"required": [
"visibility"
]
},
"examples": {
"default": {
"value": {
"encrypted_value": "c2VjcmV0",
"key_id": "012345678912345678",
"visibility": "selected",
"selected_repository_ids": [
1296269,
1296280
]
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response when creating a secret",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/empty-object"
},
"examples": {
"default": {
"value": null
}
}
}
}
},
"204": {
"description": "Response when updating a secret"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
}
},
"delete": {
"summary": "Delete an organization secret",
"description": "Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/delete-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#delete-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
}
}
},
"/orgs/{org}/actions/secrets/{secret_name}/repositories": {
"get": {
"summary": "List selected repositories for an organization secret",
"description": "Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-selected-repos-for-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/per-page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"repositories"
],
"properties": {
"total_count": {
"type": "integer"
},
"repositories": {
"type": "array",
"items": {
"$ref": "#/components/schemas/minimal-repository"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/public-repository-paginated"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
}
},
"put": {
"summary": "Set selected repositories for an organization secret",
"description": "Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/set-selected-repos-for-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"selected_repository_ids": {
"type": "array",
"description": "An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Add selected repository to an organization secret](https://docs.github.com/rest/actions/secrets#add-selected-repository-to-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints.",
"items": {
"type": "integer"
}
}
},
"required": [
"selected_repository_ids"
]
},
"examples": {
"default": {
"value": {
"selected_repository_ids": [
64780797
]
}
}
}
}
}
},
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
}
}
},
"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": {
"put": {
"summary": "Add selected repository to an organization secret",
"description": "Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/add-selected-repo-to-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#add-selected-repository-to-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
},
{
"name": "repository_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"204": {
"description": "No Content when repository was added to the selected list"
},
"409": {
"description": "Conflict when visibility type is not set to selected"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
}
},
"delete": {
"summary": "Remove selected repository from an organization secret",
"description": "Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/remove-selected-repo-from-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
},
{
"name": "repository_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"204": {
"description": "Response when repository was removed from the selected list"
},
"409": {
"description": "Conflict when visibility type not set to selected"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
}
}
},
"/orgs/{org}/actions/variables": {
"get": {
"summary": "List organization variables",
"description": "Lists all organization variables. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-org-variables",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/actions/variables#list-organization-variables"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/variables-per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"variables"
],
"properties": {
"total_count": {
"type": "integer"
},
"variables": {
"type": "array",
"items": {
"$ref": "#/components/schemas/organization-actions-variable"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/organization-actions-variables-paginated"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "variables"
}
},
"post": {
"summary": "Create an organization variable",
"description": "Creates an organization variable that you can reference in a GitHub Actions workflow.\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.\nGitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/create-org-variable",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/actions/variables#create-an-organization-variable"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the variable."
},
"value": {
"type": "string",
"description": "The value of the variable."
},
"visibility": {
"type": "string",
"description": "The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable.",
"enum": [
"all",
"private",
"selected"
]
},
"selected_repository_ids": {
"type": "array",
"description": "An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`.",
"items": {
"type": "integer"
}
}
},
"required": [
"name",
"value",
"visibility"
]
},
"examples": {
"default": {
"value": {
"name": "USERNAME",
"value": "octocat",
"visibility": "selected",
"selected_repository_ids": [
1296269,
1296280
]
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response when creating a variable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/empty-object"
},
"examples": {
"default": {
"value": null
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "variables"
}
}
},
"/orgs/{org}/actions/variables/{name}": {
"get": {
"summary": "Get an organization variable",
"description": "Gets a specific variable in an organization. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-org-variable",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/actions/variables#get-an-organization-variable"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/variable-name"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/organization-actions-variable"
},
"examples": {
"default": {
"$ref": "#/components/examples/organization-actions-variable"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "variables"
}
},
"patch": {
"summary": "Update an organization variable",
"description": "Updates an organization variable that you can reference in a GitHub Actions workflow.\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.\nGitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/update-org-variable",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/actions/variables#update-an-organization-variable"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/variable-name"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the variable."
},
"value": {
"type": "string",
"description": "The value of the variable."
},
"visibility": {
"type": "string",
"description": "The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable.",
"enum": [
"all",
"private",
"selected"
]
},
"selected_repository_ids": {
"type": "array",
"description": "An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`.",
"items": {
"type": "integer"
}
}
}
},
"examples": {
"default": {
"value": {
"name": "USERNAME",
"value": "octocat",
"visibility": "selected",
"selected_repository_ids": [
1296269,
1296280
]
}
}
}
}
}
},
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "variables"
}
},
"delete": {
"summary": "Delete an organization variable",
"description": "Deletes an organization variable using the variable name.\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.\nGitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/delete-org-variable",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/actions/variables#delete-an-organization-variable"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/variable-name"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "variables"
}
}
},
"/orgs/{org}/actions/variables/{name}/repositories": {
"get": {
"summary": "List selected repositories for an organization variable",
"description": "Lists all repositories that can access an organization variable that is available to selected repositories. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:read` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-selected-repos-for-org-variable",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/actions/variables#list-selected-repositories-for-an-organization-variable"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/variable-name"
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/per-page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"repositories"
],
"properties": {
"total_count": {
"type": "integer"
},
"repositories": {
"type": "array",
"items": {
"$ref": "#/components/schemas/minimal-repository"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/public-repository-paginated"
}
}
}
}
},
"409": {
"description": "Response when the visibility of the variable is not set to `selected`"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "variables"
}
},
"put": {
"summary": "Set selected repositories for an organization variable",
"description": "Replaces all repositories for an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/set-selected-repos-for-org-variable",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/actions/variables#set-selected-repositories-for-an-organization-variable"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/variable-name"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"selected_repository_ids": {
"type": "array",
"description": "The IDs of the repositories that can access the organization variable.",
"items": {
"type": "integer"
}
}
},
"required": [
"selected_repository_ids"
]
},
"examples": {
"default": {
"value": {
"selected_repository_ids": [
64780797
]
}
}
}
}
}
},
"responses": {
"204": {
"description": "Response"
},
"409": {
"description": "Response when the visibility of the variable is not set to `selected`"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "variables"
}
}
},
"/orgs/{org}/actions/variables/{name}/repositories/{repository_id}": {
"put": {
"summary": "Add selected repository to an organization variable",
"description": "Adds a repository to an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/add-selected-repo-to-org-variable",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/actions/variables#add-selected-repository-to-an-organization-variable"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/variable-name"
},
{
"name": "repository_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"204": {
"description": "Response"
},
"409": {
"description": "Response when the visibility of the variable is not set to `selected`"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "variables"
}
},
"delete": {
"summary": "Remove selected repository from an organization variable",
"description": "Removes a repository from an organization variable that is available to selected repositories. Organization variables that are available to selected repositories have their `visibility` field set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `organization_actions_variables:write` organization permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/remove-selected-repo-from-org-variable",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/actions/variables#remove-selected-repository-from-an-organization-variable"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/variable-name"
},
{
"name": "repository_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"204": {
"description": "Response"
},
"409": {
"description": "Response when the visibility of the variable is not set to `selected`"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "variables"
}
}
},
"/orgs/{org}/blocks": {
"get": {
"summary": "List users blocked by an organization",
"description": "List the users blocked by an organization.",
"tags": [
"orgs"
],
"operationId": "orgs/list-blocked-users",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/simple-user"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/simple-user-items"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "blocking"
}
}
},
"/orgs/{org}/blocks/{username}": {
"get": {
"summary": "Check if a user is blocked by an organization",
"description": "",
"tags": [
"orgs"
],
"operationId": "orgs/check-blocked-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#check-if-a-user-is-blocked-by-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/username"
}
],
"responses": {
"204": {
"description": "If the user is blocked"
},
"404": {
"description": "If the user is not blocked",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/basic-error"
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "blocking"
}
},
"put": {
"summary": "Block a user from an organization",
"description": "",
"tags": [
"orgs"
],
"operationId": "orgs/block-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#block-a-user-from-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/username"
}
],
"responses": {
"204": {
"description": "Response"
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "blocking"
}
},
"delete": {
"summary": "Unblock a user from an organization",
"description": "",
"tags": [
"orgs"
],
"operationId": "orgs/unblock-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#unblock-a-user-from-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/username"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "blocking"
}
}
},
"/orgs/{org}/code-scanning/alerts": {
"get": {
"summary": "List code scanning alerts for an organization",
"description": "Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see \"[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).\"\n\nTo use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope.\n\nFor public repositories, you may instead use the `public_repo` scope.\n\nGitHub Apps must have the `security_events` read permission to use this endpoint.",
"tags": [
"code-scanning"
],
"operationId": "code-scanning/list-alerts-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/tool-name"
},
{
"$ref": "#/components/parameters/tool-guid"
},
{
"$ref": "#/components/parameters/pagination-before"
},
{
"$ref": "#/components/parameters/pagination-after"
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/direction"
},
{
"name": "state",
"description": "If specified, only code scanning alerts with this state will be returned.",
"in": "query",
"required": false,
"schema": {
"$ref": "#/components/schemas/code-scanning-alert-state"
}
},
{
"name": "sort",
"description": "The property by which to sort the results.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"created",
"updated"
],
"default": "created"
}
},
{
"name": "severity",
"description": "If specified, only code scanning alerts with this severity will be returned.",
"in": "query",
"required": false,
"schema": {
"$ref": "#/components/schemas/code-scanning-alert-severity"
}
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/code-scanning-organization-alert-items"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/code-scanning-organization-alert-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"503": {
"$ref": "#/components/responses/service_unavailable"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "code-scanning",
"subcategory": null
}
}
},
"/orgs/{org}/codespaces": {
"get": {
"summary": "List codespaces for the organization",
"description": "Lists the codespaces associated to a specified organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"codespaces"
],
"operationId": "codespaces/list-in-organization",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/codespaces#list-in-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"codespaces"
],
"properties": {
"total_count": {
"type": "integer"
},
"codespaces": {
"type": "array",
"items": {
"$ref": "#/components/schemas/codespace"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/codespaces-list"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"500": {
"$ref": "#/components/responses/internal_error"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "codespaces",
"subcategory": "organizations"
}
}
},
"/orgs/{org}/codespaces/billing": {
"put": {
"summary": "Manage access control for organization codespaces",
"description": "Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces billing permissions for users according to the visibility.\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"codespaces"
],
"operationId": "codespaces/set-codespaces-billing",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/codespaces#set-codespaces-billing"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"visibility": {
"type": "string",
"description": "Which users can access codespaces in the organization. `disabled` means that no users can access codespaces in the organization.",
"enum": [
"disabled",
"selected_members",
"all_members",
"all_members_and_outside_collaborators"
]
},
"selected_usernames": {
"type": "array",
"description": "The usernames of the organization members who should have access to codespaces in the organization. Required when `visibility` is `selected_members`. The provided list of usernames will replace any existing value.",
"items": {
"type": "string"
}
}
},
"required": [
"visibility"
]
},
"examples": {
"default": {
"value": {
"visibility": "selected_members",
"selected_usernames": [
"johnDoe",
"atomIO"
]
}
}
}
}
}
},
"responses": {
"204": {
"description": "Response when successfully modifying permissions."
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"400": {
"description": "Users are neither members nor collaborators of this organization."
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"500": {
"$ref": "#/components/responses/internal_error"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "codespaces",
"subcategory": "organizations"
}
}
},
"/orgs/{org}/codespaces/secrets": {
"get": {
"summary": "List organization secrets",
"description": "Lists all Codespaces secrets available at the organization-level without revealing their encrypted values.\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"codespaces"
],
"operationId": "codespaces/list-org-secrets",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/codespaces#list-organization-secrets"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"secrets"
],
"properties": {
"total_count": {
"type": "integer"
},
"secrets": {
"type": "array",
"items": {
"$ref": "#/components/schemas/codespaces-org-secret"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/repo-codespaces-secret-paginated"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "codespaces",
"subcategory": "organization-secrets"
}
}
},
"/orgs/{org}/codespaces/secrets/public-key": {
"get": {
"summary": "Get an organization public key",
"description": "Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"codespaces"
],
"operationId": "codespaces/get-org-public-key",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/codespaces-public-key"
},
"examples": {
"default": {
"$ref": "#/components/examples/codespaces-public-key"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "codespaces",
"subcategory": "organization-secrets"
}
}
},
"/orgs/{org}/codespaces/secrets/{secret_name}": {
"get": {
"summary": "Get an organization secret",
"description": "Gets an organization secret without revealing its encrypted value.\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"codespaces"
],
"operationId": "codespaces/get-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/codespaces#get-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/codespaces-org-secret"
},
"examples": {
"default": {
"$ref": "#/components/examples/repo-codespaces-secret"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "codespaces",
"subcategory": "organization-secrets"
}
},
"put": {
"summary": "Create or update an organization secret",
"description": "Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access\ntoken with the `admin:org` scope to use this endpoint.\n\n#### Example encrypting a secret using Node.js\n\nEncrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library.\n\n```\nconst sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n```\n\n#### Example encrypting a secret using Python\n\nEncrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3.\n\n```\nfrom base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n```\n\n#### Example encrypting a secret using C#\n\nEncrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.\n\n```\nvar secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n```\n\n#### Example encrypting a secret using Ruby\n\nEncrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.\n\n```ruby\nrequire \"rbnacl\"\nrequire \"base64\"\n\nkey = Base64.decode64(\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\")\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(\"my_secret\")\n\n# Print the base64 encoded secret\nputs Base64.strict_encode64(encrypted_secret)\n```",
"tags": [
"codespaces"
],
"operationId": "codespaces/create-or-update-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"encrypted_value": {
"type": "string",
"description": "The value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/codespaces#get-an-organization-public-key) endpoint.",
"pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$"
},
"key_id": {
"type": "string",
"description": "The ID of the key you used to encrypt the secret."
},
"visibility": {
"type": "string",
"description": "Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret.",
"enum": [
"all",
"private",
"selected"
]
},
"selected_repository_ids": {
"type": "array",
"description": "An array of repository IDs that can access the organization secret. You can only provide a list of repository IDs when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints.",
"items": {
"type": "integer"
}
}
},
"required": [
"visibility"
]
},
"examples": {
"default": {
"value": {
"encrypted_value": "c2VjcmV0",
"key_id": "012345678912345678",
"visibility": "selected",
"selected_repository_ids": [
1296269,
1296280
]
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response when creating a secret",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/empty-object"
},
"examples": {
"default": {
"value": null
}
}
}
}
},
"204": {
"description": "Response when updating a secret"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "codespaces",
"subcategory": "organization-secrets"
}
},
"delete": {
"summary": "Delete an organization secret",
"description": "Deletes an organization secret using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"codespaces"
],
"operationId": "codespaces/delete-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/codespaces#delete-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
}
],
"responses": {
"204": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "codespaces",
"subcategory": "organization-secrets"
}
}
},
"/orgs/{org}/codespaces/secrets/{secret_name}/repositories": {
"get": {
"summary": "List selected repositories for an organization secret",
"description": "Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"codespaces"
],
"operationId": "codespaces/list-selected-repos-for-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/per-page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"repositories"
],
"properties": {
"total_count": {
"type": "integer"
},
"repositories": {
"type": "array",
"items": {
"$ref": "#/components/schemas/minimal-repository"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/public-repository-paginated"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "codespaces",
"subcategory": "organization-secrets"
}
},
"put": {
"summary": "Set selected repositories for an organization secret",
"description": "Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"codespaces"
],
"operationId": "codespaces/set-selected-repos-for-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"selected_repository_ids": {
"type": "array",
"description": "An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret) endpoints.",
"items": {
"type": "integer"
}
}
},
"required": [
"selected_repository_ids"
]
},
"examples": {
"default": {
"value": {
"selected_repository_ids": [
64780797
]
}
}
}
}
}
},
"responses": {
"204": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"409": {
"description": "Conflict when visibility type not set to selected"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "codespaces",
"subcategory": "organization-secrets"
}
}
},
"/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}": {
"put": {
"summary": "Add selected repository to an organization secret",
"description": "Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"codespaces"
],
"operationId": "codespaces/add-selected-repo-to-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/codespaces#add-selected-repository-to-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
},
{
"name": "repository_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"204": {
"description": "No Content when repository was added to the selected list"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"409": {
"description": "Conflict when visibility type is not set to selected"
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "codespaces",
"subcategory": "organization-secrets"
}
},
"delete": {
"summary": "Remove selected repository from an organization secret",
"description": "Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/codespaces#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"codespaces"
],
"operationId": "codespaces/remove-selected-repo-from-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/codespaces#remove-selected-repository-from-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
},
{
"name": "repository_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"204": {
"description": "Response when repository was removed from the selected list"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"409": {
"description": "Conflict when visibility type not set to selected"
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "codespaces",
"subcategory": "organization-secrets"
}
}
},
"/orgs/{org}/dependabot/alerts": {
"get": {
"summary": "List Dependabot alerts for an organization",
"description": "Lists Dependabot alerts for an organization.\n\nTo use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope.\n\nFor public repositories, you may instead use the `public_repo` scope.\n\nGitHub Apps must have **Dependabot alerts** read permission to use this endpoint.",
"tags": [
"dependabot"
],
"operationId": "dependabot/list-alerts-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/dependabot-alert-comma-separated-states"
},
{
"$ref": "#/components/parameters/dependabot-alert-comma-separated-severities"
},
{
"$ref": "#/components/parameters/dependabot-alert-comma-separated-ecosystems"
},
{
"$ref": "#/components/parameters/dependabot-alert-comma-separated-packages"
},
{
"$ref": "#/components/parameters/dependabot-alert-scope"
},
{
"$ref": "#/components/parameters/dependabot-alert-sort"
},
{
"$ref": "#/components/parameters/direction"
},
{
"$ref": "#/components/parameters/pagination-before"
},
{
"$ref": "#/components/parameters/pagination-after"
},
{
"$ref": "#/components/parameters/pagination-first"
},
{
"$ref": "#/components/parameters/pagination-last"
},
{
"$ref": "#/components/parameters/per-page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/dependabot-alert-with-repository"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/dependabot-alerts-for-organization"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"400": {
"$ref": "#/components/responses/bad_request"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed_simple"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "dependabot",
"subcategory": "alerts"
}
}
},
"/orgs/{org}/dependabot/secrets": {
"get": {
"summary": "List organization secrets",
"description": "Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint.",
"tags": [
"dependabot"
],
"operationId": "dependabot/list-org-secrets",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/dependabot#list-organization-secrets"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"secrets"
],
"properties": {
"total_count": {
"type": "integer"
},
"secrets": {
"type": "array",
"items": {
"$ref": "#/components/schemas/organization-dependabot-secret"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/organization-dependabot-secret-paginated"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "dependabot",
"subcategory": "secrets"
}
}
},
"/orgs/{org}/dependabot/secrets/public-key": {
"get": {
"summary": "Get an organization public key",
"description": "Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint.",
"tags": [
"dependabot"
],
"operationId": "dependabot/get-org-public-key",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/dependabot-public-key"
},
"examples": {
"default": {
"$ref": "#/components/examples/dependabot-public-key"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "dependabot",
"subcategory": "secrets"
}
}
},
"/orgs/{org}/dependabot/secrets/{secret_name}": {
"get": {
"summary": "Get an organization secret",
"description": "Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint.",
"tags": [
"dependabot"
],
"operationId": "dependabot/get-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/dependabot#get-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/organization-dependabot-secret"
},
"examples": {
"default": {
"$ref": "#/components/examples/organization-dependabot-secret"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "dependabot",
"subcategory": "secrets"
}
},
"put": {
"summary": "Create or update an organization secret",
"description": "Creates or updates an organization secret with an encrypted value. Encrypt your secret using\n[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access\ntoken with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization\npermission to use this endpoint.\n\n#### Example encrypting a secret using Node.js\n\nEncrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library.\n\n```\nconst sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n```\n\n#### Example encrypting a secret using Python\n\nEncrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3.\n\n```\nfrom base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n```\n\n#### Example encrypting a secret using C#\n\nEncrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.\n\n```\nvar secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n```\n\n#### Example encrypting a secret using Ruby\n\nEncrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.\n\n```ruby\nrequire \"rbnacl\"\nrequire \"base64\"\n\nkey = Base64.decode64(\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\")\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(\"my_secret\")\n\n# Print the base64 encoded secret\nputs Base64.strict_encode64(encrypted_secret)\n```",
"tags": [
"dependabot"
],
"operationId": "dependabot/create-or-update-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"encrypted_value": {
"type": "string",
"description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key) endpoint.",
"pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$"
},
"key_id": {
"type": "string",
"description": "ID of the key you used to encrypt the secret."
},
"visibility": {
"type": "string",
"description": "Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret.",
"enum": [
"all",
"private",
"selected"
]
},
"selected_repository_ids": {
"type": "array",
"description": "An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints.",
"items": {
"type": "string"
}
}
},
"required": [
"visibility"
]
},
"examples": {
"default": {
"value": {
"encrypted_value": "c2VjcmV0",
"key_id": "012345678912345678",
"visibility": "selected",
"selected_repository_ids": [
"1296269",
"1296280"
]
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response when creating a secret",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/empty-object"
},
"examples": {
"default": {
"value": null
}
}
}
}
},
"204": {
"description": "Response when updating a secret"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "dependabot",
"subcategory": "secrets"
}
},
"delete": {
"summary": "Delete an organization secret",
"description": "Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint.",
"tags": [
"dependabot"
],
"operationId": "dependabot/delete-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/dependabot#delete-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "dependabot",
"subcategory": "secrets"
}
}
},
"/orgs/{org}/dependabot/secrets/{secret_name}/repositories": {
"get": {
"summary": "List selected repositories for an organization secret",
"description": "Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint.",
"tags": [
"dependabot"
],
"operationId": "dependabot/list-selected-repos-for-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/per-page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"repositories"
],
"properties": {
"total_count": {
"type": "integer"
},
"repositories": {
"type": "array",
"items": {
"$ref": "#/components/schemas/minimal-repository"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/public-repository-paginated"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "dependabot",
"subcategory": "secrets"
}
},
"put": {
"summary": "Set selected repositories for an organization secret",
"description": "Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint.",
"tags": [
"dependabot"
],
"operationId": "dependabot/set-selected-repos-for-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"selected_repository_ids": {
"type": "array",
"description": "An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints.",
"items": {
"type": "integer"
}
}
},
"required": [
"selected_repository_ids"
]
},
"examples": {
"default": {
"value": {
"selected_repository_ids": [
64780797
]
}
}
}
}
}
},
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "dependabot",
"subcategory": "secrets"
}
}
},
"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": {
"put": {
"summary": "Add selected repository to an organization secret",
"description": "Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint.",
"tags": [
"dependabot"
],
"operationId": "dependabot/add-selected-repo-to-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/dependabot#add-selected-repository-to-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
},
{
"name": "repository_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"204": {
"description": "No Content when repository was added to the selected list"
},
"409": {
"description": "Conflict when visibility type is not set to selected"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "dependabot",
"subcategory": "secrets"
}
},
"delete": {
"summary": "Remove selected repository from an organization secret",
"description": "Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint.",
"tags": [
"dependabot"
],
"operationId": "dependabot/remove-selected-repo-from-org-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-name"
},
{
"name": "repository_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"204": {
"description": "Response when repository was removed from the selected list"
},
"409": {
"description": "Conflict when visibility type not set to selected"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "dependabot",
"subcategory": "secrets"
}
}
},
"/orgs/{org}/events": {
"get": {
"summary": "List public organization events",
"description": "",
"tags": [
"activity"
],
"operationId": "activity/list-public-org-events",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/activity#list-public-organization-events"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/event"
}
},
"examples": {
"200-response": {
"$ref": "#/components/examples/public-org-events-items"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "activity",
"subcategory": "events"
}
}
},
"/orgs/{org}/failed_invitations": {
"get": {
"summary": "List failed organization invitations",
"description": "The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure.",
"tags": [
"orgs"
],
"operationId": "orgs/list-failed-invitations",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/organization-invitation"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/organization-invitation-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
}
}
},
"/orgs/{org}/hooks": {
"get": {
"summary": "List organization webhooks",
"description": "",
"tags": [
"orgs"
],
"operationId": "orgs/list-webhooks",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-organization-webhooks"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/org-hook"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/org-hook-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "webhooks"
}
},
"post": {
"summary": "Create an organization webhook",
"description": "Here's how you can create a hook that posts payloads in JSON format:",
"tags": [
"orgs"
],
"operationId": "orgs/create-webhook",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#create-an-organization-webhook"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Must be passed as \"web\"."
},
"config": {
"type": "object",
"description": "Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params).",
"properties": {
"url": {
"$ref": "#/components/schemas/webhook-config-url"
},
"content_type": {
"$ref": "#/components/schemas/webhook-config-content-type"
},
"secret": {
"$ref": "#/components/schemas/webhook-config-secret"
},
"insecure_ssl": {
"$ref": "#/components/schemas/webhook-config-insecure-ssl"
},
"username": {
"type": "string",
"example": "\"kdaigle\""
},
"password": {
"type": "string",
"example": "\"password\""
}
},
"required": [
"url"
]
},
"events": {
"type": "array",
"description": "Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. Set to `[\"*\"]` to receive all possible events.",
"default": [
"push"
],
"items": {
"type": "string"
}
},
"active": {
"type": "boolean",
"description": "Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.",
"default": true
}
},
"required": [
"name",
"config"
]
},
"examples": {
"default": {
"value": {
"name": "web",
"active": true,
"events": [
"push",
"pull_request"
],
"config": {
"url": "http://example.com/webhook",
"content_type": "json"
}
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/org-hook"
},
"examples": {
"default": {
"$ref": "#/components/examples/org-hook"
}
}
}
},
"headers": {
"Location": {
"example": "https://api.github.com/orgs/octocat/hooks/1",
"schema": {
"type": "string"
}
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "webhooks"
}
}
},
"/orgs/{org}/hooks/{hook_id}": {
"get": {
"summary": "Get an organization webhook",
"description": "Returns a webhook configured in an organization. To get only the webhook `config` properties, see \"[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization).\"",
"tags": [
"orgs"
],
"operationId": "orgs/get-webhook",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#get-an-organization-webhook"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/hook-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/org-hook"
},
"examples": {
"default": {
"$ref": "#/components/examples/org-hook"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "webhooks"
}
},
"patch": {
"summary": "Update an organization webhook",
"description": "Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use \"[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization).\"",
"tags": [
"orgs"
],
"operationId": "orgs/update-webhook",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#update-an-organization-webhook"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/hook-id"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"config": {
"type": "object",
"description": "Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params).",
"properties": {
"url": {
"$ref": "#/components/schemas/webhook-config-url"
},
"content_type": {
"$ref": "#/components/schemas/webhook-config-content-type"
},
"secret": {
"$ref": "#/components/schemas/webhook-config-secret"
},
"insecure_ssl": {
"$ref": "#/components/schemas/webhook-config-insecure-ssl"
}
},
"required": [
"url"
]
},
"events": {
"type": "array",
"description": "Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for.",
"default": [
"push"
],
"items": {
"type": "string"
}
},
"active": {
"type": "boolean",
"description": "Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.",
"default": true
},
"name": {
"type": "string",
"example": "\"web\""
}
}
},
"examples": {
"default": {
"value": {
"active": true,
"events": [
"pull_request"
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/org-hook"
},
"examples": {
"default": {
"$ref": "#/components/examples/org-hook-2"
}
}
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "webhooks"
}
},
"delete": {
"summary": "Delete an organization webhook",
"description": "",
"tags": [
"orgs"
],
"operationId": "orgs/delete-webhook",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#delete-an-organization-webhook"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/hook-id"
}
],
"responses": {
"204": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "webhooks"
}
}
},
"/orgs/{org}/hooks/{hook_id}/config": {
"get": {
"summary": "Get a webhook configuration for an organization",
"description": "Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use \"[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook).\"\n\nAccess tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission.",
"tags": [
"orgs"
],
"operationId": "orgs/get-webhook-config-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#get-a-webhook-configuration-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/hook-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhook-config"
},
"examples": {
"default": {
"$ref": "#/components/examples/webhook-config"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "webhooks"
}
},
"patch": {
"summary": "Update a webhook configuration for an organization",
"description": "Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use \"[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook).\"\n\nAccess tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission.",
"tags": [
"orgs"
],
"operationId": "orgs/update-webhook-config-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#update-a-webhook-configuration-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/hook-id"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"url": {
"$ref": "#/components/schemas/webhook-config-url"
},
"content_type": {
"$ref": "#/components/schemas/webhook-config-content-type"
},
"secret": {
"$ref": "#/components/schemas/webhook-config-secret"
},
"insecure_ssl": {
"$ref": "#/components/schemas/webhook-config-insecure-ssl"
}
}
},
"examples": {
"default": {
"summary": "Update an existing webhook",
"value": {
"url": "http://example.com/webhook",
"content_type": "json",
"insecure_ssl": "0",
"secret": "********"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhook-config"
},
"examples": {
"default": {
"$ref": "#/components/examples/webhook-config"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "webhooks"
}
}
},
"/orgs/{org}/hooks/{hook_id}/deliveries": {
"get": {
"summary": "List deliveries for an organization webhook",
"description": "Returns a list of webhook deliveries for a webhook configured in an organization.",
"tags": [
"orgs"
],
"operationId": "orgs/list-webhook-deliveries",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/hook-id"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/cursor"
},
{
"name": "redelivery",
"in": "query",
"required": false,
"schema": {
"type": "boolean"
}
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/hook-delivery-item"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/hook-delivery-items"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/bad_request"
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "webhooks"
}
}
},
"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": {
"get": {
"summary": "Get a webhook delivery for an organization webhook",
"description": "Returns a delivery for a webhook configured in an organization.",
"tags": [
"orgs"
],
"operationId": "orgs/get-webhook-delivery",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/hook-id"
},
{
"$ref": "#/components/parameters/delivery-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/hook-delivery"
},
"examples": {
"default": {
"$ref": "#/components/examples/hook-delivery"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/bad_request"
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "webhooks"
}
}
},
"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": {
"post": {
"summary": "Redeliver a delivery for an organization webhook",
"description": "Redeliver a delivery for a webhook configured in an organization.",
"tags": [
"orgs"
],
"operationId": "orgs/redeliver-webhook-delivery",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/hook-id"
},
{
"$ref": "#/components/parameters/delivery-id"
}
],
"responses": {
"202": {
"$ref": "#/components/responses/accepted"
},
"400": {
"$ref": "#/components/responses/bad_request"
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "webhooks"
}
}
},
"/orgs/{org}/hooks/{hook_id}/pings": {
"post": {
"summary": "Ping an organization webhook",
"description": "This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook.",
"tags": [
"orgs"
],
"operationId": "orgs/ping-webhook",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#ping-an-organization-webhook"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/hook-id"
}
],
"responses": {
"204": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "webhooks"
}
}
},
"/orgs/{org}/installation": {
"get": {
"summary": "Get an organization installation for the authenticated app",
"description": "Enables an authenticated GitHub App to find the organization's installation information.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.",
"tags": [
"apps"
],
"operationId": "apps/get-org-installation",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/installation"
},
"examples": {
"default": {
"$ref": "#/components/examples/installation"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "apps",
"subcategory": null
}
}
},
"/orgs/{org}/installations": {
"get": {
"summary": "List app installations for an organization",
"description": "Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint.",
"tags": [
"orgs"
],
"operationId": "orgs/list-app-installations",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"installations"
],
"properties": {
"total_count": {
"type": "integer"
},
"installations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/installation"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/installation-paginated"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": null
}
}
},
"/orgs/{org}/interaction-limits": {
"get": {
"summary": "Get interaction restrictions for an organization",
"description": "Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response.",
"tags": [
"interactions"
],
"operationId": "interactions/get-restrictions-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/interaction-limit-response"
},
{
"type": "object",
"properties": {
},
"additionalProperties": false
}
]
},
"examples": {
"default": {
"$ref": "#/components/examples/interaction-limit-response"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "interactions",
"subcategory": "orgs"
}
},
"put": {
"summary": "Set interaction restrictions for an organization",
"description": "Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization.",
"tags": [
"interactions"
],
"operationId": "interactions/set-restrictions-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/interaction-limit"
},
"examples": {
"default": {
"value": {
"limit": "collaborators_only",
"expiry": "one_month"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/interaction-limit-response"
},
"examples": {
"default": {
"$ref": "#/components/examples/interaction-limit-response"
}
}
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "interactions",
"subcategory": "orgs"
}
},
"delete": {
"summary": "Remove interaction restrictions for an organization",
"description": "Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions.",
"tags": [
"interactions"
],
"operationId": "interactions/remove-restrictions-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "interactions",
"subcategory": "orgs"
}
}
},
"/orgs/{org}/invitations": {
"get": {
"summary": "List pending organization invitations",
"description": "The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`.",
"tags": [
"orgs"
],
"operationId": "orgs/list-pending-invitations",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-pending-organization-invitations"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/organization-invitation"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/organization-invitation-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
}
},
"post": {
"summary": "Create an organization invitation",
"description": "Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.\n\nThis endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.",
"tags": [
"orgs"
],
"operationId": "orgs/create-invitation",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#create-an-organization-invitation"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"invitee_id": {
"type": "integer",
"description": "**Required unless you provide `email`**. GitHub user ID for the person you are inviting."
},
"email": {
"type": "string",
"description": "**Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user."
},
"role": {
"type": "string",
"description": "The role for the new member. \n * `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. \n * `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. \n * `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization.",
"enum": [
"admin",
"direct_member",
"billing_manager"
],
"default": "direct_member"
},
"team_ids": {
"type": "array",
"description": "Specify IDs for the teams you want to invite new members to.",
"items": {
"type": "integer"
}
}
}
},
"examples": {
"default": {
"value": {
"email": "octocat@github.com",
"role": "direct_member",
"team_ids": [
12,
26
]
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/organization-invitation"
},
"examples": {
"default": {
"$ref": "#/components/examples/organization-invitation"
}
}
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"triggersNotification": true,
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
}
}
},
"/orgs/{org}/invitations/{invitation_id}": {
"delete": {
"summary": "Cancel an organization invitation",
"description": "Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner.\n\nThis endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications).",
"tags": [
"orgs"
],
"operationId": "orgs/cancel-invitation",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#cancel-an-organization-invitation"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/invitation-id"
}
],
"responses": {
"204": {
"description": "Response"
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"triggersNotification": true,
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
}
}
},
"/orgs/{org}/invitations/{invitation_id}/teams": {
"get": {
"summary": "List organization invitation teams",
"description": "List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner.",
"tags": [
"orgs"
],
"operationId": "orgs/list-invitation-teams",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-organization-invitation-teams"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/invitation-id"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/team"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/team-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
}
}
},
"/orgs/{org}/issues": {
"get": {
"summary": "List organization issues assigned to the authenticated user",
"description": "List issues in an organization assigned to the authenticated user.\n\n**Note**: GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe `pull_request` key. Be aware that the `id` of a pull request returned from \"Issues\" endpoints will be an _issue id_. To find out the pull\nrequest id, use the \"[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)\" endpoint.",
"tags": [
"issues"
],
"operationId": "issues/list-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"name": "filter",
"description": "Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"assigned",
"created",
"mentioned",
"subscribed",
"repos",
"all"
],
"default": "assigned"
}
},
{
"name": "state",
"description": "Indicates the state of the issues to return.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"open",
"closed",
"all"
],
"default": "open"
}
},
{
"$ref": "#/components/parameters/labels"
},
{
"name": "sort",
"description": "What to sort results by.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"created",
"updated",
"comments"
],
"default": "created"
}
},
{
"$ref": "#/components/parameters/direction"
},
{
"$ref": "#/components/parameters/since"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/issue"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/issue-with-repo-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "issues",
"subcategory": null
}
}
},
"/orgs/{org}/members": {
"get": {
"summary": "List organization members",
"description": "List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned.",
"tags": [
"orgs"
],
"operationId": "orgs/list-members",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-organization-members"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"name": "filter",
"description": "Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"2fa_disabled",
"all"
],
"default": "all"
}
},
{
"name": "role",
"description": "Filter members returned by their role.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"all",
"admin",
"member"
],
"default": "all"
}
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/simple-user"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/simple-user-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
}
}
},
"/orgs/{org}/members/{username}": {
"get": {
"summary": "Check organization membership for a user",
"description": "Check if a user is, publicly or privately, a member of the organization.",
"tags": [
"orgs"
],
"operationId": "orgs/check-membership-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/username"
}
],
"responses": {
"204": {
"description": "Response if requester is an organization member and user is a member"
},
"302": {
"description": "Response if requester is not an organization member",
"headers": {
"Location": {
"example": "https://api.github.com/orgs/github/public_members/pezra",
"schema": {
"type": "string"
}
}
}
},
"404": {
"description": "Not Found if requester is an organization member and user is not a member"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
}
},
"delete": {
"summary": "Remove an organization member",
"description": "Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories.",
"tags": [
"orgs"
],
"operationId": "orgs/remove-member",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#remove-an-organization-member"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/username"
}
],
"responses": {
"204": {
"description": "Response"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
}
}
},
"/orgs/{org}/members/{username}/codespaces": {
"get": {
"summary": "List codespaces for a user in organization",
"description": "Lists the codespaces that a member of an organization has for repositories in that organization.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"codespaces"
],
"operationId": "codespaces/get-codespaces-for-user-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/codespaces#get-codespaces-for-user-in-org"
},
"parameters": [
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/username"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"codespaces"
],
"properties": {
"total_count": {
"type": "integer"
},
"codespaces": {
"type": "array",
"items": {
"$ref": "#/components/schemas/codespace"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/codespaces-list"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"500": {
"$ref": "#/components/responses/internal_error"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "codespaces",
"subcategory": "organizations"
}
}
},
"/orgs/{org}/members/{username}/codespaces/{codespace_name}": {
"delete": {
"summary": "Delete a codespace from the organization",
"description": "Deletes a user's codespace.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"codespaces"
],
"operationId": "codespaces/delete-from-organization",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/codespaces"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/username"
},
{
"$ref": "#/components/parameters/codespace-name"
}
],
"responses": {
"202": {
"$ref": "#/components/responses/accepted"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"500": {
"$ref": "#/components/responses/internal_error"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "codespaces",
"subcategory": "organizations"
}
}
},
"/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": {
"post": {
"summary": "Stop a codespace for an organization user",
"description": "Stops a user's codespace.\n\nYou must authenticate using an access token with the `admin:org` scope to use this endpoint.",
"tags": [
"codespaces"
],
"operationId": "codespaces/stop-in-organization",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/codespaces"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/username"
},
{
"$ref": "#/components/parameters/codespace-name"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/codespace"
},
"examples": {
"default": {
"$ref": "#/components/examples/codespace"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"500": {
"$ref": "#/components/responses/internal_error"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "codespaces",
"subcategory": "organizations"
}
}
},
"/orgs/{org}/memberships/{username}": {
"get": {
"summary": "Get organization membership for a user",
"description": "In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status.",
"tags": [
"orgs"
],
"operationId": "orgs/get-membership-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/username"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/org-membership"
},
"examples": {
"response-if-user-has-an-active-admin-membership-with-organization": {
"$ref": "#/components/examples/org-membership-response-if-user-has-an-active-admin-membership-with-organization"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
}
},
"put": {
"summary": "Set organization membership for a user",
"description": "Only authenticated organization owners can add a member to the organization or update the member's role.\n\n* If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) will be `pending` until they accept the invitation.\n \n* Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent.\n\n**Rate limits**\n\nTo prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period.",
"tags": [
"orgs"
],
"operationId": "orgs/set-membership-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#set-organization-membership-for-a-user"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/username"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"role": {
"type": "string",
"description": "The role to give the user in the organization. Can be one of: \n * `admin` - The user will become an owner of the organization. \n * `member` - The user will become a non-owner member of the organization.",
"enum": [
"admin",
"member"
],
"default": "member"
}
}
},
"examples": {
"default": {
"summary": "Set an organization membership role for a user",
"value": {
"role": "member"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/org-membership"
},
"examples": {
"response-if-user-already-had-membership-with-organization": {
"$ref": "#/components/examples/org-membership-response-if-user-has-an-active-admin-membership-with-organization"
}
}
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
}
},
"delete": {
"summary": "Remove organization membership for a user",
"description": "In order to remove a user's membership with an organization, the authenticated user must be an organization owner.\n\nIf the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases.",
"tags": [
"orgs"
],
"operationId": "orgs/remove-membership-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#remove-organization-membership-for-a-user"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/username"
}
],
"responses": {
"204": {
"description": "Response"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
}
}
},
"/orgs/{org}/migrations": {
"get": {
"summary": "List organization migrations",
"description": "Lists the most recent migrations.",
"tags": [
"migrations"
],
"operationId": "migrations/list-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#list-organization-migrations"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
},
{
"name": "exclude",
"description": "Exclude attributes from the API response to improve performance",
"in": "query",
"schema": {
"type": "array",
"items": {
"description": "Allowed values that can be passed to the exclude param.",
"enum": [
"repositories"
],
"example": "repositories",
"type": "string"
}
}
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/migration"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/migration-with-short-org-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "migrations",
"subcategory": "orgs"
}
},
"post": {
"summary": "Start an organization migration",
"description": "Initiates the generation of a migration archive.",
"tags": [
"migrations"
],
"operationId": "migrations/start-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#start-an-organization-migration"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"repositories": {
"type": "array",
"description": "A list of arrays indicating which repositories should be migrated.",
"items": {
"type": "string"
}
},
"lock_repositories": {
"type": "boolean",
"example": true,
"description": "Indicates whether repositories should be locked (to prevent manipulation) while migrating data.",
"default": false
},
"exclude_metadata": {
"type": "boolean",
"description": "Indicates whether metadata should be excluded and only git source should be included for the migration.",
"default": false
},
"exclude_git_data": {
"type": "boolean",
"description": "Indicates whether the repository git data should be excluded from the migration.",
"default": false
},
"exclude_attachments": {
"type": "boolean",
"example": true,
"description": "Indicates whether attachments should be excluded from the migration (to reduce migration archive file size).",
"default": false
},
"exclude_releases": {
"type": "boolean",
"example": true,
"description": "Indicates whether releases should be excluded from the migration (to reduce migration archive file size).",
"default": false
},
"exclude_owner_projects": {
"type": "boolean",
"example": true,
"description": "Indicates whether projects owned by the organization or users should be excluded. from the migration.",
"default": false
},
"org_metadata_only": {
"type": "boolean",
"example": true,
"description": "Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags).",
"default": false
},
"exclude": {
"type": "array",
"description": "Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `\"repositories\"`.",
"items": {
"type": "string",
"enum": [
"repositories"
]
}
}
},
"required": [
"repositories"
]
},
"examples": {
"default": {
"value": {
"repositories": [
"github/Hello-World"
],
"lock_repositories": true
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/migration"
},
"examples": {
"default": {
"$ref": "#/components/examples/migration-with-short-org-2"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "migrations",
"subcategory": "orgs"
}
}
},
"/orgs/{org}/migrations/{migration_id}": {
"get": {
"summary": "Get an organization migration status",
"description": "Fetches the status of a migration.\n\nThe `state` of a migration can be one of the following values:\n\n* `pending`, which means the migration hasn't started yet.\n* `exporting`, which means the migration is in progress.\n* `exported`, which means the migration finished successfully.\n* `failed`, which means the migration failed.",
"tags": [
"migrations"
],
"operationId": "migrations/get-status-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#get-an-organization-migration-status"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/migration-id"
},
{
"name": "exclude",
"description": "Exclude attributes from the API response to improve performance",
"in": "query",
"schema": {
"type": "array",
"items": {
"description": "Allowed values that can be passed to the exclude param.",
"enum": [
"repositories"
],
"example": "repositories",
"type": "string"
}
}
}
],
"responses": {
"200": {
"description": "* `pending`, which means the migration hasn't started yet.\n* `exporting`, which means the migration is in progress.\n* `exported`, which means the migration finished successfully.\n* `failed`, which means the migration failed.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/migration"
},
"examples": {
"default": {
"$ref": "#/components/examples/migration-with-short-org"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "migrations",
"subcategory": "orgs"
}
}
},
"/orgs/{org}/migrations/{migration_id}/archive": {
"get": {
"summary": "Download an organization migration archive",
"description": "Fetches the URL to a migration archive.",
"tags": [
"migrations"
],
"operationId": "migrations/download-archive-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#download-an-organization-migration-archive"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/migration-id"
}
],
"responses": {
"302": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "migrations",
"subcategory": "orgs"
}
},
"delete": {
"summary": "Delete an organization migration archive",
"description": "Deletes a previous migration archive. Migration archives are automatically deleted after seven days.",
"tags": [
"migrations"
],
"operationId": "migrations/delete-archive-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#delete-an-organization-migration-archive"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/migration-id"
}
],
"responses": {
"204": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "migrations",
"subcategory": "orgs"
}
}
},
"/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": {
"delete": {
"summary": "Unlock an organization repository",
"description": "Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data.",
"tags": [
"migrations"
],
"operationId": "migrations/unlock-repo-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#unlock-an-organization-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/migration-id"
},
{
"$ref": "#/components/parameters/repo-name"
}
],
"responses": {
"204": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "migrations",
"subcategory": "orgs"
}
}
},
"/orgs/{org}/migrations/{migration_id}/repositories": {
"get": {
"summary": "List repositories in an organization migration",
"description": "List all the repositories for this organization migration.",
"tags": [
"migrations"
],
"operationId": "migrations/list-repos-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/migration-id"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/minimal-repository"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/minimal-repository-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "migrations",
"subcategory": "orgs"
}
}
},
"/orgs/{org}/outside_collaborators": {
"get": {
"summary": "List outside collaborators for an organization",
"description": "List all users who are outside collaborators of an organization.",
"tags": [
"orgs"
],
"operationId": "orgs/list-outside-collaborators",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-outside-collaborators-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"name": "filter",
"description": "Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"2fa_disabled",
"all"
],
"default": "all"
}
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/simple-user"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/simple-user-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "outside-collaborators"
}
}
},
"/orgs/{org}/outside_collaborators/{username}": {
"put": {
"summary": "Convert an organization member to outside collaborator",
"description": "When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see \"[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)\". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see \"[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories).\"",
"tags": [
"orgs"
],
"operationId": "orgs/convert-member-to-outside-collaborator",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#convert-an-organization-member-to-outside-collaborator"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/username"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"async": {
"type": "boolean",
"description": "When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued.",
"default": false
}
}
},
"examples": {
"202": {
"summary": "Status code 202, asynchronous request",
"value": {
"async": true
}
},
"204": {
"summary": "Status code 204, synchronous request",
"value": null
}
}
}
}
},
"responses": {
"202": {
"description": "User is getting converted asynchronously",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
},
"additionalProperties": false
},
"examples": {
"202": {
"value": null
}
}
}
}
},
"204": {
"description": "User was converted"
},
"403": {
"description": "Forbidden if user is the last owner of the organization, not a member of the organization, or if the enterprise enforces a policy for inviting outside collaborators. For more information, see \"[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories).\""
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "outside-collaborators"
}
},
"delete": {
"summary": "Remove outside collaborator from an organization",
"description": "Removing a user from this list will remove them from all the organization's repositories.",
"tags": [
"orgs"
],
"operationId": "orgs/remove-outside-collaborator",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#remove-outside-collaborator-from-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/username"
}
],
"responses": {
"204": {
"description": "Response"
},
"422": {
"description": "Unprocessable Entity if user is a member of the organization",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"documentation_url": {
"type": "string"
}
}
},
"examples": {
"response-if-user-is-a-member-of-the-organization": {
"value": {
"message": "You cannot specify an organization member to remove as an outside collaborator.",
"documentation_url": "https://docs.github.com/rest/reference/orgs#remove-outside-collaborator"
}
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "outside-collaborators"
}
}
},
"/orgs/{org}/packages": {
"get": {
"summary": "List packages for an organization",
"description": "Lists all packages in an organization readable by the user.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` scope. If the `package_type` belongs to a registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see \"[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages).\"",
"tags": [
"packages"
],
"operationId": "packages/list-packages-for-organization",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#list-packages-for-an-organization"
},
"parameters": [
{
"name": "package_type",
"description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
"in": "query",
"required": true,
"schema": {
"type": "string",
"enum": [
"npm",
"maven",
"rubygems",
"docker",
"nuget",
"container"
]
}
},
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/package-visibility"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/package"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/packages-for-org"
}
}
}
}
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
}
}
},
"/orgs/{org}/packages/{package_type}/{package_name}": {
"get": {
"summary": "Get a package for an organization",
"description": "Gets a specific package in an organization.\n\nTo use this endpoint, you must authenticate using an access token with the `packages:read` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see \"[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages).\"",
"tags": [
"packages"
],
"operationId": "packages/get-package-for-organization",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/package-type"
},
{
"$ref": "#/components/parameters/package-name"
},
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/package"
},
"examples": {
"default": {
"$ref": "#/components/examples/package-org"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
}
},
"delete": {
"summary": "Delete a package for an organization",
"description": "Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.\n\nTo use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition:\n- If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see \"[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages).\"\n- If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to delete. For the list of these registries, see \"[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages).\"",
"tags": [
"packages"
],
"operationId": "packages/delete-package-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#delete-a-package-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/package-type"
},
{
"$ref": "#/components/parameters/package-name"
},
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"204": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
}
}
},
"/orgs/{org}/packages/{package_type}/{package_name}/restore": {
"post": {
"summary": "Restore a package for an organization",
"description": "Restores an entire package in an organization.\n\nYou can restore a deleted package under the following conditions:\n - The package was deleted within the last 30 days.\n - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.\n\nTo use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition:\n- If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see \"[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages).\"\n- If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package you want to restore. For the list of these registries, see \"[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages).\"",
"tags": [
"packages"
],
"operationId": "packages/restore-package-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/package-type"
},
{
"$ref": "#/components/parameters/package-name"
},
{
"$ref": "#/components/parameters/org"
},
{
"name": "token",
"description": "package token",
"schema": {
"type": "string"
},
"required": false,
"in": "query"
}
],
"responses": {
"204": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
}
}
},
"/orgs/{org}/packages/{package_type}/{package_name}/versions": {
"get": {
"summary": "List package versions for a package owned by an organization",
"description": "Lists package versions for a package owned by an organization.\n\nIf the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see \"[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages).\"",
"tags": [
"packages"
],
"operationId": "packages/get-all-package-versions-for-package-owned-by-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/packages#get-all-package-versions-for-a-package-owned-by-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/package-type"
},
{
"$ref": "#/components/parameters/package-name"
},
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"name": "state",
"in": "query",
"required": false,
"description": "The state of the package, either active or deleted.",
"schema": {
"type": "string",
"enum": [
"active",
"deleted"
],
"default": "active"
}
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/package-version"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/package-versions-for-org"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
}
}
},
"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": {
"get": {
"summary": "Get a package version for an organization",
"description": "Gets a specific package version in an organization.\n\nYou must authenticate using an access token with the `packages:read` scope. If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of GitHub Packages registries that only support repository-scoped permissions, see \"[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages).\"",
"tags": [
"packages"
],
"operationId": "packages/get-package-version-for-organization",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#get-a-package-version-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/package-type"
},
{
"$ref": "#/components/parameters/package-name"
},
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/package-version-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/package-version"
},
"examples": {
"default": {
"$ref": "#/components/examples/package-version-org"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
}
},
"delete": {
"summary": "Delete package version for an organization",
"description": "Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.\n\nTo use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition:\n- If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see \"[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages).\"\n- If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to delete. For the list of these registries, see \"[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages).\"",
"tags": [
"packages"
],
"operationId": "packages/delete-package-version-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#delete-a-package-version-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/package-type"
},
{
"$ref": "#/components/parameters/package-name"
},
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/package-version-id"
}
],
"responses": {
"204": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
}
}
},
"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": {
"post": {
"summary": "Restore package version for an organization",
"description": "Restores a specific package version in an organization.\n\nYou can restore a deleted package under the following conditions:\n - The package was deleted within the last 30 days.\n - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.\n\nTo use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition:\n- If the `package_type` belongs to a GitHub Packages registry that only supports repository-scoped permissions, your token must also include the `repo` scope. For the list of these registries, see \"[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages).\"\n- If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, you must have admin permissions to the package whose version you want to restore. For the list of these registries, see \"[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages).\"",
"tags": [
"packages"
],
"operationId": "packages/restore-package-version-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/package-type"
},
{
"$ref": "#/components/parameters/package-name"
},
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/package-version-id"
}
],
"responses": {
"204": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "packages",
"subcategory": null
}
}
},
"/orgs/{org}/projects": {
"get": {
"summary": "List organization projects",
"description": "Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.",
"tags": [
"projects"
],
"operationId": "projects/list-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#list-organization-projects"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"name": "state",
"description": "Indicates the state of the projects to return.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"open",
"closed",
"all"
],
"default": "open"
}
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/project"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/project-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed_simple"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": null
}
},
"post": {
"summary": "Create an organization project",
"description": "Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.",
"tags": [
"projects"
],
"operationId": "projects/create-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#create-an-organization-project"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the project."
},
"body": {
"type": "string",
"description": "The description of the project."
}
},
"required": [
"name"
]
},
"examples": {
"default": {
"value": {
"name": "Organization Roadmap",
"body": "High-level roadmap for the upcoming year."
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/project"
},
"examples": {
"default": {
"$ref": "#/components/examples/project-2"
}
}
}
}
},
"401": {
"$ref": "#/components/responses/requires_authentication"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"410": {
"$ref": "#/components/responses/gone"
},
"422": {
"$ref": "#/components/responses/validation_failed_simple"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": null
}
}
},
"/orgs/{org}/public_members": {
"get": {
"summary": "List public organization members",
"description": "Members of an organization can choose to have their membership publicized or not.",
"tags": [
"orgs"
],
"operationId": "orgs/list-public-members",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-public-organization-members"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/simple-user"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/simple-user-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
}
}
},
"/orgs/{org}/public_members/{username}": {
"get": {
"summary": "Check public organization membership for a user",
"description": "",
"tags": [
"orgs"
],
"operationId": "orgs/check-public-membership-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#check-public-organization-membership-for-a-user"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/username"
}
],
"responses": {
"204": {
"description": "Response if user is a public member"
},
"404": {
"description": "Not Found if user is not a public member"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "orgs",
"subcategory": "members"
}
},
"put": {
"summary": "Set public organization membership for the authenticated user",
"description": "The user can publicize their own membership. (A user cannot publicize the membership for another user.)\n\nNote that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs).\"",
"tags": [
"orgs"
],
"operationId": "orgs/set-public-membership-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/username"
}
],
"responses": {
"204": {
"description": "Response"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "orgs",
"subcategory": "members"
}
},
"delete": {
"summary": "Remove public organization membership for the authenticated user",
"description": "",
"tags": [
"orgs"
],
"operationId": "orgs/remove-public-membership-for-authenticated-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#remove-public-organization-membership-for-the-authenticated-user"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/username"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "orgs",
"subcategory": "members"
}
}
},
"/orgs/{org}/repos": {
"get": {
"summary": "List organization repositories",
"description": "Lists repositories for the specified organization.\n\n**Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see \"[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).\"",
"tags": [
"repos"
],
"operationId": "repos/list-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#list-organization-repositories"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"name": "type",
"description": "Specifies the types of repositories you want returned.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"all",
"public",
"private",
"forks",
"sources",
"member"
]
}
},
{
"name": "sort",
"description": "The property to sort the results by.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"created",
"updated",
"pushed",
"full_name"
],
"default": "created"
}
},
{
"name": "direction",
"description": "The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/minimal-repository"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/minimal-repository-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
}
},
"post": {
"summary": "Create an organization repository",
"description": "Creates a new repository in the specified organization. The authenticated user must be a member of the organization.\n\n**OAuth scope requirements**\n\nWhen using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:\n\n* `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.\n* `repo` scope to create a private repository",
"tags": [
"repos"
],
"operationId": "repos/create-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#create-an-organization-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the repository."
},
"description": {
"type": "string",
"description": "A short description of the repository."
},
"homepage": {
"type": "string",
"description": "A URL with more information about the repository."
},
"private": {
"type": "boolean",
"description": "Whether the repository is private.",
"default": false
},
"visibility": {
"type": "string",
"description": "The visibility of the repository.",
"enum": [
"public",
"private"
]
},
"has_issues": {
"type": "boolean",
"description": "Either `true` to enable issues for this repository or `false` to disable them.",
"default": true
},
"has_projects": {
"type": "boolean",
"description": "Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error.",
"default": true
},
"has_wiki": {
"type": "boolean",
"description": "Either `true` to enable the wiki for this repository or `false` to disable it.",
"default": true
},
"has_downloads": {
"description": "Whether downloads are enabled.",
"default": true,
"type": "boolean",
"example": true
},
"is_template": {
"type": "boolean",
"description": "Either `true` to make this repo available as a template repository or `false` to prevent it.",
"default": false
},
"team_id": {
"type": "integer",
"description": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization."
},
"auto_init": {
"type": "boolean",
"description": "Pass `true` to create an initial commit with empty README.",
"default": false
},
"gitignore_template": {
"type": "string",
"description": "Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, \"Haskell\"."
},
"license_template": {
"type": "string",
"description": "Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://docs.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, \"mit\" or \"mpl-2.0\"."
},
"allow_squash_merge": {
"type": "boolean",
"description": "Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging.",
"default": true
},
"allow_merge_commit": {
"type": "boolean",
"description": "Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits.",
"default": true
},
"allow_rebase_merge": {
"type": "boolean",
"description": "Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.",
"default": true
},
"allow_auto_merge": {
"type": "boolean",
"description": "Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge.",
"default": false
},
"delete_branch_on_merge": {
"type": "boolean",
"description": "Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion.",
"default": false
},
"use_squash_pr_title_as_default": {
"type": "boolean",
"description": "Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead.",
"default": false,
"deprecated": true
},
"squash_merge_commit_title": {
"type": "string",
"enum": [
"PR_TITLE",
"COMMIT_OR_PR_TITLE"
],
"description": "The default value for a squash merge commit title:\n\n- `PR_TITLE` - default to the pull request's title.\n- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit)."
},
"squash_merge_commit_message": {
"type": "string",
"enum": [
"PR_BODY",
"COMMIT_MESSAGES",
"BLANK"
],
"description": "The default value for a squash merge commit message:\n\n- `PR_BODY` - default to the pull request's body.\n- `COMMIT_MESSAGES` - default to the branch's commit messages.\n- `BLANK` - default to a blank commit message."
},
"merge_commit_title": {
"type": "string",
"enum": [
"PR_TITLE",
"MERGE_MESSAGE"
],
"description": "The default value for a merge commit title.\n\n- `PR_TITLE` - default to the pull request's title.\n- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name)."
},
"merge_commit_message": {
"type": "string",
"enum": [
"PR_BODY",
"PR_TITLE",
"BLANK"
],
"description": "The default value for a merge commit message.\n\n- `PR_TITLE` - default to the pull request's title.\n- `PR_BODY` - default to the pull request's body.\n- `BLANK` - default to a blank commit message."
}
},
"required": [
"name"
]
},
"examples": {
"default": {
"value": {
"name": "Hello-World",
"description": "This is your first repository",
"homepage": "https://github.com",
"private": false,
"has_issues": true,
"has_projects": true,
"has_wiki": true
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/repository"
},
"examples": {
"default": {
"$ref": "#/components/examples/repository"
}
}
}
},
"headers": {
"Location": {
"example": "https://api.github.com/repos/octocat/Hello-World",
"schema": {
"type": "string"
}
}
}
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
}
}
},
"/orgs/{org}/secret-scanning/alerts": {
"get": {
"summary": "List secret scanning alerts for an organization",
"description": "Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest.\nTo use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope.\nFor public repositories, you may instead use the `public_repo` scope.\n\nGitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint.",
"tags": [
"secret-scanning"
],
"operationId": "secret-scanning/list-alerts-for-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/secret-scanning-alert-state"
},
{
"$ref": "#/components/parameters/secret-scanning-alert-secret-type"
},
{
"$ref": "#/components/parameters/secret-scanning-alert-resolution"
},
{
"$ref": "#/components/parameters/secret-scanning-alert-sort"
},
{
"$ref": "#/components/parameters/direction"
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/secret-scanning-pagination-before-org-repo"
},
{
"$ref": "#/components/parameters/secret-scanning-pagination-after-org-repo"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/organization-secret-scanning-alert"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/organization-secret-scanning-alert-list"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"503": {
"$ref": "#/components/responses/service_unavailable"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "secret-scanning",
"subcategory": null
}
}
},
"/orgs/{org}/security-managers": {
"get": {
"summary": "List security manager teams",
"description": "Lists teams that are security managers for an organization. For more information, see \"[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).\"\n\nTo use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `read:org` scope.\n\nGitHub Apps must have the `administration` organization read permission to use this endpoint.",
"tags": [
"orgs"
],
"operationId": "orgs/list-security-manager-teams",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#list-security-manager-teams"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/team-simple"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/team-items"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"previews": [
],
"category": "orgs",
"subcategory": "security-managers"
}
}
},
"/orgs/{org}/security-managers/teams/{team_slug}": {
"put": {
"summary": "Add a security manager team",
"description": "Adds a team as a security manager for an organization. For more information, see \"[Managing security for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization.\"\n\nTo use this endpoint, you must be an administrator for the organization, and you must use an access token with the `write:org` scope.\n\nGitHub Apps must have the `administration` organization read-write permission to use this endpoint.",
"tags": [
"orgs"
],
"operationId": "orgs/add-security-manager-team",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#add-a-security-manager-team"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
}
],
"responses": {
"204": {
"description": "Response"
},
"409": {
"description": "The organization has reached the maximum number of security manager teams."
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"previews": [
],
"category": "orgs",
"subcategory": "security-managers"
}
},
"delete": {
"summary": "Remove a security manager team",
"description": "Removes the security manager role from a team for an organization. For more information, see \"[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization.\"\n\nTo use this endpoint, you must be an administrator for the organization, and you must use an access token with the `admin:org` scope.\n\nGitHub Apps must have the `administration` organization read-write permission to use this endpoint.",
"tags": [
"orgs"
],
"operationId": "orgs/remove-security-manager-team",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#remove-a-security-manager-team"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"previews": [
],
"category": "orgs",
"subcategory": "security-managers"
}
}
},
"/orgs/{org}/settings/billing/actions": {
"get": {
"summary": "Get GitHub Actions billing for an organization",
"description": "Gets the summary of the free and paid GitHub Actions minutes used.\n\nPaid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see \"[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)\".\n\nAccess tokens must have the `repo` or `admin:org` scope.",
"operationId": "billing/get-github-actions-billing-org",
"tags": [
"billing"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/actions-billing-usage"
},
"examples": {
"default": {
"$ref": "#/components/examples/actions-billing-usage"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "billing",
"subcategory": null
}
}
},
"/orgs/{org}/settings/billing/packages": {
"get": {
"summary": "Get GitHub Packages billing for an organization",
"description": "Gets the free and paid storage used for GitHub Packages in gigabytes.\n\nPaid minutes only apply to packages stored for private repositories. For more information, see \"[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages).\"\n\nAccess tokens must have the `repo` or `admin:org` scope.",
"operationId": "billing/get-github-packages-billing-org",
"tags": [
"billing"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/packages-billing-usage"
},
"examples": {
"default": {
"$ref": "#/components/examples/packages-billing-usage"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "billing",
"subcategory": null
}
}
},
"/orgs/{org}/settings/billing/shared-storage": {
"get": {
"summary": "Get shared storage billing for an organization",
"description": "Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages.\n\nPaid minutes only apply to packages stored for private repositories. For more information, see \"[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages).\"\n\nAccess tokens must have the `repo` or `admin:org` scope.",
"operationId": "billing/get-shared-storage-billing-org",
"tags": [
"billing"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-organization"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/combined-billing-usage"
},
"examples": {
"default": {
"$ref": "#/components/examples/combined-billing-usage"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "billing",
"subcategory": null
}
}
},
"/orgs/{org}/teams": {
"get": {
"summary": "List teams",
"description": "Lists all teams in an organization that are visible to the authenticated user.",
"tags": [
"teams"
],
"operationId": "teams/list",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-teams"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/team"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/team-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
}
},
"post": {
"summary": "Create a team",
"description": "To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see \"[Setting team creation permissions](https://docs.github.com/articles/setting-team-creation-permissions-in-your-organization).\"\n\nWhen you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see \"[About teams](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/about-teams)\".",
"tags": [
"teams"
],
"operationId": "teams/create",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#create-a-team"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the team."
},
"description": {
"type": "string",
"description": "The description of the team."
},
"maintainers": {
"type": "array",
"description": "List GitHub IDs for organization members who will become team maintainers.",
"items": {
"type": "string"
}
},
"repo_names": {
"type": "array",
"description": "The full name (e.g., \"organization-name/repository-name\") of repositories to add the team to.",
"items": {
"type": "string"
}
},
"privacy": {
"type": "string",
"description": "The level of privacy this team should have. The options are: \n**For a non-nested team:** \n * `secret` - only visible to organization owners and members of this team. \n * `closed` - visible to all members of this organization. \nDefault: `secret` \n**For a parent or child team:** \n * `closed` - visible to all members of this organization. \nDefault for child team: `closed`",
"enum": [
"secret",
"closed"
]
},
"permission": {
"type": "string",
"description": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified.",
"enum": [
"pull",
"push"
],
"default": "pull"
},
"parent_team_id": {
"type": "integer",
"description": "The ID of a team to set as the parent team."
}
},
"required": [
"name"
]
},
"examples": {
"default": {
"value": {
"name": "Justice League",
"description": "A great team",
"permission": "push",
"privacy": "closed"
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/team-full"
},
"examples": {
"default": {
"$ref": "#/components/examples/team-full"
}
}
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
}
}
},
"/orgs/{org}/teams/{team_slug}": {
"get": {
"summary": "Get a team by name",
"description": "Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`.",
"tags": [
"teams"
],
"operationId": "teams/get-by-name",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#get-a-team-by-name"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/team-full"
},
"examples": {
"default": {
"$ref": "#/components/examples/team-full"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
}
},
"patch": {
"summary": "Update a team",
"description": "To edit a team, the authenticated user must either be an organization owner or a team maintainer.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`.",
"tags": [
"teams"
],
"operationId": "teams/update-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#update-a-team"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the team."
},
"description": {
"type": "string",
"description": "The description of the team."
},
"privacy": {
"type": "string",
"description": "The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. The options are: \n**For a non-nested team:** \n * `secret` - only visible to organization owners and members of this team. \n * `closed` - visible to all members of this organization. \n**For a parent or child team:** \n * `closed` - visible to all members of this organization.",
"enum": [
"secret",
"closed"
]
},
"permission": {
"type": "string",
"description": "**Deprecated**. The permission that new repositories will be added to the team with when none is specified.",
"enum": [
"pull",
"push",
"admin"
],
"default": "pull"
},
"parent_team_id": {
"type": "integer",
"description": "The ID of a team to set as the parent team.",
"nullable": true
}
}
},
"examples": {
"default": {
"value": {
"name": "new team name",
"description": "new team description",
"privacy": "closed"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response when the updated information already exists",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/team-full"
},
"examples": {
"default": {
"$ref": "#/components/examples/team-full"
}
}
}
}
},
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/team-full"
},
"examples": {
"default": {
"$ref": "#/components/examples/team-full"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
}
},
"delete": {
"summary": "Delete a team",
"description": "To delete a team, the authenticated user must be an organization owner or team maintainer.\n\nIf you are an organization owner, deleting a parent team will delete all of its child teams as well.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`.",
"tags": [
"teams"
],
"operationId": "teams/delete-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#delete-a-team"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
}
}
},
"/orgs/{org}/teams/{team_slug}/discussions": {
"get": {
"summary": "List discussions",
"description": "List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`.",
"tags": [
"teams"
],
"operationId": "teams/list-discussions-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-discussions"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/direction"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
},
{
"name": "pinned",
"in": "query",
"required": false,
"description": "Pinned discussions only filter",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/team-discussion"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/team-discussion-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "discussions"
}
},
"post": {
"summary": "Create a discussion",
"description": "Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\nThis endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`.",
"tags": [
"teams"
],
"operationId": "teams/create-discussion-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#create-a-discussion"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The discussion post's title."
},
"body": {
"type": "string",
"description": "The discussion post's body text."
},
"private": {
"type": "boolean",
"description": "Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post.",
"default": false
}
},
"required": [
"title",
"body"
]
},
"examples": {
"default": {
"value": {
"title": "Our first team post",
"body": "Hi! This is an area for us to collaborate as a team."
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/team-discussion"
},
"examples": {
"default": {
"$ref": "#/components/examples/team-discussion"
}
}
}
}
}
},
"x-github": {
"triggersNotification": true,
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "discussions"
}
}
},
"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": {
"get": {
"summary": "Get a discussion",
"description": "Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`.",
"tags": [
"teams"
],
"operationId": "teams/get-discussion-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#get-a-discussion"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/discussion-number"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/team-discussion"
},
"examples": {
"default": {
"$ref": "#/components/examples/team-discussion"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "discussions"
}
},
"patch": {
"summary": "Update a discussion",
"description": "Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`.",
"tags": [
"teams"
],
"operationId": "teams/update-discussion-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#update-a-discussion"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/discussion-number"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The discussion post's title."
},
"body": {
"type": "string",
"description": "The discussion post's body text."
}
}
},
"examples": {
"default": {
"value": {
"title": "Welcome to our first team post"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/team-discussion"
},
"examples": {
"default": {
"$ref": "#/components/examples/team-discussion-2"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "discussions"
}
},
"delete": {
"summary": "Delete a discussion",
"description": "Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`.",
"tags": [
"teams"
],
"operationId": "teams/delete-discussion-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#delete-a-discussion"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/discussion-number"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "discussions"
}
}
},
"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": {
"get": {
"summary": "List discussion comments",
"description": "List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`.",
"tags": [
"teams"
],
"operationId": "teams/list-discussion-comments-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-discussion-comments"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/discussion-number"
},
{
"$ref": "#/components/parameters/direction"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/team-discussion-comment"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/team-discussion-comment-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "discussion-comments"
}
},
"post": {
"summary": "Create a discussion comment",
"description": "Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\nThis endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See \"[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)\" and \"[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)\" for details.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`.",
"tags": [
"teams"
],
"operationId": "teams/create-discussion-comment-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#create-a-discussion-comment"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/discussion-number"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "The discussion comment's body text."
}
},
"required": [
"body"
]
},
"examples": {
"default": {
"value": {
"body": "Do you like apples?"
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/team-discussion-comment"
},
"examples": {
"default": {
"$ref": "#/components/examples/team-discussion-comment"
}
}
}
}
}
},
"x-github": {
"triggersNotification": true,
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "discussion-comments"
}
}
},
"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": {
"get": {
"summary": "Get a discussion comment",
"description": "Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`.",
"tags": [
"teams"
],
"operationId": "teams/get-discussion-comment-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#get-a-discussion-comment"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/discussion-number"
},
{
"$ref": "#/components/parameters/comment-number"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/team-discussion-comment"
},
"examples": {
"default": {
"$ref": "#/components/examples/team-discussion-comment"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "discussion-comments"
}
},
"patch": {
"summary": "Update a discussion comment",
"description": "Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`.",
"tags": [
"teams"
],
"operationId": "teams/update-discussion-comment-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#update-a-discussion-comment"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/discussion-number"
},
{
"$ref": "#/components/parameters/comment-number"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "The discussion comment's body text."
}
},
"required": [
"body"
]
},
"examples": {
"default": {
"value": {
"body": "Do you like pineapples?"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/team-discussion-comment"
},
"examples": {
"default": {
"$ref": "#/components/examples/team-discussion-comment-2"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "discussion-comments"
}
},
"delete": {
"summary": "Delete a discussion comment",
"description": "Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`.",
"tags": [
"teams"
],
"operationId": "teams/delete-discussion-comment-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#delete-a-discussion-comment"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/discussion-number"
},
{
"$ref": "#/components/parameters/comment-number"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "discussion-comments"
}
}
},
"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": {
"get": {
"summary": "List reactions for a team discussion comment",
"description": "List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`.",
"tags": [
"reactions"
],
"operationId": "reactions/list-for-team-discussion-comment-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/discussion-number"
},
{
"$ref": "#/components/parameters/comment-number"
},
{
"name": "content",
"description": "Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"+1",
"-1",
"laugh",
"confused",
"heart",
"hooray",
"rocket",
"eyes"
]
}
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/reaction"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/reaction-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "reactions",
"subcategory": null
}
},
"post": {
"summary": "Create reaction for a team discussion comment",
"description": "Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`.",
"tags": [
"reactions"
],
"operationId": "reactions/create-for-team-discussion-comment-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/discussion-number"
},
{
"$ref": "#/components/parameters/comment-number"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment.",
"enum": [
"+1",
"-1",
"laugh",
"confused",
"heart",
"hooray",
"rocket",
"eyes"
]
}
},
"required": [
"content"
]
},
"examples": {
"default": {
"value": {
"content": "heart"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response when the reaction type has already been added to this team discussion comment",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/reaction"
},
"examples": {
"default": {
"$ref": "#/components/examples/reaction"
}
}
}
}
},
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/reaction"
},
"examples": {
"default": {
"$ref": "#/components/examples/reaction"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "reactions",
"subcategory": null
}
}
},
"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": {
"delete": {
"summary": "Delete team discussion comment reaction",
"description": "**Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`.\n\nDelete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"tags": [
"reactions"
],
"operationId": "reactions/delete-for-team-discussion-comment",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#delete-team-discussion-comment-reaction"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/discussion-number"
},
{
"$ref": "#/components/parameters/comment-number"
},
{
"$ref": "#/components/parameters/reaction-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "reactions",
"subcategory": null
}
}
},
"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": {
"get": {
"summary": "List reactions for a team discussion",
"description": "List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`.",
"tags": [
"reactions"
],
"operationId": "reactions/list-for-team-discussion-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/discussion-number"
},
{
"name": "content",
"description": "Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"+1",
"-1",
"laugh",
"confused",
"heart",
"hooray",
"rocket",
"eyes"
]
}
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/reaction"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/reaction-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "reactions",
"subcategory": null
}
},
"post": {
"summary": "Create reaction for a team discussion",
"description": "Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`.",
"tags": [
"reactions"
],
"operationId": "reactions/create-for-team-discussion-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/discussion-number"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion.",
"enum": [
"+1",
"-1",
"laugh",
"confused",
"heart",
"hooray",
"rocket",
"eyes"
]
}
},
"required": [
"content"
]
},
"examples": {
"default": {
"value": {
"content": "heart"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/reaction"
},
"examples": {
"default": {
"$ref": "#/components/examples/reaction"
}
}
}
}
},
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/reaction"
},
"examples": {
"default": {
"$ref": "#/components/examples/reaction"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "reactions",
"subcategory": null
}
}
},
"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": {
"delete": {
"summary": "Delete team discussion reaction",
"description": "**Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`.\n\nDelete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).",
"tags": [
"reactions"
],
"operationId": "reactions/delete-for-team-discussion",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/reactions#delete-team-discussion-reaction"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/discussion-number"
},
{
"$ref": "#/components/parameters/reaction-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "reactions",
"subcategory": null
}
}
},
"/orgs/{org}/teams/{team_slug}/invitations": {
"get": {
"summary": "List pending team invitations",
"description": "The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`.",
"tags": [
"teams"
],
"operationId": "teams/list-pending-invitations-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-pending-team-invitations"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/organization-invitation"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/organization-invitation-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "members"
}
}
},
"/orgs/{org}/teams/{team_slug}/members": {
"get": {
"summary": "List team members",
"description": "Team members will include the members of child teams.\n\nTo list members in a team, the team must be visible to the authenticated user.",
"tags": [
"teams"
],
"operationId": "teams/list-members-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-team-members"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"name": "role",
"description": "Filters members returned by their role in the team.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"member",
"maintainer",
"all"
],
"default": "all"
}
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/simple-user"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/simple-user-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "members"
}
}
},
"/orgs/{org}/teams/{team_slug}/memberships/{username}": {
"get": {
"summary": "Get team membership for a user",
"description": "Team members will include the members of child teams.\n\nTo get a user's membership with a team, the team must be visible to the authenticated user.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`.\n\n**Note:**\nThe response contains the `state` of the membership and the member's `role`.\n\nThe `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team).",
"tags": [
"teams"
],
"operationId": "teams/get-membership-for-user-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/username"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/team-membership"
},
"examples": {
"response-if-user-is-a-team-maintainer": {
"$ref": "#/components/examples/team-membership-response-if-user-is-a-team-maintainer"
}
}
}
}
},
"404": {
"description": "if user has no team membership"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "members"
}
},
"put": {
"summary": "Add or update team membership for a user",
"description": "Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team.\n\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\n**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see \"[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/).\"\n\nAn organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the \"pending\" state until the person accepts the invitation, at which point the membership will transition to the \"active\" state and the user will be added as a member of the team.\n\nIf the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`.",
"tags": [
"teams"
],
"operationId": "teams/add-or-update-membership-for-user-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/username"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"role": {
"type": "string",
"description": "The role that this user should have in the team.",
"enum": [
"member",
"maintainer"
],
"default": "member"
}
}
},
"examples": {
"default": {
"summary": "Add or update team membership for an organization member",
"value": {
"role": "maintainer"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/team-membership"
},
"examples": {
"response-if-users-membership-with-team-is-now-pending": {
"$ref": "#/components/examples/team-membership-response-if-users-membership-with-team-is-now-pending"
}
}
}
}
},
"403": {
"description": "Forbidden if team synchronization is set up"
},
"422": {
"description": "Unprocessable Entity if you attempt to add an organization to a team"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "members"
}
},
"delete": {
"summary": "Remove team membership for a user",
"description": "To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.\n\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\n**Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see \"[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/).\"\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`.",
"tags": [
"teams"
],
"operationId": "teams/remove-membership-for-user-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/username"
}
],
"responses": {
"204": {
"description": "Response"
},
"403": {
"description": "Forbidden if team synchronization is set up"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": "members"
}
}
},
"/orgs/{org}/teams/{team_slug}/projects": {
"get": {
"summary": "List team projects",
"description": "Lists the organization projects for a team.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`.",
"tags": [
"teams"
],
"operationId": "teams/list-projects-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-team-projects"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/team-project"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/team-project-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
}
}
},
"/orgs/{org}/teams/{team_slug}/projects/{project_id}": {
"get": {
"summary": "Check team permissions for a project",
"description": "Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`.",
"tags": [
"teams"
],
"operationId": "teams/check-permissions-for-project-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/project-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/team-project"
},
"examples": {
"default": {
"$ref": "#/components/examples/team-project"
}
}
}
}
},
"404": {
"description": "Not Found if project is not managed by this team"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
}
},
"put": {
"summary": "Add or update team project permissions",
"description": "Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`.",
"tags": [
"teams"
],
"operationId": "teams/add-or-update-project-permissions-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/project-id"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"permission": {
"type": "string",
"description": "The permission to grant to the team for this project. Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs).\"",
"enum": [
"read",
"write",
"admin"
]
}
},
"nullable": true
},
"examples": {
"default": {
"summary": "Updates the permissions for the team to write for the project",
"value": {
"permission": "write"
}
}
}
}
}
},
"responses": {
"204": {
"description": "Response"
},
"403": {
"description": "Forbidden if the project is not owned by the organization",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"documentation_url": {
"type": "string"
}
}
},
"examples": {
"response-if-the-project-is-not-owned-by-the-organization": {
"value": {
"message": "Must have admin rights to Repository.",
"documentation_url": "https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions"
}
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
}
},
"delete": {
"summary": "Remove a project from a team",
"description": "Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`.",
"tags": [
"teams"
],
"operationId": "teams/remove-project-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/project-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
}
}
},
"/orgs/{org}/teams/{team_slug}/repos": {
"get": {
"summary": "List team repositories",
"description": "Lists a team's repositories visible to the authenticated user.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`.",
"tags": [
"teams"
],
"operationId": "teams/list-repos-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-team-repositories"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/minimal-repository"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/minimal-repository-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
}
}
},
"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": {
"get": {
"summary": "Check team permissions for a repository",
"description": "Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.\n\nYou can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header.\n\nIf a team doesn't have permission for the repository, you will receive a `404 Not Found` response status.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.",
"tags": [
"teams"
],
"operationId": "teams/check-permissions-for-repo-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"200": {
"description": "Alternative response with repository permissions",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/team-repository"
},
"examples": {
"alternative-response-with-repository-permissions": {
"$ref": "#/components/examples/team-repository-alternative-response-with-repository-permissions"
}
}
}
}
},
"204": {
"description": "Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header."
},
"404": {
"description": "Not Found if team does not have permission for the repository"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
}
},
"put": {
"summary": "Add or update team repository permissions",
"description": "To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs).\"\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.\n\nFor more information about the permission levels, see \"[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)\".",
"tags": [
"teams"
],
"operationId": "teams/add-or-update-repo-permissions-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"permission": {
"type": "string",
"description": "The permission to grant the team on this repository. We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository.",
"default": "push"
}
}
},
"examples": {
"default": {
"summary": "Adding a team to an organization repository with the write role",
"value": {
"permission": "push"
}
}
}
}
}
},
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
}
},
"delete": {
"summary": "Remove a repository from a team",
"description": "If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.",
"tags": [
"teams"
],
"operationId": "teams/remove-repo-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
}
}
},
"/orgs/{org}/teams/{team_slug}/teams": {
"get": {
"summary": "List child teams",
"description": "Lists the child teams of the team specified by `{team_slug}`.\n\n**Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`.",
"tags": [
"teams"
],
"operationId": "teams/list-child-in-org",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/teams#list-child-teams"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/team-slug"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "if child teams exist",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/team"
}
},
"examples": {
"response-if-child-teams-exist": {
"$ref": "#/components/examples/team-items-response-if-child-teams-exist"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "teams",
"subcategory": null
}
}
},
"/orgs/{org}/{security_product}/{enablement}": {
"post": {
"summary": "Enable or disable a security feature for an organization",
"description": "Enables or disables the specified security feature for all repositories in an organization.\n\nTo use this endpoint, you must be an organization owner or be member of a team with the security manager role.\nA token with the 'write:org' scope is also required.\n\nGitHub Apps must have the `organization_administration:write` permission to use this endpoint.\n\nFor more information, see \"[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).\"",
"tags": [
"orgs"
],
"operationId": "orgs/enable-or-disable-security-product-on-all-org-repos",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/orgs#enable-or-disable-security-product-on-all-org-repos"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/security-product"
},
{
"$ref": "#/components/parameters/org-security-product-enablement"
}
],
"responses": {
"204": {
"description": "Action started"
},
"422": {
"description": "The action could not be taken due to an in progress enablement, or a policy is preventing enablement"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"previews": [
],
"category": "orgs",
"subcategory": "orgs"
}
}
},
"/projects/columns/cards/{card_id}": {
"get": {
"summary": "Get a project card",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/get-card",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#get-a-project-card"
},
"parameters": [
{
"$ref": "#/components/parameters/card-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/project-card"
},
"examples": {
"default": {
"$ref": "#/components/examples/project-card"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "cards"
}
},
"patch": {
"summary": "Update an existing project card",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/update-card",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#update-a-project-card"
},
"parameters": [
{
"$ref": "#/components/parameters/card-id"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"note": {
"description": "The project card's note",
"example": "Update all gems",
"type": "string",
"nullable": true
},
"archived": {
"description": "Whether or not the card is archived",
"example": false,
"type": "boolean"
}
}
},
"examples": {
"default": {
"summary": "Change the note on the card",
"value": {
"note": "Add payload for delete Project column"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/project-card"
},
"examples": {
"default": {
"$ref": "#/components/examples/project-card"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed_simple"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "cards"
}
},
"delete": {
"summary": "Delete a project card",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/delete-card",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#delete-a-project-card"
},
"parameters": [
{
"$ref": "#/components/parameters/card-id"
}
],
"responses": {
"204": {
"description": "Response"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"documentation_url": {
"type": "string"
},
"errors": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/requires_authentication"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "cards"
}
}
},
"/projects/columns/cards/{card_id}/moves": {
"post": {
"summary": "Move a project card",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/move-card",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#move-a-project-card"
},
"parameters": [
{
"$ref": "#/components/parameters/card-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"position": {
"description": "The position of the card in a column. Can be one of: `top`, `bottom`, or `after:<card_id>` to place after the specified card.",
"example": "bottom",
"type": "string",
"pattern": "^(?:top|bottom|after:\\d+)$"
},
"column_id": {
"description": "The unique identifier of the column the card should be moved to",
"example": 42,
"type": "integer"
}
},
"required": [
"position"
],
"type": "object"
},
"examples": {
"default": {
"summary": "Move the card to the bottom of the column",
"value": {
"column_id": 42,
"position": "bottom"
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
},
"additionalProperties": false
},
"examples": {
"default": {
"value": null
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"documentation_url": {
"type": "string"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"resource": {
"type": "string"
},
"field": {
"type": "string"
}
}
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/requires_authentication"
},
"503": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"documentation_url": {
"type": "string"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "cards"
}
}
},
"/projects/columns/{column_id}": {
"get": {
"summary": "Get a project column",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/get-column",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#get-a-project-column"
},
"parameters": [
{
"$ref": "#/components/parameters/column-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/project-column"
},
"examples": {
"default": {
"$ref": "#/components/examples/project-column"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "columns"
}
},
"patch": {
"summary": "Update an existing project column",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/update-column",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#update-a-project-column"
},
"parameters": [
{
"$ref": "#/components/parameters/column-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"description": "Name of the project column",
"example": "Remaining tasks",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"examples": {
"default": {
"summary": "Rename the project column",
"value": {
"name": "To Do"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/project-column"
},
"examples": {
"default": {
"$ref": "#/components/examples/project-column"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "columns"
}
},
"delete": {
"summary": "Delete a project column",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/delete-column",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#delete-a-project-column"
},
"parameters": [
{
"$ref": "#/components/parameters/column-id"
}
],
"responses": {
"204": {
"description": "Response"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "columns"
}
}
},
"/projects/columns/{column_id}/cards": {
"get": {
"summary": "List project cards",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/list-cards",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#list-project-cards"
},
"parameters": [
{
"$ref": "#/components/parameters/column-id"
},
{
"name": "archived_state",
"description": "Filters the project cards that are returned by the card's state.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"all",
"archived",
"not_archived"
],
"default": "not_archived"
}
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/project-card"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/project-card-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "cards"
}
},
"post": {
"summary": "Create a project card",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/create-card",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#create-a-project-card"
},
"parameters": [
{
"$ref": "#/components/parameters/column-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"note": {
"description": "The project card's note",
"example": "Update all gems",
"type": "string",
"nullable": true
}
},
"required": [
"note"
]
},
{
"type": "object",
"properties": {
"content_id": {
"description": "The unique identifier of the content associated with the card",
"example": 42,
"type": "integer"
},
"content_type": {
"description": "The piece of content associated with the card",
"example": "PullRequest",
"type": "string"
}
},
"required": [
"content_id",
"content_type"
]
}
]
},
"examples": {
"default": {
"summary": "Create a new card",
"value": {
"note": "Add payload for delete Project column"
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/project-card"
},
"examples": {
"default": {
"$ref": "#/components/examples/project-card"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
},
"422": {
"description": "Validation failed",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/validation-error"
},
{
"$ref": "#/components/schemas/validation-error-simple"
}
]
}
}
}
},
"503": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"documentation_url": {
"type": "string"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "cards"
}
}
},
"/projects/columns/{column_id}/moves": {
"post": {
"summary": "Move a project column",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/move-column",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#move-a-project-column"
},
"parameters": [
{
"$ref": "#/components/parameters/column-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"position": {
"description": "The position of the column in a project. Can be one of: `first`, `last`, or `after:<column_id>` to place after the specified column.",
"example": "last",
"type": "string",
"pattern": "^(?:first|last|after:\\d+)$"
}
},
"required": [
"position"
],
"type": "object"
},
"examples": {
"default": {
"summary": "Move the column to the end of the board",
"value": {
"position": "last"
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
},
"additionalProperties": false
},
"examples": {
"default": {
"value": null
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"422": {
"$ref": "#/components/responses/validation_failed_simple"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "columns"
}
}
},
"/projects/{project_id}": {
"get": {
"summary": "Get a project",
"description": "Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.",
"tags": [
"projects"
],
"operationId": "projects/get",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#get-a-project"
},
"parameters": [
{
"$ref": "#/components/parameters/project-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/project"
},
"examples": {
"default": {
"$ref": "#/components/examples/project-3"
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": null
}
},
"patch": {
"summary": "Update a project",
"description": "Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.",
"operationId": "projects/update",
"tags": [
"projects"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#update-a-project"
},
"parameters": [
{
"$ref": "#/components/parameters/project-id"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"description": "Name of the project",
"example": "Week One Sprint",
"type": "string"
},
"body": {
"description": "Body of the project",
"example": "This project represents the sprint of the first week in January",
"type": "string",
"nullable": true
},
"state": {
"description": "State of the project; either 'open' or 'closed'",
"example": "open",
"type": "string"
},
"organization_permission": {
"description": "The baseline permission that all organization members have on this project",
"type": "string",
"enum": [
"read",
"write",
"admin",
"none"
]
},
"private": {
"description": "Whether or not this project can be seen by everyone.",
"type": "boolean"
}
},
"type": "object"
},
"examples": {
"default": {
"summary": "Change the name, state, and permissions for a project",
"value": {
"name": "Week One Sprint",
"state": "open",
"organization_permission": "write"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/project"
},
"examples": {
"default": {
"$ref": "#/components/examples/project-3"
}
}
}
}
},
"404": {
"description": "Not Found if the authenticated user does not have access to the project"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"documentation_url": {
"type": "string"
},
"errors": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/requires_authentication"
},
"410": {
"$ref": "#/components/responses/gone"
},
"422": {
"$ref": "#/components/responses/validation_failed_simple"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": null
}
},
"delete": {
"summary": "Delete a project",
"description": "Deletes a project board. Returns a `404 Not Found` status if projects are disabled.",
"operationId": "projects/delete",
"tags": [
"projects"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#delete-a-project"
},
"parameters": [
{
"$ref": "#/components/parameters/project-id"
}
],
"responses": {
"204": {
"description": "Delete Success"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"documentation_url": {
"type": "string"
},
"errors": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/requires_authentication"
},
"410": {
"$ref": "#/components/responses/gone"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": null
}
}
},
"/projects/{project_id}/collaborators": {
"get": {
"summary": "List project collaborators",
"description": "Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators.",
"tags": [
"projects"
],
"operationId": "projects/list-collaborators",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#list-project-collaborators"
},
"parameters": [
{
"$ref": "#/components/parameters/project-id"
},
{
"name": "affiliation",
"description": "Filters the collaborators by their affiliation. `outside` means outside collaborators of a project that are not a member of the project's organization. `direct` means collaborators with permissions to a project, regardless of organization membership status. `all` means all collaborators the authenticated user can see.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"outside",
"direct",
"all"
],
"default": "all"
}
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/simple-user"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/simple-user-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "collaborators"
}
}
},
"/projects/{project_id}/collaborators/{username}": {
"put": {
"summary": "Add project collaborator",
"description": "Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator.",
"tags": [
"projects"
],
"operationId": "projects/add-collaborator",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#add-project-collaborator"
},
"parameters": [
{
"$ref": "#/components/parameters/project-id"
},
{
"$ref": "#/components/parameters/username"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"permission": {
"description": "The permission to grant the collaborator.",
"enum": [
"read",
"write",
"admin"
],
"default": "write",
"example": "write",
"type": "string"
}
},
"nullable": true
},
"examples": {
"default": {
"summary": "Applying write permissions for the new collaborator",
"value": {
"permission": "write"
}
}
}
}
}
},
"responses": {
"204": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "collaborators"
}
},
"delete": {
"summary": "Remove user as a collaborator",
"description": "Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator.",
"tags": [
"projects"
],
"operationId": "projects/remove-collaborator",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#remove-project-collaborator"
},
"parameters": [
{
"$ref": "#/components/parameters/project-id"
},
{
"$ref": "#/components/parameters/username"
}
],
"responses": {
"204": {
"description": "Response"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "collaborators"
}
}
},
"/projects/{project_id}/collaborators/{username}/permission": {
"get": {
"summary": "Get project permission for a user",
"description": "Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level.",
"tags": [
"projects"
],
"operationId": "projects/get-permission-for-user",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#get-project-permission-for-a-user"
},
"parameters": [
{
"$ref": "#/components/parameters/project-id"
},
{
"$ref": "#/components/parameters/username"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/project-collaborator-permission"
},
"examples": {
"default": {
"$ref": "#/components/examples/project-collaborator-permission"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "collaborators"
}
}
},
"/projects/{project_id}/columns": {
"get": {
"summary": "List project columns",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/list-columns",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#list-project-columns"
},
"parameters": [
{
"$ref": "#/components/parameters/project-id"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/project-column"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/project-column-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "columns"
}
},
"post": {
"summary": "Create a project column",
"description": "",
"tags": [
"projects"
],
"operationId": "projects/create-column",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/projects#create-a-project-column"
},
"parameters": [
{
"$ref": "#/components/parameters/project-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"properties": {
"name": {
"description": "Name of the project column",
"example": "Remaining tasks",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"examples": {
"default": {
"value": {
"name": "Remaining tasks"
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/project-column"
},
"examples": {
"default": {
"value": {
"url": "https://api.github.com/projects/columns/367",
"project_url": "https://api.github.com/projects/120",
"cards_url": "https://api.github.com/projects/columns/367/cards",
"id": 367,
"node_id": "MDEzOlByb2plY3RDb2x1bW4zNjc=",
"name": "To Do",
"created_at": "2016-09-05T14:18:44Z",
"updated_at": "2016-09-05T14:22:28Z"
}
}
}
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"422": {
"$ref": "#/components/responses/validation_failed_simple"
},
"401": {
"$ref": "#/components/responses/requires_authentication"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "projects",
"subcategory": "columns"
}
}
},
"/rate_limit": {
"get": {
"summary": "Get rate limit status for the authenticated user",
"description": "**Note:** Accessing this endpoint does not count against your REST API rate limit.\n\n**Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object.",
"tags": [
"rate-limit"
],
"operationId": "rate-limit/get",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user"
},
"parameters": [
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/rate-limit-overview"
},
"examples": {
"default": {
"$ref": "#/components/examples/rate-limit-overview"
}
}
}
},
"headers": {
"X-RateLimit-Limit": {
"$ref": "#/components/headers/x-rate-limit-limit"
},
"X-RateLimit-Remaining": {
"$ref": "#/components/headers/x-rate-limit-remaining"
},
"X-RateLimit-Reset": {
"$ref": "#/components/headers/x-rate-limit-reset"
}
}
},
"304": {
"$ref": "#/components/responses/not_modified"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "rate-limit",
"subcategory": null
}
}
},
"/repos/{org}/{repo}/actions/required_workflows": {
"get": {
"summary": "List repository required workflows",
"description": "Lists the required workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see \"[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows).\"",
"tags": [
"actions"
],
"operationId": "actions/list-repo-required-workflows",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-repository-required-workflows"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"required_workflows"
],
"properties": {
"total_count": {
"type": "integer"
},
"required_workflows": {
"type": "array",
"items": {
"$ref": "#/components/schemas/repo-required-workflow"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/repo-required-workflow-paginated"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "required-workflows"
}
}
},
"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}": {
"get": {
"summary": "Get a required workflow entity for a repository",
"description": "Gets a specific required workflow present in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. For more information, see \"[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows).\"",
"tags": [
"actions"
],
"operationId": "actions/get-repo-required-workflow",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-repository-required-workflow"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/repo-required-workflow-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/repo-required-workflow"
},
"examples": {
"default": {
"$ref": "#/components/examples/repo-required-workflow"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "required-workflows"
}
}
},
"/repos/{org}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/timing": {
"get": {
"summary": "Get required workflow usage",
"description": "Gets the number of billable minutes used by a specific required workflow during the current billing cycle.\n\nBillable minutes only apply to required workflows running in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see \"[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions).\"\n\nAnyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-repo-required-workflow-usage",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-repository-required-workflow-usage"
},
"parameters": [
{
"$ref": "#/components/parameters/org"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/repo-required-workflow-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/workflow-usage"
},
"examples": {
"default": {
"$ref": "#/components/examples/workflow-usage"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "actions",
"subcategory": "required-workflows"
}
}
},
"/repos/{owner}/{repo}": {
"get": {
"summary": "Get a repository",
"description": "The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network.\n\n**Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see \"[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).\"",
"tags": [
"repos"
],
"operationId": "repos/get",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#get-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/full-repository"
},
"examples": {
"default-response": {
"$ref": "#/components/examples/full-repository-default-response"
}
}
}
}
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"301": {
"$ref": "#/components/responses/moved_permanently"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
}
},
"patch": {
"summary": "Update a repository",
"description": "**Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint.",
"tags": [
"repos"
],
"operationId": "repos/update",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/repos/repos#update-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the repository."
},
"description": {
"type": "string",
"description": "A short description of the repository."
},
"homepage": {
"type": "string",
"description": "A URL with more information about the repository."
},
"private": {
"type": "boolean",
"description": "Either `true` to make the repository private or `false` to make it public. Default: `false`. \n**Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private.",
"default": false
},
"visibility": {
"type": "string",
"description": "The visibility of the repository.",
"enum": [
"public",
"private"
]
},
"security_and_analysis": {
"type": "object",
"description": "Specify which security and analysis features to enable or disable for the repository.\n\nTo use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see \"[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).\"\n\nFor example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request:\n`{ \"security_and_analysis\": {\"advanced_security\": { \"status\": \"enabled\" } } }`.\n\nYou can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request.",
"nullable": true,
"properties": {
"advanced_security": {
"type": "object",
"description": "Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see \"[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security).\"",
"properties": {
"status": {
"type": "string",
"description": "Can be `enabled` or `disabled`."
}
}
},
"secret_scanning": {
"type": "object",
"description": "Use the `status` property to enable or disable secret scanning for this repository. For more information, see \"[About secret scanning](/code-security/secret-security/about-secret-scanning).\"",
"properties": {
"status": {
"type": "string",
"description": "Can be `enabled` or `disabled`."
}
}
},
"secret_scanning_push_protection": {
"type": "object",
"description": "Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see \"[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning).\"",
"properties": {
"status": {
"type": "string",
"description": "Can be `enabled` or `disabled`."
}
}
}
}
},
"has_issues": {
"type": "boolean",
"description": "Either `true` to enable issues for this repository or `false` to disable them.",
"default": true
},
"has_projects": {
"type": "boolean",
"description": "Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error.",
"default": true
},
"has_wiki": {
"type": "boolean",
"description": "Either `true` to enable the wiki for this repository or `false` to disable it.",
"default": true
},
"is_template": {
"type": "boolean",
"description": "Either `true` to make this repo available as a template repository or `false` to prevent it.",
"default": false
},
"default_branch": {
"type": "string",
"description": "Updates the default branch for this repository."
},
"allow_squash_merge": {
"type": "boolean",
"description": "Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging.",
"default": true
},
"allow_merge_commit": {
"type": "boolean",
"description": "Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits.",
"default": true
},
"allow_rebase_merge": {
"type": "boolean",
"description": "Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.",
"default": true
},
"allow_auto_merge": {
"type": "boolean",
"description": "Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge.",
"default": false
},
"delete_branch_on_merge": {
"type": "boolean",
"description": "Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion.",
"default": false
},
"allow_update_branch": {
"type": "boolean",
"description": "Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise.",
"default": false
},
"use_squash_pr_title_as_default": {
"type": "boolean",
"description": "Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead.",
"default": false,
"deprecated": true
},
"squash_merge_commit_title": {
"type": "string",
"enum": [
"PR_TITLE",
"COMMIT_OR_PR_TITLE"
],
"description": "The default value for a squash merge commit title:\n\n- `PR_TITLE` - default to the pull request's title.\n- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit)."
},
"squash_merge_commit_message": {
"type": "string",
"enum": [
"PR_BODY",
"COMMIT_MESSAGES",
"BLANK"
],
"description": "The default value for a squash merge commit message:\n\n- `PR_BODY` - default to the pull request's body.\n- `COMMIT_MESSAGES` - default to the branch's commit messages.\n- `BLANK` - default to a blank commit message."
},
"merge_commit_title": {
"type": "string",
"enum": [
"PR_TITLE",
"MERGE_MESSAGE"
],
"description": "The default value for a merge commit title.\n\n- `PR_TITLE` - default to the pull request's title.\n- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name)."
},
"merge_commit_message": {
"type": "string",
"enum": [
"PR_BODY",
"PR_TITLE",
"BLANK"
],
"description": "The default value for a merge commit message.\n\n- `PR_TITLE` - default to the pull request's title.\n- `PR_BODY` - default to the pull request's body.\n- `BLANK` - default to a blank commit message."
},
"archived": {
"type": "boolean",
"description": "Whether to archive this repository. `false` will unarchive a previously archived repository.",
"default": false
},
"allow_forking": {
"type": "boolean",
"description": "Either `true` to allow private forks, or `false` to prevent private forks.",
"default": false
},
"web_commit_signoff_required": {
"type": "boolean",
"description": "Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits.",
"default": false
}
}
},
"examples": {
"default": {
"value": {
"name": "Hello-World",
"description": "This is your first repository",
"homepage": "https://github.com",
"private": true,
"has_issues": true,
"has_projects": true,
"has_wiki": true
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/full-repository"
},
"examples": {
"default": {
"$ref": "#/components/examples/full-repository"
}
}
}
}
},
"307": {
"$ref": "#/components/responses/temporary_redirect"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
}
},
"delete": {
"summary": "Delete a repository",
"description": "Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required.\n\nIf an organization owner has configured the organization to prevent members from deleting organization-owned\nrepositories, you will get a `403 Forbidden` response.",
"tags": [
"repos"
],
"operationId": "repos/delete",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#delete-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"204": {
"description": "Response"
},
"403": {
"description": "If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response:",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"documentation_url": {
"type": "string"
}
}
},
"examples": {
"default": {
"value": {
"message": "Organization members cannot delete repositories.",
"documentation_url": "https://docs.github.com/rest/reference/repos#delete-a-repository"
}
}
}
}
}
},
"307": {
"$ref": "#/components/responses/temporary_redirect"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
}
}
},
"/repos/{owner}/{repo}/actions/artifacts": {
"get": {
"summary": "List artifacts for a repository",
"description": "Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-artifacts-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-artifacts-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
},
{
"name": "name",
"description": "Filters artifacts by exact match on their name field.",
"in": "query",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"artifacts"
],
"properties": {
"total_count": {
"type": "integer"
},
"artifacts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/artifact"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/artifact-paginated"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "artifacts"
}
}
},
"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}": {
"get": {
"summary": "Get an artifact",
"description": "Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-artifact",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-an-artifact"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/artifact-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/artifact"
},
"examples": {
"default": {
"$ref": "#/components/examples/artifact"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "artifacts"
}
},
"delete": {
"summary": "Delete an artifact",
"description": "Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/delete-artifact",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#delete-an-artifact"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/artifact-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "artifacts"
}
}
},
"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": {
"get": {
"summary": "Download an artifact",
"description": "Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in\nthe response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to\nthe repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope.\nGitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/download-artifact",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#download-an-artifact"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/artifact-id"
},
{
"name": "archive_format",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"302": {
"description": "Response",
"headers": {
"Location": {
"$ref": "#/components/headers/location"
}
}
},
"410": {
"$ref": "#/components/responses/gone"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "artifacts"
}
}
},
"/repos/{owner}/{repo}/actions/cache/usage": {
"get": {
"summary": "Get GitHub Actions cache usage for a repository",
"description": "Gets GitHub Actions cache usage for a repository.\nThe data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.\nAnyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-actions-cache-usage",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/actions-cache-usage-by-repository"
},
"examples": {
"default": {
"$ref": "#/components/examples/actions-cache-usage"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "cache"
}
}
},
"/repos/{owner}/{repo}/actions/caches": {
"get": {
"summary": "List GitHub Actions caches for a repository",
"description": "Lists the GitHub Actions caches for a repository.\nYou must authenticate using an access token with the `repo` scope to use this endpoint.\nGitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-actions-cache-list",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/git-ref"
},
{
"$ref": "#/components/parameters/actions-cache-key"
},
{
"$ref": "#/components/parameters/actions-cache-list-sort"
},
{
"$ref": "#/components/parameters/direction"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/actions-cache-list"
},
"examples": {
"default": {
"$ref": "#/components/examples/actions-cache-list"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"previews": [
],
"category": "actions",
"subcategory": "cache"
}
},
"delete": {
"summary": "Delete GitHub Actions caches for a repository (using a cache key)",
"description": "Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref.\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint.\n\nGitHub Apps must have the `actions:write` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/delete-actions-cache-by-key",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/actions-cache-key-required"
},
{
"$ref": "#/components/parameters/git-ref"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/actions-cache-list"
},
"examples": {
"default": {
"$ref": "#/components/examples/actions-cache-list"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "cache"
}
}
},
"/repos/{owner}/{repo}/actions/caches/{cache_id}": {
"delete": {
"summary": "Delete a GitHub Actions cache for a repository (using a cache ID)",
"description": "Deletes a GitHub Actions cache for a repository, using a cache ID.\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint.\n\nGitHub Apps must have the `actions:write` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/delete-actions-cache-by-id",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/cache-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "cache"
}
}
},
"/repos/{owner}/{repo}/actions/jobs/{job_id}": {
"get": {
"summary": "Get a job for a workflow run",
"description": "Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-job-for-workflow-run",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-a-job-for-a-workflow-run"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/job-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/job"
},
"examples": {
"default": {
"$ref": "#/components/examples/job"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-jobs"
}
}
},
"/repos/{owner}/{repo}/actions/jobs/{job_id}/logs": {
"get": {
"summary": "Download job logs for a workflow run",
"description": "Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look\nfor `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can\nuse this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must\nhave the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/download-job-logs-for-workflow-run",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#download-job-logs-for-a-workflow-run"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/job-id"
}
],
"responses": {
"302": {
"description": "Response",
"headers": {
"Location": {
"example": "https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/jobs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D",
"schema": {
"type": "string"
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-jobs"
}
}
},
"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": {
"post": {
"summary": "Re-run a job from a workflow run",
"description": "Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/re-run-job-for-workflow-run",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#re-run-job-for-workflow-run"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/job-id"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"nullable": true,
"properties": {
"enable_debug_logging": {
"type": "boolean",
"default": false,
"description": "Whether to enable debug logging for the re-run."
}
}
},
"examples": {
"default": {
"value": null
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/empty-object"
},
"examples": {
"default": {
"value": null
}
}
}
}
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
}
}
},
"/repos/{owner}/{repo}/actions/oidc/customization/sub": {
"get": {
"summary": "Get the customization template for an OIDC subject claim for a repository",
"description": "Gets the customization template for an OpenID Connect (OIDC) subject claim.\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-customization-template-for-an-oidc-subject-claim-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"200": {
"description": "Status response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/oidc-custom-sub-repo"
},
"examples": {
"default": {
"$ref": "#/components/examples/oidc-custom-sub-repo"
}
}
}
}
},
"400": {
"$ref": "#/components/responses/bad_request"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": true,
"previews": [
],
"category": "actions",
"subcategory": "oidc"
}
},
"put": {
"summary": "Set the customization template for an OIDC subject claim for a repository",
"description": "Sets the customization template and `opt-in` or `opt-out` flag for an OpenID Connect (OIDC) subject claim 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-customization-template-for-an-oidc-subject-claim-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/oidc-custom-sub-repo"
},
"examples": {
"default": {
"$ref": "#/components/examples/oidc-custom-sub-repo"
}
}
}
}
},
"responses": {
"201": {
"description": "Empty response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/empty-object"
},
"examples": {
"default": {
"value": null
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"400": {
"$ref": "#/components/responses/bad_request"
},
"422": {
"$ref": "#/components/responses/validation_failed_simple"
}
},
"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",
"description": "Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository.\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.",
"operationId": "actions/get-github-actions-permissions-repository",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/actions-repository-permissions"
},
"examples": {
"default": {
"$ref": "#/components/examples/actions-repository-permissions"
}
}
}
}
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "permissions"
}
},
"put": {
"summary": "Set GitHub Actions permissions for a repository",
"description": "Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository.\n\nIf the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository.\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.",
"operationId": "actions/set-github-actions-permissions-repository",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"enabled": {
"$ref": "#/components/schemas/actions-enabled"
},
"allowed_actions": {
"$ref": "#/components/schemas/allowed-actions"
}
},
"required": [
"enabled"
]
},
"examples": {
"default": {
"value": {
"enabled": true,
"allowed_actions": "selected"
}
}
}
}
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "permissions"
}
}
},
"/repos/{owner}/{repo}/actions/permissions/access": {
"get": {
"summary": "Get the level of access for workflows outside of the repository",
"description": "Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository.\nThis endpoint only applies to private repositories.\nFor more information, see \"[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository).\"\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the\nrepository `administration` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-workflow-access-to-repository",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-workflow-access-level-to-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/actions-workflow-access-to-repository"
},
"examples": {
"default": {
"$ref": "#/components/examples/actions-workflow-access-to-repository"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"previews": [
],
"category": "actions",
"subcategory": "permissions"
}
},
"put": {
"summary": "Set the level of access for workflows outside of the repository",
"description": "Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository.\nThis endpoint only applies to private repositories.\nFor more information, see \"[Allowing access to components in a private repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository)\".\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the\nrepository `administration` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/set-workflow-access-to-repository",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-workflow-access-to-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/actions-workflow-access-to-repository"
},
"examples": {
"default": {
"$ref": "#/components/examples/actions-workflow-access-to-repository"
}
}
}
}
},
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"previews": [
],
"category": "actions",
"subcategory": "permissions"
}
}
},
"/repos/{owner}/{repo}/actions/permissions/selected-actions": {
"get": {
"summary": "Get allowed actions and reusable workflows for a repository",
"description": "Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository).\"\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.",
"operationId": "actions/get-allowed-actions-repository",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-allowed-actions-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/selected-actions"
},
"examples": {
"default": {
"$ref": "#/components/examples/selected-actions"
}
}
}
}
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "permissions"
}
},
"put": {
"summary": "Set allowed actions and reusable workflows for a repository",
"description": "Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see \"[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository).\"\n\nIf the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings.\n\nTo use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories.\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.",
"operationId": "actions/set-allowed-actions-repository",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-allowed-actions-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/selected-actions"
},
"examples": {
"selected_actions": {
"$ref": "#/components/examples/selected-actions"
}
}
}
}
},
"x-github": {
"enabledForGitHubApps": true,
"githubCloudOnly": false,
"category": "actions",
"subcategory": "permissions"
}
}
},
"/repos/{owner}/{repo}/actions/permissions/workflow": {
"get": {
"summary": "Get default workflow permissions for a repository",
"description": "Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository,\nas well as if GitHub Actions can submit approving pull request reviews.\nFor more information, see \"[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository).\"\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API.",
"tags": [
"actions"
],
"operationId": "actions/get-github-actions-default-workflow-permissions-repository",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/actions-get-default-workflow-permissions"
},
"examples": {
"default": {
"$ref": "#/components/examples/actions-default-workflow-permissions"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "permissions"
}
},
"put": {
"summary": "Set default workflow permissions for a repository",
"description": "Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions\ncan submit approving pull request reviews.\nFor more information, see \"[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository).\"\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API.",
"tags": [
"actions"
],
"operationId": "actions/set-github-actions-default-workflow-permissions-repository",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"204": {
"description": "Success response"
},
"409": {
"description": "Conflict response when changing a setting is prevented by the owning organization or enterprise"
}
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/actions-set-default-workflow-permissions"
},
"examples": {
"default": {
"$ref": "#/components/examples/actions-default-workflow-permissions"
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "permissions"
}
}
},
"/repos/{owner}/{repo}/actions/required_workflows/{required_workflow_id_for_repo}/runs": {
"get": {
"summary": "List workflow runs for a required workflow",
"description": "List all workflow runs for a required workflow. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters).\n\nAnyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. For more information, see \"[Required Workflows](https://docs.github.com/actions/using-workflows/required-workflows).\"",
"tags": [
"actions"
],
"operationId": "actions/list-required-workflow-runs",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-required-workflow-runs"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/repo-required-workflow-id"
},
{
"$ref": "#/components/parameters/actor"
},
{
"$ref": "#/components/parameters/workflow-run-branch"
},
{
"$ref": "#/components/parameters/event"
},
{
"$ref": "#/components/parameters/workflow-run-status"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/created"
},
{
"$ref": "#/components/parameters/exclude-pull-requests"
},
{
"$ref": "#/components/parameters/workflow-run-check-suite-id"
},
{
"$ref": "#/components/parameters/workflow-run-head-sha"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"workflow_runs"
],
"properties": {
"total_count": {
"type": "integer"
},
"workflow_runs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/workflow-run"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/workflow-run-paginated"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
}
}
},
"/repos/{owner}/{repo}/actions/runners": {
"get": {
"summary": "List self-hosted runners for a repository",
"description": "Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-self-hosted-runners-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"runners"
],
"properties": {
"total_count": {
"type": "integer"
},
"runners": {
"type": "array",
"items": {
"$ref": "#/components/schemas/runner"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/runner-paginated"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
}
},
"/repos/{owner}/{repo}/actions/runners/downloads": {
"get": {
"summary": "List runner applications for a repository",
"description": "Lists binaries for the runner application that you can download and run.\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-runner-applications-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-runner-applications-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/runner-application"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/runner-application-items"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
}
},
"/repos/{owner}/{repo}/actions/runners/registration-token": {
"post": {
"summary": "Create a registration token for a repository",
"description": "Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate\nusing an access token with the `repo` scope to use this endpoint.\n\n#### Example using registration token\n \nConfigure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.\n\n```\n./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN\n```",
"tags": [
"actions"
],
"operationId": "actions/create-registration-token-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/authentication-token"
},
"examples": {
"default": {
"$ref": "#/components/examples/authentication-token"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
}
},
"/repos/{owner}/{repo}/actions/runners/remove-token": {
"post": {
"summary": "Create a remove token for a repository",
"description": "Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.\nYou must authenticate using an access token with the `repo` scope to use this endpoint.\n\n#### Example using remove token\n \nTo remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.\n\n```\n./config.sh remove --token TOKEN\n```",
"tags": [
"actions"
],
"operationId": "actions/create-remove-token-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#create-a-remove-token-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/authentication-token"
},
"examples": {
"default": {
"$ref": "#/components/examples/authentication-token-2"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
}
},
"/repos/{owner}/{repo}/actions/runners/{runner_id}": {
"get": {
"summary": "Get a self-hosted runner for a repository",
"description": "Gets a specific self-hosted runner configured in a repository.\n\nYou must authenticate using an access token with the `repo` scope to use this\nendpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-self-hosted-runner-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/runner-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/runner"
},
"examples": {
"default": {
"$ref": "#/components/examples/runner"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
},
"delete": {
"summary": "Delete a self-hosted runner from a repository",
"description": "Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.\n\nYou must authenticate using an access token with the `repo`\nscope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/delete-self-hosted-runner-from-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/runner-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
}
},
"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels": {
"get": {
"summary": "List labels for a self-hosted runner for a repository",
"description": "Lists all labels for a self-hosted runner configured in a repository.\n\nYou must authenticate using an access token with the `repo` scope to use this\nendpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-labels-for-self-hosted-runner-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/runner-id"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/actions_runner_labels"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
},
"post": {
"summary": "Add custom labels to a self-hosted runner for a repository",
"description": "Add custom labels to a self-hosted runner configured in a repository.\n\nYou must authenticate using an access token with the `repo` scope to use this\nendpoint.",
"tags": [
"actions"
],
"operationId": "actions/add-custom-labels-to-self-hosted-runner-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/runner-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"labels"
],
"properties": {
"labels": {
"type": "array",
"minItems": 1,
"maxItems": 100,
"description": "The names of the custom labels to add to the runner.",
"items": {
"type": "string"
}
}
}
},
"examples": {
"default": {
"value": {
"labels": [
"gpu",
"accelerated"
]
}
}
}
}
}
},
"responses": {
"200": {
"$ref": "#/components/responses/actions_runner_labels"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed_simple"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
},
"put": {
"summary": "Set custom labels for a self-hosted runner for a repository",
"description": "Remove all previous custom labels and set the new custom labels for a specific\nself-hosted runner configured in a repository.\n\nYou must authenticate using an access token with the `repo` scope to use this\nendpoint.",
"tags": [
"actions"
],
"operationId": "actions/set-custom-labels-for-self-hosted-runner-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/runner-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"labels"
],
"properties": {
"labels": {
"type": "array",
"minItems": 0,
"maxItems": 100,
"description": "The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels.",
"items": {
"type": "string"
}
}
}
},
"examples": {
"default": {
"value": {
"labels": [
"gpu",
"accelerated"
]
}
}
}
}
}
},
"responses": {
"200": {
"$ref": "#/components/responses/actions_runner_labels"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed_simple"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
},
"delete": {
"summary": "Remove all custom labels from a self-hosted runner for a repository",
"description": "Remove all custom labels from a self-hosted runner configured in a\nrepository. Returns the remaining read-only labels from the runner.\n\nYou must authenticate using an access token with the `repo` scope to use this\nendpoint.",
"tags": [
"actions"
],
"operationId": "actions/remove-all-custom-labels-from-self-hosted-runner-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/runner-id"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/actions_runner_labels_readonly"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
}
},
"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": {
"delete": {
"summary": "Remove a custom label from a self-hosted runner for a repository",
"description": "Remove a custom label from a self-hosted runner configured\nin a repository. Returns the remaining labels from the runner.\n\nThis endpoint returns a `404 Not Found` status if the custom label is not\npresent on the runner.\n\nYou must authenticate using an access token with the `repo` scope to use this\nendpoint.",
"tags": [
"actions"
],
"operationId": "actions/remove-custom-label-from-self-hosted-runner-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/runner-id"
},
{
"$ref": "#/components/parameters/runner-label-name"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/actions_runner_labels"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed_simple"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "self-hosted-runners"
}
}
},
"/repos/{owner}/{repo}/actions/runs": {
"get": {
"summary": "List workflow runs for a repository",
"description": "Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters).\n\nAnyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-workflow-runs-for-repo",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/actor"
},
{
"$ref": "#/components/parameters/workflow-run-branch"
},
{
"$ref": "#/components/parameters/event"
},
{
"$ref": "#/components/parameters/workflow-run-status"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/created"
},
{
"$ref": "#/components/parameters/exclude-pull-requests"
},
{
"$ref": "#/components/parameters/workflow-run-check-suite-id"
},
{
"$ref": "#/components/parameters/workflow-run-head-sha"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"workflow_runs"
],
"properties": {
"total_count": {
"type": "integer"
},
"workflow_runs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/workflow-run"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/workflow-run-paginated"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
}
}
},
"/repos/{owner}/{repo}/actions/runs/{run_id}": {
"get": {
"summary": "Get a workflow run",
"description": "Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-workflow-run",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-a-workflow-run"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/run-id"
},
{
"$ref": "#/components/parameters/exclude-pull-requests"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/workflow-run"
},
"examples": {
"default": {
"$ref": "#/components/examples/workflow-run"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
}
},
"delete": {
"summary": "Delete a workflow run",
"description": "Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is\nprivate you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use\nthis endpoint.",
"operationId": "actions/delete-workflow-run",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#delete-a-workflow-run"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/run-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
}
}
},
"/repos/{owner}/{repo}/actions/runs/{run_id}/approvals": {
"get": {
"summary": "Get the review history for a workflow run",
"description": "Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-reviews-for-run",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-the-review-history-for-a-workflow-run"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/run-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/environment-approvals"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/environment-approvals-items"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
}
}
},
"/repos/{owner}/{repo}/actions/runs/{run_id}/approve": {
"post": {
"summary": "Approve a workflow run for a fork pull request",
"description": "Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see [\"Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks).\"\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/approve-workflow-run",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/run-id"
}
],
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/empty-object"
},
"examples": {
"default": {
"value": null
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
}
}
},
"/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": {
"get": {
"summary": "List workflow run artifacts",
"description": "Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-workflow-run-artifacts",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-workflow-run-artifacts"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/run-id"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"artifacts"
],
"properties": {
"total_count": {
"type": "integer"
},
"artifacts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/artifact"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/artifact-paginated"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "artifacts"
}
}
},
"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": {
"get": {
"summary": "Get a workflow run attempt",
"description": "Gets a specific workflow run attempt. Anyone with read access to the repository\ncan use this endpoint. If the repository is private you must use an access token\nwith the `repo` scope. GitHub Apps must have the `actions:read` permission to\nuse this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-workflow-run-attempt",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/run-id"
},
{
"$ref": "#/components/parameters/attempt-number"
},
{
"$ref": "#/components/parameters/exclude-pull-requests"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/workflow-run"
},
"examples": {
"default": {
"$ref": "#/components/examples/workflow-run"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
}
}
},
"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": {
"get": {
"summary": "List jobs for a workflow run attempt",
"description": "Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters).",
"tags": [
"actions"
],
"operationId": "actions/list-jobs-for-workflow-run-attempt",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/run-id"
},
{
"$ref": "#/components/parameters/attempt-number"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"jobs"
],
"properties": {
"total_count": {
"type": "integer"
},
"jobs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/job"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/job-paginated"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-jobs"
}
}
},
"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": {
"get": {
"summary": "Download workflow run attempt logs",
"description": "Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after\n1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to\nthe repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope.\nGitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/download-workflow-run-attempt-logs",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/run-id"
},
{
"$ref": "#/components/parameters/attempt-number"
}
],
"responses": {
"302": {
"description": "Response",
"headers": {
"Location": {
"example": "https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/runs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D",
"schema": {
"type": "string"
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
}
}
},
"/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": {
"post": {
"summary": "Cancel a workflow run",
"description": "Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/cancel-workflow-run",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#cancel-a-workflow-run"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/run-id"
}
],
"responses": {
"202": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/empty-object"
},
"examples": {
"default": {
"value": null
}
}
}
}
},
"409": {
"$ref": "#/components/responses/conflict"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
}
}
},
"/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": {
"get": {
"summary": "List jobs for a workflow run",
"description": "Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters).",
"tags": [
"actions"
],
"operationId": "actions/list-jobs-for-workflow-run",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/run-id"
},
{
"name": "filter",
"description": "Filters jobs by their `completed_at` timestamp. `latest` returns jobs from the most recent execution of the workflow run. `all` returns all jobs for a workflow run, including from old executions of the workflow run.",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"latest",
"all"
],
"default": "latest"
}
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"jobs"
],
"properties": {
"total_count": {
"type": "integer"
},
"jobs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/job"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/job-paginated"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-jobs"
}
}
},
"/repos/{owner}/{repo}/actions/runs/{run_id}/logs": {
"get": {
"summary": "Download workflow run logs",
"description": "Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for\n`Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use\nthis endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have\nthe `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/download-workflow-run-logs",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#download-workflow-run-logs"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/run-id"
}
],
"responses": {
"302": {
"description": "Response",
"headers": {
"Location": {
"example": "https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/runs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D",
"schema": {
"type": "string"
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
}
},
"delete": {
"summary": "Delete workflow run logs",
"description": "Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/delete-workflow-run-logs",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#delete-workflow-run-logs"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/run-id"
}
],
"responses": {
"204": {
"description": "Response"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"500": {
"$ref": "#/components/responses/internal_error"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
}
}
},
"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": {
"get": {
"summary": "Get pending deployments for a workflow run",
"description": "Get all deployment environments for a workflow run that are waiting for protection rules to pass.\n\nAnyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-pending-deployments-for-run",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-pending-deployments-for-a-workflow-run"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/run-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/pending-deployment"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/pending-deployment-items"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
}
},
"post": {
"summary": "Review pending deployments for a workflow run",
"description": "Approve or reject pending deployments that are waiting on approval by a required reviewer.\n\nRequired reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/review-pending-deployments-for-run",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/run-id"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"environment_ids": {
"type": "array",
"description": "The list of environment ids to approve or reject",
"example": [
161171787,
161171795
],
"items": {
"type": "integer",
"example": 161171787
}
},
"state": {
"type": "string",
"description": "Whether to approve or reject deployment to the specified environments.",
"enum": [
"approved",
"rejected"
],
"example": "approved"
},
"comment": {
"type": "string",
"description": "A comment to accompany the deployment review",
"example": "Ship it!"
}
},
"required": [
"environment_ids",
"state",
"comment"
]
},
"examples": {
"default": {
"value": {
"environment_ids": [
161171787
],
"state": "approved",
"comment": "Ship it!"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/deployment"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/deployment-items"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "actions",
"subcategory": "workflow-runs"
}
}
},
"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun": {
"post": {
"summary": "Re-run a workflow",
"description": "Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/re-run-workflow",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#re-run-a-workflow"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/run-id"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"nullable": true,
"properties": {
"enable_debug_logging": {
"type": "boolean",
"default": false,
"description": "Whether to enable debug logging for the re-run."
}
}
},
"examples": {
"default": {
"value": null
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/empty-object"
},
"examples": {
"default": {
"value": null
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "actions",
"subcategory": "workflow-runs"
}
}
},
"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": {
"post": {
"summary": "Re-run failed jobs from a workflow run",
"description": "Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/re-run-workflow-failed-jobs",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#re-run-workflow-failed-jobs"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/run-id"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"nullable": true,
"properties": {
"enable_debug_logging": {
"type": "boolean",
"default": false,
"description": "Whether to enable debug logging for the re-run."
}
}
},
"examples": {
"default": {
"value": null
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/empty-object"
},
"examples": {
"default": {
"value": null
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
}
}
},
"/repos/{owner}/{repo}/actions/runs/{run_id}/timing": {
"get": {
"summary": "Get workflow run usage",
"description": "Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see \"[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)\".\n\nAnyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-workflow-run-usage",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-workflow-run-usage"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/run-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/workflow-run-usage"
},
"examples": {
"default": {
"$ref": "#/components/examples/workflow-run-usage"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "actions",
"subcategory": "workflow-runs"
}
}
},
"/repos/{owner}/{repo}/actions/secrets": {
"get": {
"summary": "List repository secrets",
"description": "Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-repo-secrets",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-repository-secrets"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"secrets"
],
"properties": {
"total_count": {
"type": "integer"
},
"secrets": {
"type": "array",
"items": {
"$ref": "#/components/schemas/actions-secret"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/actions-secret-paginated"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
}
}
},
"/repos/{owner}/{repo}/actions/secrets/public-key": {
"get": {
"summary": "Get a repository public key",
"description": "Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-repo-public-key",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-a-repository-public-key"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/actions-public-key"
},
"examples": {
"default": {
"$ref": "#/components/examples/actions-public-key"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
}
}
},
"/repos/{owner}/{repo}/actions/secrets/{secret_name}": {
"get": {
"summary": "Get a repository secret",
"description": "Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-repo-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-a-repository-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/secret-name"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/actions-secret"
},
"examples": {
"default": {
"$ref": "#/components/examples/actions-secret"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
}
},
"put": {
"summary": "Create or update a repository secret",
"description": "Creates or updates a repository secret with an encrypted value. Encrypt your secret using\n[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access\ntoken with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use\nthis endpoint.\n\n#### Example encrypting a secret using Node.js\n\nEncrypt your secret using the [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers) library.\n\n```\nconst sodium = require('libsodium-wrappers')\nconst secret = 'plain-text-secret' // replace with the secret you want to encrypt\nconst key = 'base64-encoded-public-key' // replace with the Base64 encoded public key\n\n//Check if libsodium is ready and then proceed.\nsodium.ready.then(() => {\n // Convert Secret & Base64 key to Uint8Array.\n let binkey = sodium.from_base64(key, sodium.base64_variants.ORIGINAL)\n let binsec = sodium.from_string(secret)\n\n //Encrypt the secret using LibSodium\n let encBytes = sodium.crypto_box_seal(binsec, binkey)\n\n // Convert encrypted Uint8Array to Base64\n let output = sodium.to_base64(encBytes, sodium.base64_variants.ORIGINAL)\n\n console.log(output)\n});\n```\n\n#### Example encrypting a secret using Python\n\nEncrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3.\n\n```\nfrom base64 import b64encode\nfrom nacl import encoding, public\n\ndef encrypt(public_key: str, secret_value: str) -> str:\n \"\"\"Encrypt a Unicode string using the public key.\"\"\"\n public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n sealed_box = public.SealedBox(public_key)\n encrypted = sealed_box.encrypt(secret_value.encode(\"utf-8\"))\n return b64encode(encrypted).decode(\"utf-8\")\n```\n\n#### Example encrypting a secret using C#\n\nEncrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.\n\n```\nvar secretValue = System.Text.Encoding.UTF8.GetBytes(\"mySecret\");\nvar publicKey = Convert.FromBase64String(\"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=\");\n\nvar sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);\n\nConsole.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));\n```\n\n#### Example encrypting a secret using Ruby\n\nEncrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.\n\n```ruby\nrequire \"rbnacl\"\nrequire \"base64\"\n\nkey = Base64.decode64(\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\")\npublic_key = RbNaCl::PublicKey.new(key)\n\nbox = RbNaCl::Boxes::Sealed.from_public_key(public_key)\nencrypted_secret = box.encrypt(\"my_secret\")\n\n# Print the base64 encoded secret\nputs Base64.strict_encode64(encrypted_secret)\n```",
"tags": [
"actions"
],
"operationId": "actions/create-or-update-repo-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#create-or-update-a-repository-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/secret-name"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"encrypted_value": {
"type": "string",
"description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint.",
"pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$"
},
"key_id": {
"type": "string",
"description": "ID of the key you used to encrypt the secret."
}
}
},
"examples": {
"default": {
"value": {
"encrypted_value": "c2VjcmV0",
"key_id": "012345678912345678"
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response when creating a secret",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/empty-object"
},
"examples": {
"default": {
"value": null
}
}
}
}
},
"204": {
"description": "Response when updating a secret"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
}
},
"delete": {
"summary": "Delete a repository secret",
"description": "Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/delete-repo-secret",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#delete-a-repository-secret"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/secret-name"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "secrets"
}
}
},
"/repos/{owner}/{repo}/actions/variables": {
"get": {
"summary": "List repository variables",
"description": "Lists all repository variables. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-repo-variables",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/actions/variables#list-repository-variables"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/variables-per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"variables"
],
"properties": {
"total_count": {
"type": "integer"
},
"variables": {
"type": "array",
"items": {
"$ref": "#/components/schemas/actions-variable"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/actions-variables-paginated"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "variables"
}
},
"post": {
"summary": "Create a repository variable",
"description": "Creates a repository variable that you can reference in a GitHub Actions workflow.\nYou must authenticate using an access token with the `repo` scope to use this endpoint.\nGitHub Apps must have the `actions_variables:write` repository permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/create-repo-variable",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/actions/variables#create-a-repository-variable"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the variable."
},
"value": {
"type": "string",
"description": "The value of the variable."
}
},
"required": [
"name",
"value"
]
},
"examples": {
"default": {
"value": {
"name": "USERNAME",
"value": "octocat"
}
}
}
}
}
},
"responses": {
"201": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/empty-object"
},
"examples": {
"default": {
"value": null
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "variables"
}
}
},
"/repos/{owner}/{repo}/actions/variables/{name}": {
"get": {
"summary": "Get a repository variable",
"description": "Gets a specific variable in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions_variables:read` repository permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-repo-variable",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/actions/variables#get-a-repository-variable"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/variable-name"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/actions-variable"
},
"examples": {
"default": {
"$ref": "#/components/examples/actions-variable"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "variables"
}
},
"patch": {
"summary": "Update a repository variable",
"description": "Updates a repository variable that you can reference in a GitHub Actions workflow.\nYou must authenticate using an access token with the `repo` scope to use this endpoint.\nGitHub Apps must have the `actions_variables:write` repository permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/update-repo-variable",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/actions/variables#update-a-repository-variable"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/variable-name"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the variable."
},
"value": {
"type": "string",
"description": "The value of the variable."
}
}
},
"examples": {
"default": {
"value": {
"name": "USERNAME",
"value": "octocat"
}
}
}
}
}
},
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "variables"
}
},
"delete": {
"summary": "Delete a repository variable",
"description": "Deletes a repository variable using the variable name.\nYou must authenticate using an access token with the `repo` scope to use this endpoint.\nGitHub Apps must have the `actions_variables:write` repository permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/delete-repo-variable",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/actions/variables#delete-a-repository-variable"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/variable-name"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "variables"
}
}
},
"/repos/{owner}/{repo}/actions/workflows": {
"get": {
"summary": "List repository workflows",
"description": "Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/list-repo-workflows",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-repository-workflows"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"workflows"
],
"properties": {
"total_count": {
"type": "integer"
},
"workflows": {
"type": "array",
"items": {
"$ref": "#/components/schemas/workflow"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/workflow-paginated"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflows"
}
}
},
"/repos/{owner}/{repo}/actions/workflows/{workflow_id}": {
"get": {
"summary": "Get a workflow",
"description": "Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-workflow",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-a-workflow"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/workflow-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/workflow"
},
"examples": {
"default": {
"$ref": "#/components/examples/workflow"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflows"
}
}
},
"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": {
"put": {
"summary": "Disable a workflow",
"description": "Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/disable-workflow",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#disable-a-workflow"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/workflow-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflows"
}
}
},
"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": {
"post": {
"summary": "Create a workflow dispatch event",
"description": "You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.\n\nYou must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see \"[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch).\"\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see \"[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line).\"",
"operationId": "actions/create-workflow-dispatch",
"tags": [
"actions"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/workflow-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ref": {
"type": "string",
"description": "The git reference for the workflow. The reference can be a branch or tag name."
},
"inputs": {
"type": "object",
"description": "Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted.",
"additionalProperties": {
"type": "string"
},
"maxProperties": 10
}
},
"required": [
"ref"
]
},
"examples": {
"default": {
"value": {
"ref": "topic-branch",
"inputs": {
"name": "Mona the Octocat",
"home": "San Francisco, CA"
}
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflows"
}
}
},
"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": {
"put": {
"summary": "Enable a workflow",
"description": "Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.\n\nYou must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/enable-workflow",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#enable-a-workflow"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/workflow-id"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflows"
}
}
},
"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": {
"get": {
"summary": "List workflow runs for a workflow",
"description": "List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters).\n\nAnyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope.",
"tags": [
"actions"
],
"operationId": "actions/list-workflow-runs",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#list-workflow-runs"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/workflow-id"
},
{
"$ref": "#/components/parameters/actor"
},
{
"$ref": "#/components/parameters/workflow-run-branch"
},
{
"$ref": "#/components/parameters/event"
},
{
"$ref": "#/components/parameters/workflow-run-status"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/created"
},
{
"$ref": "#/components/parameters/exclude-pull-requests"
},
{
"$ref": "#/components/parameters/workflow-run-check-suite-id"
},
{
"$ref": "#/components/parameters/workflow-run-head-sha"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"total_count",
"workflow_runs"
],
"properties": {
"total_count": {
"type": "integer"
},
"workflow_runs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/workflow-run"
}
}
}
},
"examples": {
"default": {
"$ref": "#/components/examples/workflow-run-paginated"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "actions",
"subcategory": "workflow-runs"
}
}
},
"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": {
"get": {
"summary": "Get workflow usage",
"description": "Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see \"[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)\".\n\nYou can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.",
"tags": [
"actions"
],
"operationId": "actions/get-workflow-usage",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/actions#get-workflow-usage"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/workflow-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/workflow-usage"
},
"examples": {
"default": {
"$ref": "#/components/examples/workflow-usage"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": false,
"category": "actions",
"subcategory": "workflows"
}
}
},
"/repos/{owner}/{repo}/assignees": {
"get": {
"summary": "List assignees",
"description": "Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository.",
"tags": [
"issues"
],
"operationId": "issues/list-assignees",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#list-assignees"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/simple-user"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/simple-user-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "assignees"
}
}
},
"/repos/{owner}/{repo}/assignees/{assignee}": {
"get": {
"summary": "Check if a user can be assigned",
"description": "Checks if a user has permission to be assigned to an issue in this repository.\n\nIf the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned.\n\nOtherwise a `404` status code is returned.",
"tags": [
"issues"
],
"operationId": "issues/check-user-can-be-assigned",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"name": "assignee",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned."
},
"404": {
"description": "Otherwise a `404` status code is returned.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/basic-error"
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "issues",
"subcategory": "assignees"
}
}
},
"/repos/{owner}/{repo}/autolinks": {
"get": {
"summary": "List all autolinks of a repository",
"description": "This returns a list of autolinks configured for the given repository.\n\nInformation about autolinks are only available to repository administrators.",
"tags": [
"repos"
],
"operationId": "repos/list-autolinks",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/v3/repos#list-autolinks"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/autolink"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/autolink-items"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "autolinks"
}
},
"post": {
"summary": "Create an autolink reference for a repository",
"description": "Users with admin access to the repository can create an autolink.",
"tags": [
"repos"
],
"operationId": "repos/create-autolink",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/v3/repos#create-an-autolink"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"key_prefix": {
"type": "string",
"description": "This prefix appended by certain characters will generate a link any time it is found in an issue, pull request, or commit."
},
"url_template": {
"type": "string",
"description": "The URL must contain `<num>` for the reference number. `<num>` matches different characters depending on the value of `is_alphanumeric`."
},
"is_alphanumeric": {
"type": "boolean",
"default": "true",
"description": "Whether this autolink reference matches alphanumeric characters. If true, the `<num>` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters."
}
},
"required": [
"key_prefix",
"url_template"
]
},
"examples": {
"default": {
"value": {
"key_prefix": "TICKET-",
"url_template": "https://example.com/TICKET?query=<num>",
"is_alphanumeric": true
}
}
}
}
}
},
"responses": {
"201": {
"description": "response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/autolink"
},
"examples": {
"default": {
"$ref": "#/components/examples/autolink"
}
}
}
},
"headers": {
"Location": {
"example": "https://api.github.com/repos/octocat/Hello-World/autolinks/1",
"schema": {
"type": "string"
}
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "autolinks"
}
}
},
"/repos/{owner}/{repo}/autolinks/{autolink_id}": {
"get": {
"summary": "Get an autolink reference of a repository",
"description": "This returns a single autolink reference by ID that was configured for the given repository.\n\nInformation about autolinks are only available to repository administrators.",
"tags": [
"repos"
],
"operationId": "repos/get-autolink",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/v3/repos#get-autolink"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/autolink-id"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/autolink"
},
"examples": {
"default": {
"$ref": "#/components/examples/autolink"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "autolinks"
}
},
"delete": {
"summary": "Delete an autolink reference from a repository",
"description": "This deletes a single autolink reference by ID that was configured for the given repository.\n\nInformation about autolinks are only available to repository administrators.",
"tags": [
"repos"
],
"operationId": "repos/delete-autolink",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/v3/repos#delete-autolink"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/autolink-id"
}
],
"responses": {
"204": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": "autolinks"
}
}
},
"/repos/{owner}/{repo}/automated-security-fixes": {
"put": {
"summary": "Enable automated security fixes",
"description": "Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see \"[Configuring automated security fixes](https://docs.github.com/articles/configuring-automated-security-fixes)\".",
"tags": [
"repos"
],
"operationId": "repos/enable-automated-security-fixes",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#enable-automated-security-fixes"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
}
},
"delete": {
"summary": "Disable automated security fixes",
"description": "Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see \"[Configuring automated security fixes](https://docs.github.com/articles/configuring-automated-security-fixes)\".",
"tags": [
"repos"
],
"operationId": "repos/disable-automated-security-fixes",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/reference/repos#disable-automated-security-fixes"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "repos",
"subcategory": null
}
}
},
"/repos/{owner}/{repo}/branches": {
"get": {
"summary": "List branches",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/list-branches",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branches#list-branches"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"name": "protected",
"description": "Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches.",
"in": "query",
"required": false,
"schema": {
"type": "boolean"
}
},
{
"$ref": "#/components/parameters/per-page"
},
{
"$ref": "#/components/parameters/page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/short-branch"
}
},
"examples": {
"default": {
"$ref": "#/components/examples/short-branch-with-protection-items"
}
}
}
},
"headers": {
"Link": {
"$ref": "#/components/headers/link"
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "branches"
}
}
},
"/repos/{owner}/{repo}/branches/{branch}": {
"get": {
"summary": "Get a branch",
"description": "",
"tags": [
"repos"
],
"operationId": "repos/get-branch",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branches#get-a-branch"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/branch"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/branch-with-protection"
},
"examples": {
"default": {
"$ref": "#/components/examples/branch-get"
}
}
}
}
},
"301": {
"$ref": "#/components/responses/moved_permanently"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "branches"
}
}
},
"/repos/{owner}/{repo}/branches/{branch}/protection": {
"get": {
"summary": "Get branch protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/get-branch-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branch-protection#get-branch-protection"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/branch"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/branch-protection"
},
"examples": {
"default": {
"$ref": "#/components/examples/branch-protection"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "branches",
"subcategory": "branch-protection"
}
},
"put": {
"summary": "Update branch protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nProtecting a branch requires admin or owner permissions to the repository.\n\n**Note**: Passing new arrays of `users` and `teams` replaces their previous values.\n\n**Note**: The list of users, apps, and teams in total is limited to 100 items.",
"tags": [
"repos"
],
"operationId": "repos/update-branch-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branch-protection#update-branch-protection"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/branch"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"required_status_checks": {
"type": "object",
"description": "Require status checks to pass before merging. Set to `null` to disable.",
"nullable": true,
"properties": {
"strict": {
"type": "boolean",
"description": "Require branches to be up to date before merging."
},
"contexts": {
"type": "array",
"deprecated": true,
"description": "**Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.\n",
"items": {
"type": "string"
}
},
"checks": {
"type": "array",
"description": "The list of status checks to require in order to merge into this branch.",
"items": {
"type": "object",
"required": [
"context"
],
"properties": {
"context": {
"type": "string",
"description": "The name of the required check"
},
"app_id": {
"type": "integer",
"description": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status."
}
}
}
}
},
"required": [
"strict",
"contexts"
]
},
"enforce_admins": {
"type": "boolean",
"description": "Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable.",
"nullable": true
},
"required_pull_request_reviews": {
"type": "object",
"description": "Require at least one approving review on a pull request, before merging. Set to `null` to disable.",
"nullable": true,
"properties": {
"dismissal_restrictions": {
"type": "object",
"description": "Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.",
"properties": {
"users": {
"type": "array",
"description": "The list of user `login`s with dismissal access",
"items": {
"type": "string"
}
},
"teams": {
"type": "array",
"description": "The list of team `slug`s with dismissal access",
"items": {
"type": "string"
}
},
"apps": {
"type": "array",
"description": "The list of app `slug`s with dismissal access",
"items": {
"type": "string"
}
}
}
},
"dismiss_stale_reviews": {
"type": "boolean",
"description": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit."
},
"require_code_owner_reviews": {
"type": "boolean",
"description": "Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them."
},
"required_approving_review_count": {
"type": "integer",
"description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers."
},
"require_last_push_approval": {
"type": "boolean",
"description": "Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false`.",
"default": false
},
"bypass_pull_request_allowances": {
"type": "object",
"description": "Allow specific users, teams, or apps to bypass pull request requirements.",
"properties": {
"users": {
"type": "array",
"description": "The list of user `login`s allowed to bypass pull request requirements.",
"items": {
"type": "string"
}
},
"teams": {
"type": "array",
"description": "The list of team `slug`s allowed to bypass pull request requirements.",
"items": {
"type": "string"
}
},
"apps": {
"type": "array",
"description": "The list of app `slug`s allowed to bypass pull request requirements.",
"items": {
"type": "string"
}
}
}
}
}
},
"restrictions": {
"type": "object",
"description": "Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable.",
"nullable": true,
"properties": {
"users": {
"type": "array",
"description": "The list of user `login`s with push access",
"items": {
"type": "string"
}
},
"teams": {
"type": "array",
"description": "The list of team `slug`s with push access",
"items": {
"type": "string"
}
},
"apps": {
"type": "array",
"description": "The list of app `slug`s with push access",
"items": {
"type": "string"
}
}
},
"required": [
"users",
"teams"
]
},
"required_linear_history": {
"type": "boolean",
"description": "Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see \"[Requiring a linear commit history](https://docs.github.com/github/administering-a-repository/requiring-a-linear-commit-history)\" in the GitHub Help documentation."
},
"allow_force_pushes": {
"type": "boolean",
"description": "Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see \"[Enabling force pushes to a protected branch](https://docs.github.com/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)\" in the GitHub Help documentation.\"",
"nullable": true
},
"allow_deletions": {
"type": "boolean",
"description": "Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see \"[Enabling force pushes to a protected branch](https://docs.github.com/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)\" in the GitHub Help documentation."
},
"block_creations": {
"type": "boolean",
"description": "If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`."
},
"required_conversation_resolution": {
"type": "boolean",
"description": "Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`."
},
"lock_branch": {
"type": "boolean",
"description": "Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. Default: `false`.",
"default": false
},
"allow_fork_syncing": {
"type": "boolean",
"description": "Whether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing. Default: `false`.",
"default": false
}
},
"required": [
"required_status_checks",
"enforce_admins",
"required_pull_request_reviews",
"restrictions"
]
},
"examples": {
"default": {
"value": {
"required_status_checks": {
"strict": true,
"contexts": [
"continuous-integration/travis-ci"
]
},
"enforce_admins": true,
"required_pull_request_reviews": {
"dismissal_restrictions": {
"users": [
"octocat"
],
"teams": [
"justice-league"
]
},
"dismiss_stale_reviews": true,
"require_code_owner_reviews": true,
"required_approving_review_count": 2,
"require_last_push_approval": true,
"bypass_pull_request_allowances": {
"users": [
"octocat"
],
"teams": [
"justice-league"
]
}
},
"restrictions": {
"users": [
"octocat"
],
"teams": [
"justice-league"
],
"apps": [
"super-ci"
]
},
"required_linear_history": true,
"allow_force_pushes": true,
"allow_deletions": true,
"block_creations": true,
"required_conversation_resolution": true,
"lock_branch": true,
"allow_fork_syncing": true
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/protected-branch"
},
"examples": {
"default": {
"$ref": "#/components/examples/branch-protection-update"
}
}
}
}
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"422": {
"$ref": "#/components/responses/validation_failed_simple"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "branches",
"subcategory": "branch-protection"
}
},
"delete": {
"summary": "Delete branch protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/delete-branch-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branch-protection#delete-branch-protection"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/branch"
}
],
"responses": {
"204": {
"description": "Response"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "branches",
"subcategory": "branch-protection"
}
}
},
"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": {
"get": {
"summary": "Get admin branch protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/get-admin-branch-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branch-protection#get-admin-branch-protection"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/branch"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/protected-branch-admin-enforced"
},
"examples": {
"default": {
"$ref": "#/components/examples/protected-branch-admin-enforced-2"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "branches",
"subcategory": "branch-protection"
}
},
"post": {
"summary": "Set admin branch protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nAdding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.",
"tags": [
"repos"
],
"operationId": "repos/set-admin-branch-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branch-protection#set-admin-branch-protection"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/branch"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/protected-branch-admin-enforced"
},
"examples": {
"default": {
"$ref": "#/components/examples/protected-branch-admin-enforced-2"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "branches",
"subcategory": "branch-protection"
}
},
"delete": {
"summary": "Delete admin branch protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nRemoving admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.",
"tags": [
"repos"
],
"operationId": "repos/delete-admin-branch-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branch-protection#delete-admin-branch-protection"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/branch"
}
],
"responses": {
"204": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "branches",
"subcategory": "branch-protection"
}
}
},
"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": {
"get": {
"summary": "Get pull request review protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/get-pull-request-review-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branch-protection#get-pull-request-review-protection"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/branch"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/protected-branch-pull-request-review"
},
"examples": {
"default": {
"$ref": "#/components/examples/protected-branch-pull-request-review"
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "branches",
"subcategory": "branch-protection"
}
},
"patch": {
"summary": "Update pull request review protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nUpdating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.\n\n**Note**: Passing new arrays of `users` and `teams` replaces their previous values.",
"tags": [
"repos"
],
"operationId": "repos/update-pull-request-review-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branch-protection#update-pull-request-review-protection"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/branch"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"dismissal_restrictions": {
"type": "object",
"description": "Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.",
"properties": {
"users": {
"type": "array",
"description": "The list of user `login`s with dismissal access",
"items": {
"type": "string"
}
},
"teams": {
"type": "array",
"description": "The list of team `slug`s with dismissal access",
"items": {
"type": "string"
}
},
"apps": {
"type": "array",
"description": "The list of app `slug`s with dismissal access",
"items": {
"type": "string"
}
}
}
},
"dismiss_stale_reviews": {
"type": "boolean",
"description": "Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit."
},
"require_code_owner_reviews": {
"type": "boolean",
"description": "Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) have reviewed."
},
"required_approving_review_count": {
"type": "integer",
"description": "Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers."
},
"require_last_push_approval": {
"type": "boolean",
"description": "Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false`",
"default": false
},
"bypass_pull_request_allowances": {
"type": "object",
"description": "Allow specific users, teams, or apps to bypass pull request requirements.",
"properties": {
"users": {
"type": "array",
"description": "The list of user `login`s allowed to bypass pull request requirements.",
"items": {
"type": "string"
}
},
"teams": {
"type": "array",
"description": "The list of team `slug`s allowed to bypass pull request requirements.",
"items": {
"type": "string"
}
},
"apps": {
"type": "array",
"description": "The list of app `slug`s allowed to bypass pull request requirements.",
"items": {
"type": "string"
}
}
}
}
}
},
"examples": {
"default": {
"value": {
"dismissal_restrictions": {
"users": [
"octocat"
],
"teams": [
"justice-league"
],
"apps": [
"octoapp"
]
},
"bypass_pull_request_allowances": {
"users": [
"octocat"
],
"teams": [
"justice-league"
],
"apps": [
"octoapp"
]
},
"dismiss_stale_reviews": true,
"require_code_owner_reviews": true,
"required_approving_review_count": 2,
"require_last_push_approval": true
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/protected-branch-pull-request-review"
},
"examples": {
"default": {
"$ref": "#/components/examples/protected-branch-pull-request-review"
}
}
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "branches",
"subcategory": "branch-protection"
}
},
"delete": {
"summary": "Delete pull request review protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/delete-pull-request-review-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branch-protection#delete-pull-request-review-protection"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/branch"
}
],
"responses": {
"204": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "branches",
"subcategory": "branch-protection"
}
}
},
"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": {
"get": {
"summary": "Get commit signature protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nWhen authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help.\n\n**Note**: You must enable branch protection to require signed commits.",
"tags": [
"repos"
],
"operationId": "repos/get-commit-signature-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branch-protection#get-commit-signature-protection"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/branch"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/protected-branch-admin-enforced"
},
"examples": {
"default": {
"$ref": "#/components/examples/protected-branch-admin-enforced"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "branches",
"subcategory": "branch-protection"
}
},
"post": {
"summary": "Create commit signature protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nWhen authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits.",
"tags": [
"repos"
],
"operationId": "repos/create-commit-signature-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branch-protection#create-commit-signature-protection"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/branch"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/protected-branch-admin-enforced"
},
"examples": {
"default": {
"$ref": "#/components/examples/protected-branch-admin-enforced"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "branches",
"subcategory": "branch-protection"
}
},
"delete": {
"summary": "Delete commit signature protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nWhen authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits.",
"tags": [
"repos"
],
"operationId": "repos/delete-commit-signature-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branch-protection#delete-commit-signature-protection"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/branch"
}
],
"responses": {
"204": {
"description": "Response"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "branches",
"subcategory": "branch-protection"
}
}
},
"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": {
"get": {
"summary": "Get status checks protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/get-status-checks-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branch-protection#get-status-checks-protection"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/branch"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/status-check-policy"
},
"examples": {
"default": {
"$ref": "#/components/examples/status-check-policy"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "branches",
"subcategory": "branch-protection"
}
},
"patch": {
"summary": "Update status check protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nUpdating required status checks requires admin or owner permissions to the repository and branch protection to be enabled.",
"tags": [
"repos"
],
"operationId": "repos/update-status-check-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branch-protection#update-status-check-protection"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/branch"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"strict": {
"type": "boolean",
"description": "Require branches to be up to date before merging."
},
"contexts": {
"type": "array",
"deprecated": true,
"description": "**Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control.\n",
"items": {
"type": "string"
}
},
"checks": {
"type": "array",
"description": "The list of status checks to require in order to merge into this branch.",
"items": {
"type": "object",
"required": [
"context"
],
"properties": {
"context": {
"type": "string",
"description": "The name of the required check"
},
"app_id": {
"type": "integer",
"description": "The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status."
}
}
}
}
}
},
"examples": {
"default": {
"value": {
"strict": true,
"contexts": [
"continuous-integration/travis-ci"
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/status-check-policy"
},
"examples": {
"default": {
"$ref": "#/components/examples/status-check-policy"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "branches",
"subcategory": "branch-protection"
}
},
"delete": {
"summary": "Remove status check protection",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/remove-status-check-protection",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branch-protection#remove-status-check-protection"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/branch"
}
],
"responses": {
"204": {
"description": "Response"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "branches",
"subcategory": "branch-protection"
}
}
},
"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": {
"get": {
"summary": "Get all status check contexts",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/get-all-status-check-contexts",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branch-protection#get-all-status-check-contexts"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/branch"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"examples": {
"default": {
"value": [
"continuous-integration/travis-ci"
]
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"category": "branches",
"subcategory": "branch-protection"
}
},
"post": {
"summary": "Add status check contexts",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/add-status-check-contexts",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branch-protection#add-status-check-contexts"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/branch"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"contexts": {
"type": "array",
"description": "The name of the status checks",
"items": {
"type": "string"
}
}
},
"required": [
"contexts"
],
"example": {
"contexts": [
"contexts"
]
}
},
{
"type": "array",
"description": "The name of the status checks",
"items": {
"type": "string"
}
}
]
},
"examples": {
"default": {
"summary": "Example adding status checks to a branch protection rule",
"value": {
"contexts": [
"continuous-integration/travis-ci",
"continuous-integration/jenkins"
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"examples": {
"default": {
"value": [
"continuous-integration/travis-ci",
"continuous-integration/jenkins"
]
}
}
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"requestBodyParameterName": "contexts",
"category": "branches",
"subcategory": "branch-protection"
}
},
"put": {
"summary": "Set status check contexts",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/set-status-check-contexts",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branch-protection#set-status-check-contexts"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/branch"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"contexts": {
"type": "array",
"description": "The name of the status checks",
"items": {
"type": "string"
}
}
},
"required": [
"contexts"
],
"example": {
"contexts": [
"contexts"
]
}
},
{
"type": "array",
"description": "The name of the status checks",
"items": {
"type": "string"
}
}
]
},
"examples": {
"default": {
"summary": "Example updating status checks for a branch protection rule",
"value": {
"contexts": [
"continuous-integration/travis-ci"
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"examples": {
"default": {
"value": [
"continuous-integration/travis-ci"
]
}
}
}
}
},
"422": {
"$ref": "#/components/responses/validation_failed"
},
"404": {
"$ref": "#/components/responses/not_found"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"requestBodyParameterName": "contexts",
"category": "branches",
"subcategory": "branch-protection"
}
},
"delete": {
"summary": "Remove status check contexts",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
"tags": [
"repos"
],
"operationId": "repos/remove-status-check-contexts",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/rest/branches/branch-protection#remove-status-check-contexts"
},
"parameters": [
{
"$ref": "#/components/parameters/owner"
},
{
"$ref": "#/components/parameters/repo"
},
{
"$ref": "#/components/parameters/branch"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"contexts": {
"type": "array",
"description": "The name of the status checks",
"items": {
"type": "string"
}
}
},
"required": [
"contexts"
],
"example": {
"contexts": [
"contexts"
]
}
},
{
"type": "array",
"description": "The name of the status checks",
"items": {
"type": "string"
}
}
]
},
"examples": {
"default": {
"summary": "Example removing status checks from a branch protection rule",
"value": {
"contexts": [
"continuous-integration/travis-ci"
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"examples": {
"default": {
"value": [
"continuous-integration/travis-ci"
]
}
}
}
}
},
"404": {
"$ref": "#/components/responses/not_found"
},
"422": {
"$ref": "#/components/responses/validation_failed"
}
},
"x-github": {
"githubCloudOnly": false,
"enabledForGitHubApps": true,
"requestBodyParameterName": "contexts",
"category": "branches",
"subcategory": "branch-protection"
}
}
},
"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions": {
"get": {
"summary": "Get access restrictions",
"description": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories wit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment