Get a deployment by number

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Returns the current state of a deployment request.

Response fields

FieldDescription
deploymentNumberThe number shown in the app, as in DR-154.
typeSTORY deploys a set of files. RELEASE bundles the files of other stories. CHECKLIST carries manual steps in its description and deploys no files. PERMISSIONS deploys profile and permission set changes. PULL_REQUEST is created from an external pull request.
phaseWhere the request is in its lifecycle. See Phases.
stateWhether the current phase is in progress, waiting on a user, or has failed. See States.
sourceBranchName, sourceCommitThe source branch and the commit of it the request's content was taken from.
targetBranchName, targetCommitThe target branch and the commit of it the request was built against. targetCommit is pinned when the request is created and moves when the request is updated to a newer target.
deploymentBranchName, mergeCommitThe branch holding the built deployment artifact, and its head commit: targetCommit plus the request's content. mergeCommit is null until the build has run, and is rebuilt (so its value changes) whenever the request's content or target changes, for example when an out-of-date request is updated. The diff reviewed in the app, and the default anchor for inline comments, is targetCommit..mergeCommit.
testLevel, specifiedTests, test_suitesThe Salesforce test level and the tests or suites to run.
filesRepository paths of the files included in the request.
labelsLabel names.
creatorThe user who created the request.
reviewCount, reviewsReviews, each with an approval_state of POSITIVE, NEUTRAL or NEGATIVE.
linkedWorkItemsWork items linked to the request: the Jira keys on it and the items linked through an integration (Azure DevOps, ServiceNow). Each has the item's id in its tracker, its source (JIRA, AZURE_DEVOPS or SERVICENOW) and, when they can be resolved, its url and title. Azure DevOps items are looked up on the tracker; Jira items get a url built from the Jira site but no title; ServiceNow items carry only id and source. A tracker that cannot be reached leaves url and title null rather than failing the request. The same list is included in every deployments/* webhook payload, without the tracker lookup.

Phases

Phases are sequential: an earlier phase must succeed before the request moves to the next.

PhaseMeaning
DRAFTSaved for later editing. Inert, and has no discussion or diff.
NEWJust created; the backing discussion and branch are being provisioned.
PERMISSIONSWorking out the profile and permission set changes that apply to the target org.
PACKAGEBuilding the deployment branch and package. mergeCommit is set when this phase succeeds.
WAITINGBuilt and ready to validate, waiting for another validation or deployment to finish.
VALIDATERunning a check-only deployment against the target org.
CHECKValidation passed; waiting on checks that are still running or have failed.
READY_TO_DEPLOYValidation and all checks passed. Waiting for a user to deploy.
QUEUEDDeployment requested, waiting for another deployment to finish.
APPLYDeploying to the target org.
DONEDeployed. Complete requests are immutable.

A request only reaches READY_TO_DEPLOY once validation and every check have passed. A request whose validation succeeded but that has a failing or pending check stays in CHECK. To act on the validation result itself, subscribe to the deployments/validated webhook.

Updating a request (new content, a newer target) sends it back through PACKAGE and VALIDATE.

States

StateMeaning
WORKINGThe system is busy with the current phase.
READYWaiting on a user, for example to deploy a validated request.
PROBLEMThe phase finished but found a problem that a user has to look at: a failed validation, a failed check, or a permissions problem.
INTERNAL_ERRORThe build or the deployment failed or was cancelled.
Path Params
int32
required
Responses

Language
Credentials
OAuth2
LoadingLoading…
Response
Choose an example:
application/json