Check a stage's lines before saving
Says what the platform makes of each line of a stage: whether it only touches files or needs the environment's services, and whether a build with these lines would open a tunnel to them. It stores nothing and runs nothing.
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.
Body
One of the environment's pipelines. The default pipeline when left out. At least 1.
Up to 200 items.
builddatabasepost_deployReturns
200 What the platform makes of each line, in the order sent.
Fields of the 200 answer
Fields of each item
Fields of each item
The rule that recognised the line.
Such as files for a line that only touches files, or services for one that needs the environment's services.
Whether a build with these lines opens a tunnel to the environment's services, and to which.
If 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. |
422 | invalid | Fix the field named in field; errors says why. |
429 | rate_limited | Wait for the seconds in Retry-After. |
Reasons are listed by name in Errors and refusals.
The same task elsewhere
curl -X POST https://manage.corefinity.com/api/corestack/sites/1042/deployments/pipeline/check \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"lines": [
"composer install --no-dev",
"php artisan migrate --force"
],
"stage": "build"
}'use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->post('https://manage.corefinity.com/api/corestack/sites/1042/deployments/pipeline/check', [
'lines' => [
'composer install --no-dev',
'php artisan migrate --force',
],
'stage' => 'build',
]);
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/deployments/pipeline/check', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
lines: [
'composer install --no-dev',
'php artisan migrate --force',
],
stage: 'build',
}),
});
// 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.post(
"https://manage.corefinity.com/api/corestack/sites/1042/deployments/pipeline/check",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
json={
"lines": [
"composer install --no-dev",
"php artisan migrate --force",
],
"stage": "build",
},
)
data = res.json() if res.content else None{
"lines": [
{
"badges": [],
"rule": "composer.install",
"suggestion": null,
"verdict": "files",
"warnings": []
},
{
"badges": [
{
"id": "uses_services",
"label": "Uses this environment's services",
"severity": "info"
}
],
"rule": "laravel.migrate",
"suggestion": null,
"verdict": "services",
"warnings": []
}
],
"stage": "build",
"tunnels": {
"declared_by": [
2
],
"open": true,
"services": [
{
"key": "database",
"label": "MariaDB"
},
{
"key": "redis",
"label": "Valkey"
}
]
}
}{
"message": "Unauthenticated."
}{
"code": "company_unavailable",
"message": "Your company is unavailable.",
"reason": "company_unavailable"
}{
"code": "feature_off",
"message": "Not found.",
"reason": "feature_off"
}{
"code": "invalid",
"errors": {
"lines": [
"Send the stage and its lines."
]
},
"field": "lines",
"message": "Send the stage and its lines.",
"reason": "invalid"
}{
"code": "rate_limited",
"message": "Too many requests. Try again in 60 seconds.",
"reason": "rate_limited",
"retry_after_seconds": 60
}