CorefinityCorefinityDocs
Open the Control PanelControl Panel
Node.js · 3 of 7

Get a site's Node.js configuration

Answers the site's Node.js: the version it runs, the versions it may move to, the global packages, follow mode, the caches and any change still running. revision is the write token every change sends back. refresh=1 reads the site's report again first, which runs a command on the site; only that read counts on the live budget of 10 a minute, shared with the package check and the cache clear, and a spent budget answers 429.

GET/api/corestack/sites/{site}/node-runtime

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.

Query parameters

refreshstring

Send 1 to read the running site's report again before answering.

10truefalse

Returns

200 The Node.js configuration.

Fields of the 200 answer
adoptedbooleanRequired
adoptionobjectRequired

Whether a site is on the runtime, and whether it can move onto it.

Fields
adopt_now_refusalstring or nullRequired

Why the site cannot move at once, when it cannot.

adoptedbooleanRequired

True when the site is on the runtime.

can_adopt_nowbooleanRequired
can_adopt_tonightbooleanRequired
in_progressbooleanRequired
planned_forstring or nullRequired

The date Corefinity plans to move the site, if one is set.

queued_forstring or nullRequired

The date of the window the move is queued for, if it is queued.

revisionstring or nullRequired

The runtime revision the site is on, such as v1. Null until it is on the runtime.

applyobjectRequired

The Node.js change still running, what the site refused in the last one, and a change waiting for the window.

Fields
errorobject or nullRequired
operationobject or any or nullRequired
pending_tonightobject or nullRequired

The window_date and item_id of a change that waits for the site's window.

cachesobject or nullRequired

The size of each package cache (npm_bytes, corepack_bytes, pnpm_bytes, yarn_bytes) and when it was measured. Null until the site has reported them.

follow_repositorybooleanRequired

True when each deployment switches to the version the repository asks for.

last_applied_atstring or nullRequired

Format: date-time.

limitsobjectRequired
Fields
max_packagesintegerRequired
lockedobject or nullRequired

Set when Corefinity has locked the site's Node.js configuration, with the reason. Null otherwise.

majorinteger or nullRequired

The Node.js version the site is set to.

memoryobject or nullRequired

The memory of the site's command line (cli_limit_bytes) and Node.js's heap (heap_mib). Null until the site has reported them.

optionsarray of objectsRequired

The versions the site may move to.

Fields of each item
arrives_withanyRequired

What brings the version to the site when it is not there yet. Null when it is.

available_on_this_rowbooleanRequired

Whether the site, or a new site, has this version to hand.

codenamestring or nullRequired
default_for_newbooleanRequired
end_of_life_onstring or nullRequired
labelstringRequired
majorintegerRequired
needs_ackarray of stringsRequired

What acknowledge must carry to choose it, such as eol.

reasonstring or nullRequired

Why it cannot be chosen, when it cannot.

recommendedbooleanRequired
selectablebooleanRequired

Whether it can be chosen.

statusstringRequired

Such as active_lts, maintenance_lts or end_of_life.

packagesarray of objectsRequired
Fields of each item
advisoriesobjectRequired

The security advisories of the last check, by severity.

Fields
criticalinteger
highinteger
binsarray of stringsRequired

The commands the installed package provides.

errorobject or nullRequired

What went wrong when the package failed to install (message, tail). Null otherwise.

has_install_scriptboolean or nullRequired

Null when the registry has not been asked.

installed_versionstring or nullRequired
lateststring or nullRequired

The newest version on the registry at the last check, which may be outside the selector.

namestringRequired
originstringRequired

Where the line comes from. panel for one saved here or in the Control Panel.

resolvedstring or nullRequired

The version the selector is pinned to.

scriptsbooleanRequired

Whether the package's install scripts run.

selectorstring or nullRequired

The version, range or tag asked for.

statestringRequired

installed, installing, failed or pending.

update_availablebooleanRequired
wantedstring or nullRequired

The newest version within the selector at the last check.

repositoryobject or nullRequired

What the repository asks for (source, raw, majors, satisfied, read_at), when it has been read. Null otherwise.

revisionintegerRequired

The write token. Send it back with every change; a change made since your read is refused stale.

statusobject or nullRequired

The lifecycle of the site's version (key, label, end_of_life_on).

unmanagedarray of stringsRequired

Global packages found on the site that were installed by hand, by name.

versionstring or nullRequired

The full version the site reports, when it has reported one.

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.
409stringstring.
429rate_limitedWait for the seconds in Retry-After.
503connect_failedThe cluster could not be reached.
503temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.
503switched_offCorefinity has switched this action off for the moment. Try again later.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl https://manage.corefinity.com/api/corestack/sites/1042/node-runtime \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "adopted": true,
  "adoption": {
    "adopt_now_refusal": null,
    "adopted": true,
    "can_adopt_now": false,
    "can_adopt_tonight": false,
    "in_progress": false,
    "planned_for": null,
    "queued_for": null,
    "revision": "v1"
  },
  "apply": {
    "error": null,
    "operation": null,
    "pending_tonight": null
  },
  "caches": null,
  "follow_repository": false,
  "last_applied_at": null,
  "limits": {
    "max_packages": 20
  },
  "locked": null,
  "major": 24,
  "memory": null,
  "options": [
    {
      "arrives_with": null,
      "available_on_this_row": true,
      "codename": "Krypton",
      "default_for_new": true,
      "end_of_life_on": "2028-04-30",
      "label": "Node.js 24",
      "major": 24,
      "needs_ack": [],
      "reason": null,
      "recommended": true,
      "selectable": true,
      "status": "maintenance_lts"
    },
    {
      "arrives_with": null,
      "available_on_this_row": true,
      "codename": "Jod",
      "default_for_new": false,
      "end_of_life_on": "2027-04-30",
      "label": "Node.js 22",
      "major": 22,
      "needs_ack": [],
      "reason": null,
      "recommended": false,
      "selectable": true,
      "status": "maintenance_lts"
    },
    {
      "arrives_with": null,
      "available_on_this_row": true,
      "codename": "Hydrogen",
      "default_for_new": false,
      "end_of_life_on": "2025-04-30",
      "label": "Node.js 18",
      "major": 18,
      "needs_ack": [
        "eol"
      ],
      "reason": null,
      "recommended": false,
      "selectable": true,
      "status": "end_of_life"
    }
  ],
  "packages": [
    {
      "advisories": {
        "critical": 0,
        "high": 0
      },
      "bins": [],
      "error": null,
      "has_install_script": null,
      "installed_version": null,
      "latest": null,
      "name": "sass",
      "origin": "panel",
      "resolved": "1.93.2",
      "scripts": false,
      "selector": "latest",
      "state": "pending",
      "update_available": false,
      "wanted": null
    },
    {
      "advisories": {
        "critical": 0,
        "high": 0
      },
      "bins": [],
      "error": null,
      "has_install_script": null,
      "installed_version": null,
      "latest": null,
      "name": "sharp",
      "origin": "panel",
      "resolved": "0.34.4",
      "scripts": true,
      "selector": "0.34",
      "state": "pending",
      "update_available": false,
      "wanted": null
    }
  ],
  "repository": null,
  "revision": 4,
  "status": {
    "end_of_life_on": "2028-04-30",
    "key": "maintenance_lts",
    "label": "Maintenance LTS"
  },
  "unmanaged": [],
  "version": null
}
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