List an environment's pipelines
Answers the environment's deployment pipelines: the folders each one deploys to and, for a classic pipeline, the commands it runs in classic, with credentials redacted. A deployment names one of these by its id.
Path parameters
The id of a CoreStack Enterprise environment. Not the same number as a site row id. At least 1.
Returns
200 The environment's pipelines.
Fields of the 200 answer
Fields of each item
What a classic pipeline runs, in order. Null for a pipeline that runs in three stages.
The pipeline's own build commands, one a line, with credentials redacted.
The shared pipeline this one is based on.
Fields
The platforms the shared pipeline is for.
Fields of each item
The id a deployment, a repository and the deployment settings name this pipeline by.
The id of the shared pipeline this one is based on.
The pipeline's own post build commands, one a line, with credentials redacted.
The web folder the pipeline deploys to.
The storage folder the pipeline uses.
three_stage for a pipeline that runs in build, database and after-deploy stages. Null for a classic pipeline.
three_stagenullTrue when the pipeline runs its own build commands instead of the shared ones.
If it is refused
| Status | Reason | What to do |
|---|---|---|
401 | none | Send a valid token as Authorization: Bearer <token>. |
403 | scope_required | Use a token with the scope named in scope. |
404 | none | Check the id. You see only what your account can reach. |
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/environments/1311/deployment-pipelines \
-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/environments/1311/deployment-pipelines');
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/environments/1311/deployment-pipelines', {
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/environments/1311/deployment-pipelines",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
)
data = res.json() if res.content else None{
"environment_deployment_pipelines": [
{
"classic": {
"pipeline_version": 1,
"runs": true,
"sections": [
{
"key": "build",
"label": "Build command",
"lines": [
{
"command": "composer install --no-dev",
"comments": [],
"label": "Build command 1"
},
{
"command": "npm ci && npm run build",
"comments": [],
"label": "Build command 2"
}
],
"source": "custom"
},
{
"key": "post_build",
"label": "Post build command",
"lines": [],
"source": "shared"
}
]
},
"custom_commands": "composer install --no-dev\nnpm ci && npm run build",
"deployment_pipeline": {
"id": "4",
"name": "Wordpress",
"platforms": [
{
"id": "4",
"name": "Wordpress",
"slug": "wordpress"
}
],
"slug": "wordpress"
},
"id": "2210",
"notes": "Storefront",
"pipeline_id": "4",
"post_hook_commands": null,
"root_directory": "/var/www/harbourandfinch.example.com/",
"root_storage": "/var/www/harbourandfinch.example.com/shared/",
"stage_model": null,
"tag": null,
"use_custom_commands": true,
"use_custom_post_hook_commands": false
}
]
}{
"message": "Unauthenticated."
}{
"code": "scope_required",
"message": "This access token does not have the destructive scope this needs. Use a token with the destructive scope.",
"reason": "scope_required",
"scope": "destructive"
}{
"message": "Not found."
}{
"code": "rate_limited",
"message": "Too many requests. Try again in 60 seconds.",
"reason": "rate_limited",
"retry_after_seconds": 60
}