Update a deployment

Edits a deployment request's details and test settings, or submits a draft.

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

Updates a deployment request as the user who owns the API Client. That user needs permission to create deployments into the target branch.

Send only the fields you want to change; a field that is left out keeps its value. List fields (labels, jiraIssues, specifiedTests, testSuites) are replaced as a whole. Unknown fields are rejected with 400.

Returns the updated deployment, in the same shape as Get a deployment by number.

Submitting a draft

"draft": false submits a draft: it gets a merge request, and packaging and validation against the target org start. A deployment that is submitted with RUN_SPECIFIED_TESTS must name at least one test class or test suite; a draft may leave them for later.

Test settings

Changing testLevel, specifiedTests or testSuites re-runs validation. It is refused while the deployment is deploying, and once it is approved under a branch rule that blocks changes after approval. Details (title, description, labels, jiraIssues) can be edited at any time except while it is deploying.

Concurrent edits

Every change raises the deployment's systemVersion. Send the value you last read as systemVersion to have the update refused with 409 when someone else changed the deployment in the meantime.

To change the content of a file in a deployment, see Set a file override.

Path Params
int32
required

The numeric identifier of the Deployment Request.

Body Params
string

New title. Must not be blank.

string

New description, in Markdown.

labels
array of strings

Replaces all labels.

labels
jiraIssues
array of strings

Replaces all linked Jira issue keys, e.g. PROJ-123.

jiraIssues
string

One of RUN_DEFAULT, NO_TEST_RUN, RUN_LOCAL_TESTS, RUN_ALL_TESTS_IN_ORG, RUN_SPECIFIED_TESTS.

specifiedTests
array of strings

Replaces the Apex test classes run with RUN_SPECIFIED_TESTS.

specifiedTests
testSuites
array of strings

Replaces the Apex test suites run with RUN_SPECIFIED_TESTS.

testSuites
boolean

Only false is accepted: it submits a draft. A submitted deployment cannot become a draft again.

int32

The systemVersion you last read. The update is refused with 409 if the deployment changed since.

Responses

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