CorefinityCorefinityDocs
Open the Control PanelControl Panel
Deployment pipeline · 14 of 15

Start a pipeline rehearsal

Runs a pipeline's stages on a staging environment without changing what the environment serves, to show whether a deployment would succeed. Only one rehearsal of an environment runs at a time, and a production environment is never rehearsed on. Your role needs the Edit Environment Deployment Pipeline permission, and the token the deploy ability as well as the exec scope: a rehearsal builds and runs a deployment.

POST/api/corestack/sites/{site}/deployments/rehearsals
  • Needs deploy as well: Always.

Path parameters

siteintegerRequired

The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.

Body

binding_idintegerRequired

This environment's pipeline, or one of another environment of the same site, whose stages then run here. At least 1.

proposalobject

Stages or settings that are not saved, by name (build, database, post_deploy, settings), each as its save takes it. Checked and rehearsed, never saved.

refstring

A branch or a commit to build. The head of the repository's branch when left out. Up to 255 characters.

Returns

202 The rehearsal started. Poll the operation until it finishes.

Fields of the 202 answer
rehearsalobjectRequired
Fields
binding_idinteger

The pipeline of this environment the rehearsal runs on.

failed_lineobject

Present when one line failed. Its stage, index and text.

failureobject

Present on a rehearsal that failed. What went wrong, with its message.

finished_atstring or null
idintegerRequired
per_stageobject

Each part of the rehearsal with where it is, such as pending or skipped.

skippedarray

What the rehearsal leaves out, each with why.

started_atstring or null
statestringRequired

running until the rehearsal has finished, then how it ended, such as passed.

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403forbiddenThe person is not allowed to do this.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
409deployment_runningA deployment of the environment is running, or a stopped one is still being cleaned up. Wait for it to finish, then try again.
409rehearsal_productionRehearse on a staging environment of this site first.
422invalidFix the field named in field; errors says why.
429rate_limitedWait for the seconds in Retry-After.
502noneRead the message; it says what happened.
503switched_offCorefinity has switched this action off for the moment. Try again later.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X POST https://manage.corefinity.com/api/corestack/sites/1042/deployments/rehearsals \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "binding_id": 2211
  }'
{
  "rehearsal": {
    "binding_id": 2211,
    "finished_at": null,
    "id": 77,
    "per_stage": {
      "build": "skipped",
      "database": "skipped",
      "platform_step": "pending",
      "shared_files": "pending",
      "upload": "pending"
    },
    "skipped": [],
    "started_at": "2026-11-09T10:42:07Z",
    "state": "running"
  }
}
Try it

Try it is off for this endpointIt runs commands on a live site. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT