Workflow Steps

Add a branch to a workflow step

POST/workflow-steps/{id}/branches

Adds one branch to a branched step, beside the others and rejoining the same step, and returns every branch. A branch whose name the step already has is not added again, and the call still returns 200. A step that is not branched returns 409 conflict. A taken label returns 422, as do classification_ids missing on a step that branches by classification or sent to one that branches by selection. It emits no webhook, and DELETE /workflow-steps/{id}/branches/{member_id} undoes it.

Path parameters

  • idstring (uuid)Required#

    The record's id.

Query parameters

  • dry_runboolean#

    Validate and run the call without committing it, returning what the real call would return with meta.dry_run set.

Headers

  • Idempotency-Keystring#

    Makes a retry safe. Send a new UUID for each new request and reuse it only to retry that request; the first response is replayed for 24 hours.

Request body

application/json, required · WorkflowStepBranchInput

  • labelstringRequired#

    The name people see.

  • namestring | null#

    The machine name. Defaults to custom_ and the label, as the app names steps.

  • classification_idsinteger[]#

    The classifications that send an investor down this branch. Required when the branched step branches by classification, and not allowed when it branches by selection.

{
  "label": "Accepted"
}

Responses

200

Every branch of the step.

WorkflowStepBranch[]
{
  "data": [
    {
      "id": "9a9d1c5e-4f2b-4c8e-9a7d-2f1e6b3c4d5a",
      "name": "string",
      "label": "string"
    }
  ]
}
401

Authentication failed. error.code is one of invalid_token, expired, revoked.

Error
403

Authorization failed. error.code is one of org_disabled, ip_blocked, missing_scope, scope_disabled, user_disabled.

Error
404

Resource not found (error.code = not_found).

Error
409

The request conflicts with existing state (error.code = conflict), e.g. a compliance flow with the requested name already exists.

Error
422

The request can't be processed (HTTP 422): validation_failed with one ErrorDetail per problem, or a code documented on the operation.

Error
429

Rate limit exceeded (error.code = rate_limited).

Error

Examples

curl -X POST https://your-org-domain/kong/core/api/v2/workflow-steps/{id}/branches\
  -H "Authorization: Bearer $HELM_API_KEY"\
  -H "Content-Type: application/json"\
  -d '{
  "label": "Accepted"
}'