CorefinityCorefinityDocs
Open the Control PanelControl Panel
Deployments · 7 of 10

Check a site's shared files

Checks that the settings file the site's platform needs is in the shared folder a deployment links it from, and says where to create a missing one. The check only advises: deploying works as before whatever it answers. It reads the site's files, so the site must be running.

GET/api/corestack/sites/{site}/deployments/shared-files

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

forstring

What the check is for. rehearsal also accepts a file in an htdocs folder that is not in the releases layout yet. Defaults to deployment.

deploymentrehearsal

Returns

200 The state of each file the site needs.

Fields of the 200 answer
filesarray of objectsRequired
Fields of each item
messagestringRequired

What to do, in plain words.

pathstringRequired

The file, relative to the site's release.

shared_pathstringRequired

Where the file belongs in the shared folder.

statusstringRequired

present is in the shared folder. from_live_release is in the live release, and a deployment moves it. from_htdocs is in htdocs, for a rehearsal. missing is in none of them. unreadable is there, but the site cannot read it.

presentfrom_live_releasefrom_htdocsmissingunreadable
forstringRequired
deploymentrehearsal
messagestringRequired
statestringRequired

missing when a file is missing or cannot be read. not_applicable when the site deploys by upload, so there is nothing to check.

okmissingnot_applicable

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.
409not_runningThe site, environment or deployment is not running. Read the message: where it can be started or will recover, start it or wait, then try again.
422invalidFix the field named in field; errors says why.
429rate_limitedWait for the seconds in Retry-After.
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/deployments/shared-files \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "files": [
    {
      "message": "/var/www/harbourandfinch.example.com/shared/.env is not on this environment yet. Create it over SFTP or SSH before you deploy: without it the deployment stops at linking shared files, and the site keeps serving its current release. If your repository includes .env, the deployment keeps that copy instead.",
      "path": ".env",
      "shared_path": "/var/www/harbourandfinch.example.com/shared/.env",
      "status": "missing"
    }
  ],
  "for": "deployment",
  "message": "1 file this environment needs is missing from its shared folder. You can still start, but the deployment will stop before it goes live.",
  "state": "missing"
}
Try it

Try it is off for this endpointIt has not been cleared for the console. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT