CorefinityCorefinityDocs
Open the Control PanelControl Panel
Enterprise deployments · 1 of 17

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.

GET/api/environments/{environment}/deployment-pipelines

Path parameters

environmentintegerRequired

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
environment_deployment_pipelinesarray of objectsRequired
Fields of each item
classicobject or any or nullRequired

What a classic pipeline runs, in order. Null for a pipeline that runs in three stages.

custom_commandsstring or nullRequired

The pipeline's own build commands, one a line, with credentials redacted.

deployment_pipelineobject

The shared pipeline this one is based on.

Fields
idstringRequired
namestringRequired
platformsarray of objects

The platforms the shared pipeline is for.

Fields of each item
idstringRequired
namestringRequired
slugstringRequired
slugstringRequired
idstringRequired

The id a deployment, a repository and the deployment settings name this pipeline by.

notesstring or nullRequired
pipeline_idstringRequired

The id of the shared pipeline this one is based on.

post_hook_commandsstring or nullRequired

The pipeline's own post build commands, one a line, with credentials redacted.

root_directorystring or nullRequired

The web folder the pipeline deploys to.

root_storagestring or nullRequired

The storage folder the pipeline uses.

stage_modelstring or nullRequired

three_stage for a pipeline that runs in build, database and after-deploy stages. Null for a classic pipeline.

three_stagenull
tagstring or nullRequired
use_custom_commandsbooleanRequired

True when the pipeline runs its own build commands instead of the shared ones.

use_custom_post_hook_commandsbooleanRequired

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403scope_requiredUse a token with the scope named in scope.
404noneCheck the id. You see only what your account can reach.
429rate_limitedWait 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"
{
  "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
    }
  ]
}
Try it
Held in this tab's memory only. Never stored or sent to us.

Use a token with only the read scope. How to make one

Was this helpful?
Open in ClaudeOpen in ChatGPT