CorefinityCorefinityDocs
Open the Control PanelControl Panel
Deployment pipeline · 4 of 15

Update a site's deployment options

Changes the deployment options you send and keeps the rest: the extra paths kept between releases, the paths a build may read, the check before the switch, the warm-up and the cache purges. A list is sent whole and replaces the saved one. Your role needs the Edit Environment Deployment Pipeline permission.

PUT/api/corestack/sites/{site}/deployments/options

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

build_readsarray of strings

The whole list of paths a build may read from the live site, at most 50, each named once.

cloudflare_purgeboolean

Purge Cloudflare's cache after the switch.

extra_shared_pathsarray of strings or objects

The whole list of extra paths kept between releases, at most 50, each named once: a folder's path, or {path, kind}. No path may equal, hold or sit inside another, or one the platform itself keeps (platform_shared in the answer).

Fields of an item given as an object
kindstring

A folder (dir, the default) or a file.

dirfile
pathstringRequired

A path inside the site, relative to its root: no leading slash, no . or .. segment, of letters, digits and . _ / @ + -, at most 255 characters.

sharedstring or any or null

Where the path's data is kept between releases, relative to the shared folder. Leave it out to keep the saved place, or the default for a new path.

pre_switch_checkboolean or object

Check the new release answers before visitors are switched to it. Off (false), on (true), or on with up to five paths to request.

snapshot_before_upgradeboolean

Magento 2 only.

varnish_purgeboolean

Magento 2 only. Purge Varnish after the switch.

warm_upboolean or object

Request pages of the new release before the switch. Off (false), on (true), or on with up to ten paths to request.

Returns

200 The deployment options after the change.

Fields of the 200 answer
build_readsarray of stringsRequired
cloudflare_purgebooleanRequired
extra_shared_pathsarray of objectsRequired
Fields of each item
kindstring
dirfile
pathstringRequired

A path relative to the site's root. Up to 255 characters.

sharedstring

Where the path's data is kept between releases, relative to the shared folder, when that is not the default.

migrateboolean or null

Laravel only, read only. The environment's own switch, which a pipeline whose run_migrations is null follows. Null on every other platform.

platform_sharedarray of objects

The paths the platform itself keeps between releases.

Fields of each item
kindstring
dirfile
pathstringRequired

A path relative to the site's root. Up to 255 characters.

sharedstring

Where the path's data is kept between releases, relative to the shared folder, when that is not the default.

pre_switch_checkboolean or objectRequired

Off (false), on (true), or on with the paths to request.

snapshot_before_upgradeboolean
varnish_purgeboolean

Magento 2 only. Whether Varnish is purged after the switch.

warm_upboolean or objectRequired

Off (false), on (true), or on with the paths to request.

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.
403forbiddenThe person is not allowed to do this.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
409managed_elsewhereThis site is read-only here. Change it in the control panel that manages it.
422invalidFix the field named in field; errors says why.
422wrong_platformThis is not available for the site's platform. Use it on a site of the platform it is for.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X PUT https://manage.corefinity.com/api/corestack/sites/1042/deployments/options \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "cloudflare_purge": false,
    "extra_shared_paths": [
      "public/uploads",
      "var/exports"
    ]
  }'
{
  "build_reads": [],
  "cloudflare_purge": false,
  "extra_shared_paths": [
    {
      "kind": "dir",
      "path": "public/uploads"
    },
    {
      "kind": "dir",
      "path": "var/exports"
    }
  ],
  "migrate": false,
  "platform_shared": [
    {
      "kind": "dir",
      "path": "storage"
    },
    {
      "kind": "file",
      "path": ".env"
    }
  ],
  "pre_switch_check": false,
  "snapshot_before_upgrade": false,
  "warm_up": false
}
Try it

Try it is off for this endpointIt overwrites data that cannot be brought back. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT