CorefinityCorefinityDocs
Open the Control PanelControl Panel
Environment variables · 1 of 4

List an environment's variables

Answers every variable of a CoreStack Enterprise environment by name, with its value masked and the deployment stages that read it. A build sees each variable with the CF_ prefix, so API_TOKEN is read as $CF_API_TOKEN.

GET/api/environments/{environment}/variables

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's variables, in name order.

Fields of the 200 answer
countintegerRequired

How many variables the environment has. At least 0.

limitintegerRequired

How many it can hold. At least 0.

variablesarray of objectsRequired
Fields of each item
maskedstringRequired

The mask shown in place of the value. A value of 16 characters or more also shows its last four.

namestringRequired

The name, without the CF_ prefix builds see it with.

replaces_platformbooleanRequired

Whether the name is one CoreStack sets itself, so this value replaces the platform's.

tool_credentialstring or nullRequired

A sentence saying the build tool named never reads this variable, when the name is one a build tool reads its own credentials from and no stage reads it. Null otherwise.

updated_atstring or nullRequired

When the variable last changed, in UTC. Format: date-time.

used_inarray of stringsRequired

The deployment stages whose commands read the variable.

builddatabasepost_deploy

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.
422invalidFix the field named in field; errors says why.
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/variables \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "count": 2,
  "limit": 100,
  "variables": [
    {
      "masked": "••••••••cret",
      "name": "API_TOKEN",
      "replaces_platform": false,
      "tool_credential": null,
      "updated_at": "2026-11-09T10:42:07Z",
      "used_in": [
        "post_deploy"
      ]
    },
    {
      "masked": "••••••••",
      "name": "SENTRY_DSN",
      "replaces_platform": false,
      "tool_credential": null,
      "updated_at": "2026-11-04T08:15:30Z",
      "used_in": []
    }
  ]
}
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