Get a site's carried-over pipeline
For an environment that was moved from CoreStack Enterprise, answers the build, database and after-deploy commands that came with it, translated into the three stages line by line, with the ones that need a person to look at them. bindings is empty when nothing was carried over.
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.
Returns
200 What was carried over.
Fields of the 200 answer
Each carried-over pipeline, with its translated lines and whether it is accepted.
Fields of each item
Settings the translation made, in words.
Fields of each item
What the translation did with the line, such as kept, rewritten or removed.
Why the line needs a look.
The lines it became, each with its stage.
The line's stage and index, which a decision names it by.
Fields
The command as it was carried over.
The repository the pipeline deploys from.
Send this with the accept when it is not null.
needs_review while a line needs a look, accepted once the pipeline has been accepted.
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. |
429 | rate_limited | Wait for the seconds in Retry-After. |
Reasons are listed by name in Errors and refusals.
The same task elsewhere
curl https://manage.corefinity.com/api/corestack/sites/1042/deployments/carried-over \
-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/carried-over');
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/deployments/carried-over', {
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/carried-over",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
)
data = res.json() if res.content else None{
"attention_id": "deploy_pipeline_carried:1042",
"auto_deploy": false,
"bindings": [
{
"also_set": [
"Maintenance page: off"
],
"binding_id": 2210,
"label": "Default pipeline",
"lines": [
{
"change": "kept",
"needs_review": false,
"result": [
{
"stage": "build",
"text": "composer install --no-dev"
}
],
"source": {
"index": 0,
"stage": "build"
},
"text": "composer install --no-dev"
},
{
"change": "rewritten",
"needs_review": true,
"reason": "Copies from the old server need a look",
"result": [
{
"stage": "build",
"text": "scp [email protected]:/var/www/media.tgz ."
}
],
"source": {
"index": 1,
"stage": "build"
},
"text": "scp [email protected]:/var/www/media.tgz ."
}
],
"rehearsal": null,
"repository": {
"branch": "main",
"provider": "gitlab",
"repo": "northwind-digital/harbourandfinch"
},
"revision": null,
"state": "needs_review"
}
],
"files_mode": false,
"moved_at": null
}{
"message": "Unauthenticated."
}{
"code": "company_unavailable",
"message": "Your company is unavailable.",
"reason": "company_unavailable"
}{
"code": "feature_off",
"message": "Not found.",
"reason": "feature_off"
}{
"code": "rate_limited",
"message": "Too many requests. Try again in 60 seconds.",
"reason": "rate_limited",
"retry_after_seconds": 60
}