GET
/repos/{owner}/{repo}/deployments/{deployment_id}Get a deployment
Retrieves a deployment for a repository by its numeric identifier. Use owner, repo, and deployment_id to identify the repository and deployment to retrieve. The response contains the deployment reference, environment, creator, payload, status links, and timestamps.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
ownerstringrequired
The account owner of the repository; the name is not case sensitive.
repostringrequired
The repository name without the `.git` extension; the name is not case sensitive.
deployment_idintegerrequired
The numeric identifier of the deployment to retrieve.
200Returns the deployment object with its identifier, commit SHA, reference, task, environment, creator, payload, status URL, repository URL, and timestamps.
urlstringrequired
idintegerrequired
Unique identifier of the deployment
node_idstringrequired
shastringrequired
refstringrequired
The ref to deploy. This can be a branch, tag, or sha.
taskstringrequired
Parameter to specify a task to execute
payloadobjectrequired
original_environmentstringoptional
environmentstringrequired
Name for the target deployment environment.
descriptionstringrequired
creatorobjectrequired
A GitHub user.
created_atstringrequired
updated_atstringrequired
statuses_urlstringrequired
repository_urlstringrequired
transient_environmentbooleanoptional
Specifies if the given environment is will no longer exist at some point in the future. Default: false.
production_environmentbooleanoptional
Specifies if the given environment is one that end-users directly interact with. Default: false.
performed_via_github_appobjectoptional
GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub.
404Returned when the repository or deployment does not exist.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
Error handling
A 404 is returned when the repository or deployment identified by owner, repo, and deployment_id cannot be found. repo must omit the .git extension, and deployment_id must identify the requested deployment.