Pipelines
Preview

Read one change waiting for a review

The draft with what it changes against the version it was made on, who may approve it and the reviews so far.

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

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

pipelineId*string
Formatuuid
draftId*string
Formatuuid

Response Body

The draft.

application/json
  1. response
yaml*string

The draft's graph as pipeline.yaml, which the diff against baseYaml shows.

baseYaml*string

The graph of the version the draft was made on, as pipeline.yaml.

approverGroups*array<>

Who may approve, row by row, with the people in each.

number*integer

The draft's number among the pipeline's drafts.

graph?|

The graph the draft proposes, for a draft of the graph; null for a draft of the settings.

id*string
Formatuuid
pipelineId*string
Formatuuid
kind*string
Value in"graph""settings"
source?string

What made the draft when it was not a person's edit, such as preset:<id>.

changes*array<>

What the draft changes against the version it was made on.

approvers*array<string>

Who may approve it, as the rules stood when the draft was made.

basedOn*integer

The version the change was made on.

summary*string
createdBy*
createdAt*string
Formatdate-time
state*string
Value in"open""approved""declined""superseded""withdrawn"
version?|

The version an approved draft became.

reviews*array<>
Example Request
curl -X GET 'https://wardn.example.com/api/v1/pipelines/497f6eca-6276-4993-bfeb-53cbbbba6f08/drafts/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "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"    }  ]}