CorefinityCorefinityDocs
Open the Control PanelControl Panel
Essentials · 8 of 12

Long-running work

Changes that take time answer an operation, which you read until it finishes.

On this page

A change that cannot finish within the request answers an operation. Read the operation until its status is completed or failed.

What a change answers

StatusBodyMeaning
201An operation, or an object with an operation fieldThe work has started
202An operation, or an object with an operation fieldThe work is accepted. The operation's status says whether it has started
200"operation": nullNothing differed, so nothing was started
201"queued": true and "operation": nullThe change waits for a window; see Apply now or in a window

A Varnish change answers 202 both when it has started and when it waits for a window. Check queued first, then the operation's status.

Read an operation

GET /corestack/operations/{operation} needs the read scope. Reading checks progress first when the last check is a few seconds old, so one request every few seconds is enough.

Terminal
curl https://manage.corefinity.com/api/corestack/operations/77120 \
  -H "Authorization: Bearer $COREFINITY_TOKEN" -H "Accept: application/json"
json
{
  "id": 77120,
  "type": "php_version",
  "status": "completed",
  "from_version": "8.2",
  "to_version": "8.3",
  "steps": [{ "key": "saved", "label": "Saved", "state": "done" }],
  "error": null,
  "created_at": "2026-10-24T09:12:03Z",
  "completed_at": "2026-10-24T09:14:41Z"
}

The answer carries more fields than shown here; the operation's reference page lists them all. Applying pending changes now answers a shorter operation of its own shape.

Statuses

statusstatus_labelFinal
pendingSaving changeNo
committedWaiting for the platformNo
rolling_outApplying changeNo
executingRunningNo
completedDoneYes
failedFailedYes

While an operation is not final, another change to the same site is refused 409 busy.

A new site or environment can wait before its work starts: its status stays pending and its status_label reads Waiting for the platform or Waiting for DNS. It carries on by itself, so do not create it again.

When an operation fails

error says why in plain words, and failure_reason carries a stable code where there is one.

Not every failed operation can be retried: read its can_retry. While it is true, POST /corestack/operations/{operation}/retry carries on from where the operation stopped.

When retry_requires is acknowledge_env, check the site's .env file first and send "acknowledge_env": true with the retry.

While can_retry is false, a retry is refused: make the change again. The retry's reference page lists its refusals and what to do about each.

A failed site or environment creation is never retried this way, and the retry answers 422 not_retryable: ask Corefinity to retry it, or delete the site or environment and create it again.

Results shown once

An operation never carries a secret. Where work creates a login, POST /corestack/operations/{operation}/reveal answers it once, with the exec scope; a second request is refused 409 already_revealed.

Work followed on its own endpoint

Most changes answer an operation read with GET /corestack/operations/{operation}. Some areas follow their work on an endpoint of their own, which the request's reference page names.

Read it the same way: every few seconds, until its status is final.

Read thisWhat it does
GET /corestack/operations/{operation}Get an operation
GET /enterprise-copies/{copy}Get an Enterprise copy
GET /environments/{environment}/deployments/{deployment}Get a deployment
GET /performance-audits/{audit}Get a performance audit
GET /performance-audits/{audit}/gtmetrix-reportsList an audit's GTmetrix reports
GET /corestack/sites/{site}/access/operations/{operation}Get an access operation
GET /corestack/commands/{command}Get a command
GET /corestack/sites/{site}/database/operations/{operation}Get a database operation
GET /corestack/sites/{site}/deployments/rehearsals/{rehearsal}Get a rehearsal
GET /corestack/sites/{site}/email/operations/{operation}Get an email operation
GET /corestack/sites/{site}/error-pages/operations/{operation}Get an error pages operation
GET /firewall/changes/{change}Get a firewall change
GET /corestack/logs/exports/{download}Get a logs export
GET /corestack/clusters/{cluster}/progressGet a CoreCluster's create progress
GET /corestack/sites/{site}/nginx-rules/operations/{operation}Get an Nginx rules operation
GET /corestack/sites/{site}/pagespeedGet a site's PageSpeed history
GET /environments/{environment}/ssh/host-keysGet an environment's host keys
GET /ssh/changes/{change}Get an SSH change
GET /corestack/sites/{site}/varnish/operations/{operation}Get a Varnish operation

A snapshot is followed on its own endpoint too: read GET /corestack/snapshots/{snapshot} until its status is ready or failed.

Was this helpful?
Open in ClaudeOpen in ChatGPT