Start a waiting deployment
Starts a deployment that waits to be deployed (status 6, Pending), as an environment whose git_deploys is manual leaves each push, from its pipeline as it is now or the one pipeline_id names. Your role needs the Deploy Deployments permission; a CoreStack or CoreCluster site deploys from the site instead.
- Needs
deployas well: Always.
Path parameters
The id of a CoreStack Enterprise environment. Not the same number as a site row id. At least 1.
The id of a deployment of the environment. A deployment of another environment is not found. At least 1.
Headers
A UUID you choose, to make the request safe to repeat. Only the endpoints that list this header read it; each says what a repeated key answers. Format: uuid.
Body
The attempt_id you read. If the deployment has moved on since, the answer is 409 stale and nothing happens. At least 1.
Start the deployment on this pipeline of the environment instead of its own. At least 1.
Returns
200 The deployment, queued. replayed is true when the Idempotency-Key was used before.
Fields of the 200 answer
A deployment of a CoreStack Enterprise environment. Ids are strings here, except attempt_id.
Fields
When the deployment's release archive was removed. A deployment with one cannot be retried or rolled back to. Null while the archive is kept.
The run the deployment is on now. A retry starts a new run with a new id. Null while the deployment has no run.
The pipeline the deployment runs on, as the pipelines list names it.
Why a failed deployment failed, as the last line of the step that stopped it. Null unless it failed.
The commit's author, when the push gave one.
The commit deployed. Null for an uploaded archive.
The commit's page at the git provider, when the push that started the deployment gave it.
The merge request or pull request of the commit, when the push gave one.
The deployment's own identifier.
The status as a number in a string: 1 Scheduled, 2 Running, 3 Failed, 4 Succeeded, 5 Cancelled, 6 Pending (waiting to be deployed by hand), 7 Queued.
1234567The name of the status.
ScheduledRunningFailedSucceededCancelledPendingQueuednullTrue when this answer repeats the outcome of an earlier request with the same Idempotency-Key.
If it is refused
| Status | Reason | What to do |
|---|---|---|
401 | none | Send a valid token as Authorization: Bearer <token>. |
403 | forbidden | The person is not allowed to do this. |
403 | scope_required | Use a token with the scope named in scope. |
404 | none | Check the id. You see only what your account can reach. |
409 | conflict | The action conflicts with the object's present state. Read the message. |
409 | stale | What you read has changed since you read it. Read it again, then send the change with its new version or quote. |
422 | invalid | Fix the field named in field; errors says why. |
429 | rate_limited | Wait for the seconds in Retry-After. |
500 | internal_error | Something went wrong on our side. Quote the trace id to support. |
Reasons are listed by name in Errors and refusals.
The same task elsewhere
curl -X POST https://manage.corefinity.com/api/environments/1311/deployments/4410/run \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"pipeline_id": 2210
}'use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->post('https://manage.corefinity.com/api/environments/1311/deployments/4410/run', [
'pipeline_id' => 2210,
]);
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/environments/1311/deployments/4410/run', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
pipeline_id: 2210,
}),
});
// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);import os
import requests
res = requests.post(
"https://manage.corefinity.com/api/environments/1311/deployments/4410/run",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
json={
"pipeline_id": 2210,
},
)
data = res.json() if res.content else None{
"deployment": {
"artifact_pruned_at": null,
"attempt_id": 190422,
"environment_deployment_pipeline_id": "2210",
"environment_id": "1311",
"error": null,
"git_author": {
"avatar_url": null,
"name": "Maya Okafor"
},
"git_commit": "5c1d0e9a7b3f42d68a0c9e1f7b2d4a6c8e0f1a3b",
"git_commit_url": "https://git.example.com/northwind-digital/harbourandfinch-trade/commit/5c1d0e9a7b3f42d68a0c9e1f7b2d4a6c8e0f1a3b",
"git_merge_request": {
"kind": "pull_request",
"ref": "#42",
"url": "https://git.example.com/northwind-digital/harbourandfinch-trade/pull/42"
},
"hash": "a1ad2149-9907-53b6-ba91-5b042673f595",
"id": "4410",
"name": "Release 2026.10.4",
"notes": null,
"status": "7",
"status_description": "Queued"
},
"replayed": false
}{
"message": "Unauthenticated."
}{
"code": "forbidden",
"message": "You may not retry this deployment.",
"reason": "forbidden",
"result": "forbidden"
}{
"message": "Not found."
}{
"code": "conflict",
"message": "This is a CoreStack or CoreCluster site's environment: stop, roll back and deploy its deployments from the site, on its Deployments tab or with the site's own deployment actions.",
"reason": "conflict"
}{
"code": "invalid",
"errors": {
"expected_action_id": [
"The expected action id must be an integer."
]
},
"field": "expected_action_id",
"message": "The expected action id must be an integer.",
"reason": "invalid"
}{
"code": "rate_limited",
"message": "Too many requests. Try again in 60 seconds.",
"reason": "rate_limited",
"retry_after_seconds": 60
}{
"code": "internal_error",
"message": "The cancellation could not be completed. Try again in a moment.",
"reason": "internal_error",
"result": "failed"
}Try it is off for this endpointIt runs commands on a live site. Copy the request and run it yourself when you are sure.