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

Update a site's Node.js configuration

Changes the Node.js version, the global packages or follow mode: send the revision of your last read and what you change. A new package or a changed selector is pinned to the version it resolves to now on the public npm registry. Answers 201 with the operation that applies the change, or 200 when nothing differs or only follow mode changed. When the platform does not confirm the save, the 201 carries an operation that is still pending: follow it, and do not send the change again meanwhile.

PUT/api/corestack/sites/{site}/node-runtime
  • Needs exec as well: The packages turn install scripts on (scripts is true) for a package that does not run them on that site now.

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.

Body

acknowledgearray of strings

eol for a version past its end of life.

eol
applystring

When a change that needs a maintenance window is applied. now applies it at once. tonight queues it for the site's next window. window means the same as tonight. An endpoint that takes window only while maintenance windows are on for your company says so, and refuses it 422 on apply otherwise. Defaults to now.

nowtonightwindow
follow_repositoryboolean
keep_legacy_toolsboolean

When leaving Node.js 16, keep the tools that came with it as packages. Defaults to true.

majorinteger

The Node.js version to move to. The packages are installed again for it at their pinned versions.

packagesarray of objects

The full list of global packages. A package left out is removed. Up to 20 items.

Fields of each item
namestringRequired

The package's name on the public npm registry, with its @scope/ when it has one: lower-case letters, digits, -, ., _ and ~, at most 214 characters. Not a URL, a git or GitHub address, a file, a tarball or an npm alias. The name and the selector together are at most 255 bytes.

scriptsboolean

True to run the package's install scripts. Turning it on for a package that does not run them now needs the exec scope. Defaults to false.

selectorstring

A version (1.93.2), a range written without spaces (^1.90, >=1.2.0, 1.x, 1||2) or a tag (latest), at most 64 characters. A range with a space in it, such as >=1 <2, is refused package_spec_invalid. Left out, the newest version is pinned.

revisionintegerRequired

The revision of your last read. At least 0.

updatearray of strings

Names of listed packages to look up again for a newer version within their selector.

Returns

200 Nothing differs, or only follow mode changed. operation is null.

201 The change started (operation), or was queued for the site's window (queued).

Fields of the 200 answer
item_idinteger or null

At least 1.

node_runtimeobjectRequired

A site's Node.js configuration.

Fields
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.

operationobject or any or nullRequired

The operation that applies the change. Null when nothing differs, when only follow mode changed and when the change was queued.

queuedboolean

Sent only when the change waits for the site's window.

warningsarray of objectsRequired
Fields of each item
codestringRequired
messagestringRequired
windowobject or any or null

Sent only with queued, while maintenance windows are on for your company.

window_datestring
Fields of the 201 answer
item_idinteger or null

At least 1.

node_runtimeobjectRequired

A site's Node.js configuration.

Fields
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.

operationobject or any or nullRequired

The operation that applies the change. Null when nothing differs, when only follow mode changed and when the change was queued.

queuedboolean

Sent only when the change waits for the site's window.

warningsarray of objectsRequired
Fields of each item
codestringRequired
messagestringRequired
windowobject or any or null

Sent only with queued, while maintenance windows are on for your company.

window_datestring

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.
409conflictThe action conflicts with the object's present state. Read the message.
409runtime_lockedCorefinity has locked this environment's Node.js settings. Contact support to change them.
409staleWhat you read has changed since you read it. Read it again, then send the change with its new version or quote.
422ack_requiredNode.js 18 reached its end of life on 30 April 2025 and gets no security fixes.
422scripts_memoryInstall scripts need more command-line memory than the environment has. Choose a larger size, or leave install scripts off.
429rate_limitedWait for the seconds in Retry-After.
502noneRead the message; it says what happened.
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 -X PUT https://manage.corefinity.com/api/corestack/sites/1042/node-runtime \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "follow_repository": true,
    "revision": 4
  }'
{
  "node_runtime": {
    "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"
      }
    ],
    "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
  },
  "operation": null,
  "warnings": [
    {
      "code": "already_newest",
      "message": "Already the newest that matches."
    }
  ]
}
Try it

Try it is off for this endpointIt runs commands on a live site. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT