Pipelines
Preview

List the changes made to a pipeline that needed a review

The drafts of the pipeline, newest first, at most 50, so the list is not paged; `state` keeps one state. A draft is an edit that the pipeline's settings said needs a review before it becomes a version.

GET
/pipelines/{pipelineId}/drafts
cookiebetter-auth.session_token<token>

Better Auth session cookie. Production uses the __Secure- prefixed name.

pipelineId*string
Formatuuid
state?string

Only the drafts in this state.

Value in"open""approved""declined""superseded""withdrawn"

Response Body

The open drafts.

application/json
  1. response
items*array<>
Example Request
curl -X GET 'https://wardn.example.com/api/v1/pipelines/497f6eca-6276-4993-bfeb-53cbbbba6f08/drafts'
Example Response
{  "items": [    {      "yaml": "string",      "baseYaml": "string",      "approverGroups": [        {          "label": "string",          "why": "string",          "people": [            {              "id": "string",              "name": "string",              "image": "string"            }          ]        }      ],      "number": 0,      "graph": {        "stages": [          {            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",            "name": "string",            "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563",            "arrival": "auto_promote",            "soakSeconds": 0,            "config": {              "which": "qualified",              "ifSeveral": "replace",              "allowRequests": true,              "configOnly": true,              "incoming": "all",              "narrow": [                {                  "field": "cluster",                  "op": "is",                  "value": "string"                }              ],              "rules": [                {                  "id": "string",                  "type": "approval",                  "section": "gate",                  "title": "string",                  "note": "string",                  "locked": true,                  "params": {}                }              ],              "onReject": "keep",              "onQualify": "notify",              "notifyTarget": "string",              "rollout": {                "mode": "all",                "waves": [                  {                    "id": "string",                    "name": "string",                    "detail": "string",                    "targets": "string",                    "verify": "string",                    "next": "confirm",                    "soakSeconds": 0,                    "selector": {                      "property1": "string",                      "property2": "string"                    }                  }                ],                "onFail": "pause",                "retries": "2",                "timeout": "15m"              },              "health": {                "watchSeconds": 0,                "onFail": "pause"              },              "requestForm": "string",              "agents": {                "autonomy": "observe",                "cap": "observe",                "perHour": 0,                "may": {                  "property1": true,                  "property2": true                },                "read": {                  "mode": "off",                  "agentId": "string"                }              },              "preset": {                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                "version": 1              }            },            "position": 0,            "environmentName": "string",            "environmentClass": "string"          }        ],        "routes": [          {            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",            "fromStageId": "877db427-5907-4b80-a8b2-ab6c3e6f1fc9",            "toStageId": "ccc70001-c375-49a1-b702-44689ce3757f",            "kind": "main",            "must": "qualified",            "label": "string"          }        ]      },      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "pipelineId": "621ef2b0-ba1d-48e5-89dc-b778e6ed42fd",      "kind": "graph",      "source": "string",      "changes": [        {          "kind": "string",          "subject": "string",          "detail": "string"        }      ],      "approvers": [        "string"      ],      "basedOn": 0,      "summary": "string",      "createdBy": {        "id": "string",        "name": "string"      },      "createdAt": "2019-08-24T14:15:22Z",      "state": "open",      "version": 0,      "reviews": [        {          "approver": true,          "by": {            "id": "string",            "name": "string"          },          "decision": "approve",          "note": "string",          "at": "2019-08-24T14:15:22Z"        }      ]    }  ]}