Saltar al contenido principal
POST
/
v1
/
workflow
/
{flow_id}
/
branch
/
move
Move a branch
import requests

url = "https://api.diga.io/v1/workflow/{flow_id}/branch/move"

payload = {
    "stepName": "<string>",
    "branchIndex": 123,
    "newIndex": 123
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "id": "<string>",
  "created": "2023-11-07T05:31:56Z",
  "updated": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "trigger": {
    "name": "<string>",
    "type": "<string>",
    "valid": true,
    "displayName": "<string>",
    "settings": {
      "pieceName": "<string>",
      "pieceVersion": "<string>",
      "triggerName": "<string>",
      "input": {},
      "propertySettings": {},
      "sampleData": {}
    },
    "nextAction": {
      "name": "<string>",
      "type": "<string>",
      "valid": true,
      "displayName": "<string>",
      "skip": true,
      "settings": {
        "pieceName": "<string>",
        "pieceVersion": "<string>",
        "actionName": "<string>",
        "triggerName": "<string>",
        "input": {},
        "propertySettings": {},
        "sampleData": {},
        "branches": [
          {}
        ],
        "executionType": "<string>"
      },
      "children": [
        "<unknown>"
      ],
      "nextAction": null
    }
  },
  "produced_variables": [
    "<string>"
  ],
  "consumed_variables": [
    "<string>"
  ]
}

Autorizaciones

Authorization
string
header
requerido

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Parámetros de ruta

flow_id
string
requerido

Cuerpo

application/json

Request to move a branch to a different position.

stepName
string
requerido

Router step name

branchIndex
integer
requerido

Current index of the branch

newIndex
integer
requerido

New position for the branch

Respuesta

Successful Response

Flow response.

id
string
requerido
created
string<date-time>
requerido
updated
string<date-time>
requerido
name
string | null
status
enum<string> | null
Opciones disponibles:
ENABLED,
DISABLED
flow_category
enum<string> | null
Opciones disponibles:
post_call,
during_call,
pre_call,
call_launcher,
empty
trigger
TriggerResponse · object | null

Trigger definition.

produced_variables
string[]
consumed_variables
string[]