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.
Path parameters
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
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.
deploymentrehearsalReturns
200 The state of each file the site needs.
Fields of the 200 answer
Fields of each item
What to do, in plain words.
The file, relative to the site's release.
Where the file belongs in the shared folder.
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_htdocsmissingunreadabledeploymentrehearsalmissing when a file is missing or cannot be read. not_applicable when the site deploys by upload, so there is nothing to check.
okmissingnot_applicableIf it is refused
| Status | Reason | What to do |
|---|---|---|
401 | none | Send a valid token as Authorization: Bearer <token>. |
403 | company_unavailable | Your company is unavailable. |
403 | scope_required | Use a token with the scope named in scope. |
403 | two_factor_required | Turn on two-factor on your account, then send again. |
404 | feature_off | This feature is not on for your organisation yet. |
409 | not_running | The 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. |
422 | invalid | Fix the field named in field; errors says why. |
429 | rate_limited | Wait for the seconds in Retry-After. |
503 | switched_off | Corefinity 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"use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->get('https://manage.corefinity.com/api/corestack/sites/1042/deployments/shared-files');
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/deployments/shared-files', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
},
});
// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);import os
import requests
res = requests.get(
"https://manage.corefinity.com/api/corestack/sites/1042/deployments/shared-files",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
)
data = res.json() if res.content else None{
"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"
}{
"message": "Unauthenticated."
}{
"code": "company_unavailable",
"message": "Your company is unavailable.",
"reason": "company_unavailable"
}{
"code": "feature_off",
"message": "Not found.",
"reason": "feature_off"
}{
"code": "not_running",
"message": "The site is not running",
"reason": "not_running"
}{
"code": "invalid",
"detail_reason": "string",
"errors": {},
"field": "string",
"message": "string",
"reason": "invalid"
}{
"code": "rate_limited",
"message": "Too many requests. Try again in 60 seconds.",
"reason": "rate_limited",
"retry_after_seconds": 60
}{
"code": "switched_off",
"message": "Site commands are switched off at the moment",
"reason": "switched_off",
"switch": "exec"
}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.