CorefinityCorefinityDocs
Open the Control PanelControl Panel
Environments · 2 of 5

List a site's environments

Lists the site's production row and every environment, what a new environment can be copied from, and whether you can add one. {site} is any row of the site.

GET/api/corestack/sites/{site}/environments

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.

Returns

200 The site's environments.

Fields of the 200 answer
branchesobjectRequired

Whether something can be done now and, when it cannot, why not.

Fields
availablebooleanRequired
reasonstring or nullRequired
can_createobjectRequired

Whether something can be done now and, when it cannot, why not.

Fields
availablebooleanRequired
reasonstring or nullRequired
cloneobjectRequired

Whether something can be done now and, when it cannot, why not.

Fields
availablebooleanRequired
reasonstring or nullRequired
environmentsarray of objectsRequired

The production row first, then every environment.

Fields of each item
env_idstringRequired

The environment's platform identifier.

hostnamestringRequired

The environment's own address on the platform.

idintegerRequired

The site row id, the {site} every /corestack/sites/{site} endpoint takes.

namestringRequired
rolestringRequired

The environment's role, such as production or staging.

role_labelstringRequired
slugstringRequired
anonymised_atstring or null

Only while restores into any environment are on: when the row's data was anonymised. Format: date-time.

anonymised_rowsinteger or null

Only while restores into any environment are on: how many rows were anonymised.

app_versionobject or null

The row's application version. Only while application versions are on for your company.

auto_deploybooleanRequired
branchstring or nullRequired

The branch a Git environment deploys.

create_failedbooleanRequired

True when the environment could not be created.

created_atstring or nullRequired

Format: date-time.

created_byobject or any or nullRequired
deploy_modestring or nullRequired

How the environment is deployed, such as manual or git.

final_restorable_untilstring or null

Only where it applies: until when the final snapshot stays restorable.

final_snapshot_notestring

Only where it applies: what deleting this environment means for its final snapshot.

healthstringRequired

Such as healthy, applying or unknown.

http_authobjectRequired
Fields
enabledbooleanRequired
usersintegerRequired
lifecyclestringRequired

Where the row is in its life, such as active, provisioning or deleted.

modestringRequired

production once the environment serves its own domain, else staging.

mode_labelstringRequired
operationobject or any or nullRequired
platform_urlstring or nullRequired
primary_urlstring or nullRequired
restoreobject or any or nullRequired

The restore that is running. Null when none is.

restoredobject or any or null

Only while restores into any environment are on: the restore the row's data came from. Null when it came from none.

sanitise_levelstring or null

Only while restores into any environment are on: how the row's data was anonymised.

scheduled_snapshotsbooleanRequired
sourceobject or any or nullRequired

What the environment was copied from. Null for one that started empty.

tierstring or nullRequired
usage_p95objectRequired
Fields
basisstringRequired
cpu_millicoresinteger or nullRequired
memory_bytesinteger or nullRequired
limitsobjectRequired
Fields
name_maxintegerRequired
slug_maxintegerRequired
productionobject or any or nullRequired

The production row. Null for a site that has staging environments only.

queued_copiesarray of objectsRequired

Copies waiting their turn onto the site's rows, each as getQueuedCopy answers it.

Fields of each item
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.

siteobjectRequired
Fields
clusterobject or any or nullRequired
domainstringRequired
idintegerRequired

At least 1.

lifecyclestringRequired

Where the site is in its life, such as active or deleted.

platformobjectRequired
Fields
keystringRequired
labelstringRequired
sizingobjectRequired

How a new environment is sized. A site in a CoreCluster is sized by tier, and every other field is null. A CoreStack site is sized by uat_size, with the sizes on offer.

Fields
bystringRequired
tieruat_size
defaultstring or nullRequired

The key of the size to start on: the included size, or the next one up the platform takes. Null when sized by tier.

includedobject or any or nullRequired

The staging environment the site's package includes. Null when sized by tier, or when the package includes none.

pricingobject or any or nullRequired

What to price a size with. Null when sized by tier, and while nothing is charged for the environment.

refusedarray of objects

Only on a Shopware site sized by uat_size: the sizes Shopware does not take, each with why.

Fields of each item
keystringRequired
reasonstringRequired
search_offeredarray of strings

Only on a Shopware site sized by uat_size: the key of each size that can run search.

sizesarray of objects or nullRequired

The staging sizes the request accepts for this site's platform, smallest first. Null when sized by tier.

Fields of each item
coresnumberRequired
disk_gbnumberRequired
keystringRequired

The value to send as uat_size.

labelstringRequired
memory_gibnumberRequired
sourcesarray of objectsRequired

What a new environment can be copied from.

Fields of each item
can_cloneobjectRequired

Whether something can be done now and, when it cannot, why not.

Fields
availablebooleanRequired
reasonstring or nullRequired
environmentobjectRequired

One environment of a website, addressed by its site row.

Fields
env_idstringRequired

The environment's platform identifier.

hostnamestringRequired

The environment's own address on the platform.

idintegerRequired

The site row id, the {site} every /corestack/sites/{site} endpoint takes.

namestringRequired
rolestringRequired

The environment's role, such as production or staging.

role_labelstringRequired
slugstringRequired

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/sites/1042/environments \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "branches": {
    "available": false,
    "reason": "Environments from a git branch are switched off at the moment"
  },
  "can_create": {
    "available": true,
    "reason": null
  },
  "clone": {
    "available": true,
    "reason": null
  },
  "environments": [
    {
      "auto_deploy": false,
      "branch": null,
      "create_failed": false,
      "created_at": "2026-11-10T00:59:38Z",
      "created_by": null,
      "deploy_mode": "manual",
      "env_id": "rs-northwind-harbourandfinch-example-com",
      "health": "unknown",
      "hostname": "harbourandfinch-example-com.northwind.cfstack.example.net",
      "http_auth": {
        "enabled": false,
        "users": 0
      },
      "id": 1042,
      "lifecycle": "active",
      "mode": "staging",
      "mode_label": "No domain",
      "name": "Production",
      "operation": null,
      "platform_url": "https://harbourandfinch-example-com.northwind.cfstack.example.net",
      "primary_url": null,
      "restore": null,
      "role": "production",
      "role_label": "Production",
      "scheduled_snapshots": true,
      "slug": "production",
      "source": null,
      "tier": "S",
      "usage_p95": {
        "basis": "estimate",
        "cpu_millicores": null,
        "memory_bytes": null
      }
    },
    {
      "auto_deploy": false,
      "branch": null,
      "create_failed": false,
      "created_at": "2026-11-10T00:59:38Z",
      "created_by": null,
      "deploy_mode": "manual",
      "env_id": "rs-northwind-harbourandfinch-example-com--staging",
      "final_snapshot_note": "Snapshots are off for this cluster, so no final copy is taken: it cannot be brought back afterwards.",
      "health": "unknown",
      "hostname": "harbourandfinch-example-com-staging.northwind.cfstack.example.net",
      "http_auth": {
        "enabled": true,
        "users": 0
      },
      "id": 1043,
      "lifecycle": "active",
      "mode": "staging",
      "mode_label": "No domain",
      "name": "Staging",
      "operation": null,
      "platform_url": "https://harbourandfinch-example-com-staging.northwind.cfstack.example.net",
      "primary_url": null,
      "restore": null,
      "role": "staging",
      "role_label": "Staging",
      "scheduled_snapshots": false,
      "slug": "staging",
      "source": null,
      "tier": "S",
      "usage_p95": {
        "basis": "estimate",
        "cpu_millicores": null,
        "memory_bytes": null
      }
    }
  ],
  "limits": {
    "name_max": 40,
    "slug_max": 16
  },
  "production": {
    "env_id": "rs-northwind-harbourandfinch-example-com",
    "hostname": "harbourandfinch-example-com.northwind.cfstack.example.net",
    "id": 1042,
    "name": "Production",
    "role": "production",
    "role_label": "Production",
    "slug": "production"
  },
  "queued_copies": [],
  "site": {
    "cluster": {
      "id": 1017,
      "name": "Northwind UK 1"
    },
    "domain": "harbourandfinch.example.com",
    "id": 1042,
    "lifecycle": "active",
    "platform": {
      "key": "wordpress",
      "label": "WordPress"
    }
  },
  "sizing": {
    "by": "tier",
    "default": null,
    "included": null,
    "pricing": null,
    "sizes": null
  },
  "sources": [
    {
      "can_clone": {
        "available": true,
        "reason": null
      },
      "environment": {
        "env_id": "rs-northwind-harbourandfinch-example-com",
        "hostname": "harbourandfinch-example-com.northwind.cfstack.example.net",
        "id": 1042,
        "name": "Production",
        "role": "production",
        "role_label": "Production",
        "slug": "production"
      }
    },
    {
      "can_clone": {
        "available": true,
        "reason": null
      },
      "environment": {
        "env_id": "rs-northwind-harbourandfinch-example-com--staging",
        "hostname": "harbourandfinch-example-com-staging.northwind.cfstack.example.net",
        "id": 1043,
        "name": "Staging",
        "role": "staging",
        "role_label": "Staging",
        "slug": "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