{ "opencollection": "1.0.0", "info": { "name": "Github Deployments API", "version": "1.1.4" }, "items": [ { "info": { "name": "Deployments", "type": "folder" }, "items": [ { "info": { "name": "GitHub Get Pending Deployments for Workflow Run", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/repos/:owner/:repo/actions/runs/:run_id/pending_deployments", "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": "run_id", "value": "", "type": "path", "description": "The unique identifier of the workflow run." } ] }, "docs": "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.\n\nIf the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint." }, { "info": { "name": "GitHub Review Pending Deployments for Workflow Run", "type": "http" }, "http": { "method": "POST", "url": "{protocol}://{hostname}/repos/:owner/:repo/actions/runs/:run_id/pending_deployments", "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": "run_id", "value": "", "type": "path", "description": "The unique identifier of the workflow run." } ], "body": { "type": "json", "data": "{}" } }, "docs": "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.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint." }, { "info": { "name": "GitHub List Deployments", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/repos/:owner/:repo/deployments", "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": "sha", "value": "abc123def456789012345678901234567890", "type": "query", "description": "The SHA recorded at creation time." }, { "name": "ref", "value": "main", "type": "query", "description": "The name of the ref. This can be a branch, tag, or SHA." }, { "name": "task", "value": "example_value", "type": "query", "description": "The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`)." }, { "name": "environment", "value": "example_value", "type": "query", "description": "The name of the environment that was deployed to (e.g., `staging` or `production`)." }, { "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": "Simple filtering of deployments is available via query parameters:" }, { "info": { "name": "GitHub Create Deployment", "type": "http" }, "http": { "method": "POST", "url": "{protocol}://{hostname}/repos/:owner/:repo/deployments", "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": "Deployments offer a few configurable parameters with certain defaults.\n\nThe `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.\n\nThe `environment` parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter\nmakes it easier to track which environment" }, { "info": { "name": "GitHub Get Deployment", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/repos/:owner/:repo/deployments/:deployment_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": "deployment_id", "value": "", "type": "path", "description": "deployment_id parameter" } ] }, "docs": "This API operation retrieves detailed information about a specific deployment in a GitHub repository. By providing the repository owner, repository name, and deployment ID in the endpoint path, users can fetch comprehensive metadata about a particular deployment including its state, environment, description, creator information, and associated references. This is useful for tracking deployment history, monitoring deployment status, and integrating deployment information into CI/CD pipelines or c" }, { "info": { "name": "GitHub Delete Deployment", "type": "http" }, "http": { "method": "DELETE", "url": "{protocol}://{hostname}/repos/:owner/:repo/deployments/:deployment_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": "deployment_id", "value": "", "type": "path", "description": "deployment_id parameter" } ] }, "docs": "If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment.\n\nTo set a deployment as inactive, you must:\n\n* Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment.\n* Mark the active deploym" }, { "info": { "name": "GitHub List Deployment Statuses", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/repos/:owner/:repo/deployments/:deployment_id/statuses", "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": "deployment_id", "value": "", "type": "path", "description": "deployment_id parameter" }, { "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": "Users with pull access can view deployment statuses for a deployment:" }, { "info": { "name": "GitHub Create Deployment Status", "type": "http" }, "http": { "method": "POST", "url": "{protocol}://{hostname}/repos/:owner/:repo/deployments/:deployment_id/statuses", "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": "deployment_id", "value": "", "type": "path", "description": "deployment_id parameter" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Users with `push` access can create deployment statuses for a given deployment.\n\nOAuth app tokens and personal access tokens (classic) need the `repo_deployment` scope to use this endpoint." }, { "info": { "name": "GitHub Get Deployment Status", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/repos/:owner/:repo/deployments/:deployment_id/statuses/:status_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": "deployment_id", "value": "", "type": "path", "description": "deployment_id parameter" }, { "name": "status_id", "value": "42", "type": "path" } ] }, "docs": "Users with pull access can view a deployment status for a deployment:" }, { "info": { "name": "GitHub List Deployment Branch Policies", "type": "http" }, "http": { "method": "GET", "url": "{protocol}://{hostname}/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}/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}/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}/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}/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 Create Github Pages Deployment", "type": "http" }, "http": { "method": "POST", "url": "{protocol}://{hostname}/repos/:owner/:repo/pages/deployments", "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": "Create a GitHub Pages deployment for a repository.\n\nThe authenticated user must have write permission to the repository." } ] } ], "bundled": true }