CorefinityCorefinityDocs
Open the Control PanelControl Panel
Websites and environments · 2 of 7

Get an environment

Answers one environment by its id.

GET/api/environments/{environment}

Path parameters

environmentintegerRequired

The id of a CoreStack Enterprise environment. Not the same number as a site row id. At least 1.

Returns

200 The environment.

Fields of the 200 answer
environmentobjectRequired

An environment of a website. Ids are sent as strings of digits, such as "1311".

Fields
access_serverstring or nullRequired

The server to connect to for shell access, when the environment has one.

idstringRequired
namestring or nullRequired
platformobject

The application the environment runs.

Fields
idstring
namestring
slugstring
platform_idstringRequired

The id of the application the environment runs.

typeinteger or nullRequired

The kind of environment as a number: 1 development, 2 staging, 3 pre-production, 4 production, 5 project, 6 release, 7 to 11 UAT 1 to 5, 12 a development box.

type_descriptionstring or nullRequired

The name of type, such as Production or Staging.

urlstring or nullRequired
website_idstringRequired
move_sizeobject

The staging size the environment's move to CoreStack asks about. Sent only while the move asks which staging size to use, and only to a person with billing rights for the website.

Fields
answerobject or any or nullRequired

The answer given. Null until one is.

asked_atstring or nullRequired

Format: date-time.

disk_sizestringRequired

The smaller size, which the disk alone suggests.

idintegerRequired

The question_id to answer. At least 1.

measuredstring or nullRequired

What was measured, in a sentence.

memory_sizestringRequired

The larger size, which the measured memory suggests.

optionsarray of objectsRequired

The two answers: accept the larger size, or keep the smaller one.

Fields of each item
answerstringRequired

The value to send as answer for this size.

acceptkeep
confirm_costbooleanRequired

True when this answer costs more a month, so it must be sent with confirm_cost: true.

currencystring or nullRequired
deltastring or nullRequired

How much more a month the larger size costs than the smaller one.

includedboolean or nullRequired

Whether your plan includes this size at no charge.

labelstringRequired
monthlystring or nullRequired

The monthly price of the size from when the move goes live. Null when it could not be priced.

uat_sizestringRequired

The staging size, such as medium or large.

warningstring or nullRequired

What keeping the smaller size risks. Sent on the keep option.

price_notestring or nullRequired
pricedbooleanRequired
rule_versionstringRequired
statestringRequired

open until answered, then answered. An answer can be changed until the move uses it.

openanswered
window_daysintegerRequired

How many days of use were measured.

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403scope_requiredUse a token with the scope named in scope.
404noneCheck the id. You see only what your account can reach.
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/environments/1311 \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "environment": {
    "access_server": null,
    "id": "1311",
    "name": "Production",
    "platform": {
      "id": "1",
      "name": "Magento 2",
      "slug": "magento2"
    },
    "platform_id": "1",
    "type": 4,
    "type_description": "Production",
    "url": "https://trade.harbourandfinch.example.com",
    "website_id": "1310"
  }
}
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