{ "opencollection": "1.0.0", "info": { "name": "Github Branches API", "version": "1.1.4" }, "items": [ { "info": { "name": "Branches", "type": "folder" }, "items": [ { "info": { "name": "GitHub Get Apps with Access to the Protected Branch", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/branches/:branch/protection/restrictions/apps", "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." }, { "name": "branch", "value": "", "type": "path", "description": "The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/enterprise-server@3.9/graphql)." } ] }, "docs": "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/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nLists the GitHub Apps that have push access to this branch. Only GitHub Apps that are in" }, { "info": { "name": "GitHub Get Branch", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/branches/:branch", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." }, { "name": "branch", "value": "", "type": "path", "description": "The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/enterprise-server@3.9/graphql)." } ] }, "docs": "The Get Branch endpoint retrieves detailed information about a specific branch in a GitHub repository. By making a GET request to /repos/{owner}/{repo}/branches/{branch}, you can access comprehensive data about the branch including its name, commit SHA, protection status, and associated metadata. This operation requires you to provide the repository owner's username, the repository name, and the specific branch name as path parameters. The response includes the branch's latest commit information" }, { "info": { "name": "GitHub Get Branch Protection", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/branches/:branch/protection", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." }, { "name": "branch", "value": "", "type": "path", "description": "The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/enterprise-server@3.9/graphql)." } ] }, "docs": "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/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation." }, { "info": { "name": "GitHub Update Branch Protection", "type": "http" }, "http": { "method": "PUT", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/branches/:branch/protection", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." }, { "name": "branch", "value": "", "type": "path", "description": "The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/enterprise-server@3.9/graphql)." } ], "body": { "type": "json", "data": "{}" } }, "docs": "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/enterprise-server@3.9/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**: Pa" }, { "info": { "name": "GitHub Delete Branch Protection", "type": "http" }, "http": { "method": "DELETE", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/branches/:branch/protection", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." }, { "name": "branch", "value": "", "type": "path", "description": "The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/enterprise-server@3.9/graphql)." } ] }, "docs": "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/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation." }, { "info": { "name": "GitHub Get Admin Branch Protection", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/branches/:branch/protection/enforce_admins", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." }, { "name": "branch", "value": "", "type": "path", "description": "The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/enterprise-server@3.9/graphql)." } ] }, "docs": "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/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation." }, { "info": { "name": "GitHub Set Admin Branch Protection", "type": "http" }, "http": { "method": "POST", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/branches/:branch/protection/enforce_admins", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." }, { "name": "branch", "value": "", "type": "path", "description": "The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/enterprise-server@3.9/graphql)." } ] }, "docs": "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/enterprise-server@3.9/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 branc" }, { "info": { "name": "GitHub Delete Admin Branch Protection", "type": "http" }, "http": { "method": "DELETE", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/branches/:branch/protection/enforce_admins", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." }, { "name": "branch", "value": "", "type": "path", "description": "The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/enterprise-server@3.9/graphql)." } ] }, "docs": "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/enterprise-server@3.9/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 bra" }, { "info": { "name": "GitHub Get Teams with Access to the Protected Branch", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/branches/:branch/protection/restrictions/teams", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." }, { "name": "branch", "value": "", "type": "path", "description": "The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/enterprise-server@3.9/graphql)." } ] }, "docs": "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/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nLists the teams who have push access to this branch. The list includes child teams." }, { "info": { "name": "GitHub Get Users with Access to the Protected Branch", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/branches/:branch/protection/restrictions/users", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." }, { "name": "branch", "value": "", "type": "path", "description": "The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/enterprise-server@3.9/graphql)." } ] }, "docs": "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/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nLists the people who have push access to this branch." }, { "info": { "name": "GitHub Rename Branch", "type": "http" }, "http": { "method": "POST", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/branches/:branch/rename", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." }, { "name": "branch", "value": "", "type": "path", "description": "The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/enterprise-server@3.9/graphql)." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Renames a branch in a repository.\n\n**Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see \"[Renaming a branch](https://docs.github.com/enterprise-server@3.9/github/administering-a-repository/renaming-a-branch)\".\n\nThe authenticated user must have push access to the branch. If the branch is the default bran" }, { "info": { "name": "GitHub Update Pull Request Branch", "type": "http" }, "http": { "method": "PUT", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/pulls/:pull_number/update-branch", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." }, { "name": "pull_number", "value": "", "type": "path", "description": "The number that identifies the pull request." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch." }, { "info": { "name": "GitHub List Branches for Head Commit", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/commits/:commit_sha/branches-where-head", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." }, { "name": "commit_sha", "value": "", "type": "path", "description": "The SHA of the commit." } ] }, "docs": "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/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nReturns all branches where the given commit SHA is the HEAD, or latest commit for the br" }, { "info": { "name": "GitHub List Deployment Branch Policies", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/environments/:environment_name/deployment-branch-policies", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." }, { "name": "environment_name", "value": "", "type": "path", "description": "The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with `%2F`." }, { "name": "per_page", "value": "", "type": "query", "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"" }, { "name": "page", "value": "", "type": "query", "description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"" } ] }, "docs": "Lists the deployment branch policies for an environment.\n\nAnyone with read access to the repository can use this endpoint.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository." }, { "info": { "name": "GitHub Create Deployment Branch Policy", "type": "http" }, "http": { "method": "POST", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/environments/:environment_name/deployment-branch-policies", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." }, { "name": "environment_name", "value": "", "type": "path", "description": "The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with `%2F`." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Creates a deployment branch policy for an environment. OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint." }, { "info": { "name": "GitHub Get Deployment Branch Policy", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/environments/:environment_name/deployment-branch-policies/:branch_policy_id", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." }, { "name": "environment_name", "value": "", "type": "path", "description": "The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with `%2F`." }, { "name": "branch_policy_id", "value": "", "type": "path", "description": "The unique identifier of the branch policy." } ] }, "docs": "Gets a deployment branch policy for an environment.\n\nAnyone with read access to the repository can use this endpoint.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository." }, { "info": { "name": "GitHub Update Deployment Branch Policy", "type": "http" }, "http": { "method": "PUT", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/environments/:environment_name/deployment-branch-policies/:branch_policy_id", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." }, { "name": "environment_name", "value": "", "type": "path", "description": "The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with `%2F`." }, { "name": "branch_policy_id", "value": "", "type": "path", "description": "The unique identifier of the branch policy." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Updates a deployment branch policy for an environment.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint." }, { "info": { "name": "GitHub Delete Deployment Branch Policy", "type": "http" }, "http": { "method": "DELETE", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/environments/:environment_name/deployment-branch-policies/:branch_policy_id", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." }, { "name": "environment_name", "value": "", "type": "path", "description": "The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with `%2F`." }, { "name": "branch_policy_id", "value": "", "type": "path", "description": "The unique identifier of the branch policy." } ] }, "docs": "Deletes a deployment branch policy for an environment.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint." }, { "info": { "name": "GitHub Sync Fork Branch with the Upstream Repository", "type": "http" }, "http": { "method": "POST", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/merge-upstream", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Sync a branch of a forked repository to keep it up-to-date with the upstream repository." }, { "info": { "name": "GitHub Merge Branch", "type": "http" }, "http": { "method": "POST", "url": "{protocol}://{hostname}/api/v3/repos/:owner/:repo/merges", "headers": [ { "name": "Authorization", "value": "example_value" }, { "name": "X-GitHub-Api-Version", "value": "example_value" }, { "name": "Accept", "value": "example_value" } ], "params": [ { "name": "owner", "value": "", "type": "path", "description": "The account owner of the repository. The name is not case sensitive." }, { "name": "repo", "value": "", "type": "path", "description": "The name of the repository without the `.git` extension. The name is not case sensitive." } ], "body": { "type": "json", "data": "{}" } }, "docs": "The GitHub Repos API merge branch endpoint allows you to perform a repository merge by making a POST request to /repos/{owner}/{repo}/merges. This operation merges a specified branch (the head) into another branch (the base) within the same repository. You must provide the base branch name, head branch name or SHA, and optionally a commit message in the request body. The merge will be performed automatically if there are no conflicts, and the API returns the resulting commit object upon success." } ] } ], "bundled": true }