CorefinityCorefinityDocs
Open the Control PanelControl Panel
Copies · 1 of 4

Get a copy that waits its turn

Answers where a queued copy stands: still waiting and for what, started (with the operation to follow), or ended without starting. A copy whose target you may not change answers 404, as an id that does not exist.

GET/api/corestack/copy-queue/{queued}

Path parameters

queuedintegerRequired

The id of the waiting copy, queued.id in the answer that queued it. Digits only. At least 1.

Returns

200 The queued copy.

Fields of the 200 answer
queuedobjectRequired

A copy that waits its turn, as the Control Panel, this API and an MCP client all show it.

Fields
aheadinteger or nullRequired

How many copies on the same website are in front of this one. Null once it is no longer in the queue.

deadline_atstring or nullRequired

When the copy stops waiting. Six hours after it was queued, by default. Format: date-time.

ended_atstring or nullRequired

When it started, was cancelled, was refused or expired. Format: date-time.

idintegerRequired

The id getQueuedCopy and cancelQueuedCopy take. At least 1.

messagestring or nullRequired

The same in plain words. Null once it has started.

operation_idinteger or nullRequired

The copy's operation once it has started, for getOperation. At least 1.

queued_atstring or nullRequired

When the copy was queued. Format: date-time.

reasonstring or nullRequired

A stable code for why it waits or why it ended, such as target_busy, clone_in_progress, busy, snapshot_slot, cancelled, access_ended or two_factor_required. Null once it has started.

sourceobject or any or nullRequired

The environment the copy comes from. Null when you may not see that environment (a copy from another website), where message calls it "the environment it copies from", and when it no longer exists.

statestringRequired

waiting or starting while it is in the queue; started once the copy runs (follow operation_id); refused when a rule failed as it started, or the access that queued it has ended; expired when it could not start before deadline_at; cancelled.

waitingstartingstartedrefusedexpiredcancelled
targetobjectRequired

An environment of a queued copy. Unlike the shared Named, name is null once the environment is gone.

Fields
idintegerRequired

The environment's site row id, the {site} of /corestack/sites/{site}. At least 1.

namestring or nullRequired

The environment's name. Null for a target that no longer exists.

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
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.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl https://manage.corefinity.com/api/corestack/copy-queue/1 \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "queued": {
    "ahead": null,
    "deadline_at": "2026-11-03T13:00:00Z",
    "ended_at": "2026-11-03T07:04:10Z",
    "id": 6120,
    "message": null,
    "operation_id": 5120,
    "queued_at": "2026-11-03T07:00:00Z",
    "reason": null,
    "source": {
      "id": 1042,
      "name": "Production"
    },
    "state": "started",
    "target": {
      "id": 1043,
      "name": "Staging"
    }
  }
}
Try it
Held in this tab's memory only. Never stored or sent to us.

Use a token with only the read scope. How to make one

Was this helpful?
Open in ClaudeOpen in ChatGPT