openapi: 3.2.0
info:
title: Github Update API
version: 1.1.4
license:
name: MIT
url: https://spdx.org/licenses/MIT
termsOfService: https://docs.github.com/articles/github-terms-of-service
description: 'Operations tagged Update across 16 of this provider''s published API definitions: github-app-api-openapi.yml, github-auth-api-openapi.yml, github-gists-openapi.yml, github-organizations-openapi.yml, github-projects-openapi.yml, github-repo-actions-api-openapi.yml, github-repo-branches-api-openapi.yml, github-repo-code-scanning-api-openapi.yml, github-repo-dependabot-api-openapi.yml, github-repo-hooks-api-openapi.yml, github-repo-invitations-api-openapi.yml, github-repo-issues-api-openapi.yml, github-repo-pulls-api-openapi.yml, github-repo-tags-api-openapi.yml, github-scim-openapi.yml, github-teams-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: '{protocol}://{hostname}/api/v3'
variables:
hostname:
description: Self-hosted Enterprise Server hostname
default: HOSTNAME
protocol:
description: Self-hosted Enterprise Server protocol
default: http
- url: '{protocol}://{hostname}'
variables:
hostname:
description: Self-hosted Enterprise Server hostname
default: api.github.com
protocol:
description: Self-hosted Enterprise Server protocol
default: https
tags:
- name: Update
paths:
/app/hook/config:
patch:
summary: GitHub Updatewebhook 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)."
You must use a [JWT](https://docs.github.com/enterprise-server@3.9/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.'
tags:
- Update
operationId: updatewebhookConfigurationForAnApp
externalDocs:
description: API method documentation
url: https://docs.github.com/enterprise-server@3.9/rest/apps/webhooks#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
security:
- bearerHttpAuthentication: []
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
servers:
- url: '{protocol}://{hostname}/api/v3'
variables:
hostname:
description: Self-hosted Enterprise Server hostname
default: HOSTNAME
protocol:
description: Self-hosted Enterprise Server protocol
default: http
/authorizations/{authorization_id}:
patch:
summary: GitHub Update an Existing Authorization
description: '**Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.9/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/enterprise-server@3.9/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."
You can only send one of these scope keys at a time.'
tags:
- Update
operationId: updateAnExistingAuthorization
externalDocs:
description: API method documentation
url: https://docs.github.com/enterprise-server@3.9/rest/oauth-authorizations/oauth-authorizations#update-an-existing-authorization
parameters:
- $ref: '#/components/parameters/authorization-id'
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
scopes:
description: A list of scopes that this authorization is in.
type:
- array
- 'null'
items:
type: string
example:
- public_repo
- user
add_scopes:
description: A list of scopes to add to this authorization.
type: array
items:
type: string
remove_scopes:
description: A list of scopes to remove from this authorization.
type: array
items:
type: string
note:
description: A note to remind you what the OAuth token is for.
type: string
example: Update all gems
note_url:
description: A URL to remind you what app the OAuth token is for.
type: string
fingerprint:
description: A unique string to distinguish an authorization from others created for the same client ID and user.
type: string
examples:
default:
summary: Example of updating scopes and note
value:
add_scopes:
- public_repo
remove_scopes:
- user
note: optional note
responses:
'200':
description: Response
content:
application/json:
schema:
$ref: '#/components/schemas/authorization'
examples:
default:
$ref: '#/components/examples/authorization-2'
'422':
$ref: '#/components/responses/validation_failed'
x-github:
githubCloudOnly: false
enabledForGitHubApps: false
removalDate: '2020-11-13'
deprecationDate: '2020-02-14'
category: oauth-authorizations
subcategory: oauth-authorizations
deprecated: true
security:
- bearerHttpAuthentication: []
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
servers:
- url: '{protocol}://{hostname}/api/v3'
variables:
hostname:
description: Self-hosted Enterprise Server hostname
default: api.github.com
protocol:
description: Self-hosted Enterprise Server protocol
default: https
/gists/{gist_id}:
patch:
summary: GitHub Updategist
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.
At least one of `description` or `files` is required.
This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."
- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.
- **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences.'
tags:
- Update
operationId: updategist
externalDocs:
description: API method documentation
url: https://docs.github.com/enterprise-server@3.9/rest/gists/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
(including extension) of the targeted gist file. For example: `hello.py`.
To delete a file, set the whole file to null. For example: `hello.py : null`. The file will also be
deleted if the specified object does not contain at least one of `content` or `filename`.'
example:
hello.rb:
content: blah
filename: goodbye.rb
type: object
additionalProperties:
type:
- object
- 'null'
properties:
content:
description: The new content of the file.
type: string
filename:
description: The new filename for the file.
type:
- string
- 'null'
type:
- object
- 'null'
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'
'404':
$ref: '#/components/responses/not_found'
'422':
$ref: '#/components/responses/validation_failed'
x-github:
githubCloudOnly: false
enabledForGitHubApps: false
category: gists
subcategory: gists
security:
- bearerHttpAuthentication: []
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
servers:
- url: '{protocol}://{hostname}/api/v3'
variables:
hostname:
description: Self-hosted Enterprise Server hostname
default: HOSTNAME
protocol:
description: Self-hosted Enterprise Server protocol
default: http
/gists/{gist_id}/comments/{comment_id}:
patch:
summary: GitHub Updategist Comment
description: 'Updates a comment on a gist.
This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."
- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.
- **`application/vnd.github.base64+json`**: Returns the base64-encoded contents. This can be useful if your gist contains any invalid UTF-8 sequences.'
tags:
- Update
operationId: updategistComment
externalDocs:
description: API method documentation
url: https://docs.github.com/enterprise-server@3.9/rest/gists/comments#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
security:
- bearerHttpAuthentication: []
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
servers:
- url: '{protocol}://{hostname}/api/v3'
variables:
hostname:
description: Self-hosted Enterprise Server hostname
default: HOSTNAME
protocol:
description: Self-hosted Enterprise Server protocol
default: http
/orgs/{org}:
patch:
summary: GitHub Update an Organization
description: '**Parameter Deprecation Notice:** GitHub Enterprise Server 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).
Updates the organization''s profile and member privileges.
The authenticated user must be an organization owner to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint.'
tags:
- Update
operationId: updateAnOrganization
externalDocs:
description: API method documentation
url: https://docs.github.com/enterprise-server@3.9/rest/orgs/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/enterprise-server@3.9/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/enterprise-server@3.9/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/enterprise-server@3.9/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. \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_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.
To 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/enterprise-server@3.9/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."
You 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.
To 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/enterprise-server@3.9/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."
You 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.
To 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/enterprise-server@3.9/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."
You 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.
To 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/enterprise-server@3.9/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."
You 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.
To 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/enterprise-server@3.9/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."
You 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.
To 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/enterprise-server@3.9/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."
You 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'
'409':
$ref: '#/components/responses/conflict'
'422':
description: Validation failed
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/validation-error'
- $ref: '#/components/schemas/validation-error-simple'
x-github:
githubCloudOnly: false
enabledForGitHubApps: true
category: orgs
subcategory: orgs
security:
- bearerHttpAuthentication: []
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
servers:
- url: '{protocol}://{hostname}/api/v3'
variables:
hostname:
description: Self-hosted Enterprise Server hostname
default: HOSTNAME
protocol:
description: Self-hosted Enterprise Server protocol
default: http
/orgs/{org}/actions/runner-groups/{runner_group_id}:
patch:
summary: GitHub Update Self-hosted Runner Group for an Organization
description: 'Updates the `name` and `visibility` of a self-hosted runner group in an organization.
OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.'
operationId: updateSelfhostedRunnerGroupForAnOrganization
tags:
- Update
externalDocs:
description: API method documentation
url: https://docs.github.com/enterprise-server@3.9/rest/actions/self-hosted-runner-groups#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: true
category: actions
subcategory: self-hosted-runner-groups
security:
- bearerHttpAuthentication: []
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
servers:
- url: '{protocol}://{hostname}/api/v3'
variables:
hostname:
description: Self-hosted Enterprise Server hostname
default: HOSTNAME
protocol:
description: Self-hosted Enterprise Server protocol
default: http
/orgs/{org}/actions/secrets/{secret_name}:
put:
summary: GitHub Create or Update an Organization Secret
description: 'Creates or updates an organization secret with an encrypted value. Encrypt your secret using
[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/enterprise-server@3.9/rest/guides/encrypting-secrets-for-the-rest-api)."
Authenticated users must have collaborator access to a repository to create, update, or read secrets.
OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
tags:
- Update
# --- truncated at 32 KB (771 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/openapi/github-update-api-openapi.yml