跳转到主要内容
POST
/
base
/
{baseId}
/
workflow
/
{workflowId}
/
logic
cURL
curl --request POST \
  --url http://127.0.0.1:3000/api/base/{baseId}/workflow/{workflowId}/logic \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "parentNodeId": "<string>",
  "type": "condition",
  "name": "<string>",
  "description": "<string>",
  "config": "<unknown>"
}
'
{
  "logic": {
    "config": {
      "conditions": {}
    },
    "id": "<string>",
    "category": "logic",
    "type": "condition",
    "name": "<string>",
    "description": "<string>",
    "testResult": {
      "createdTime": "<string>",
      "spent": 123,
      "inputRaw": "<unknown>",
      "outputRaw": "<unknown>",
      "inputVariables": {},
      "outputVariables": {},
      "errorMsg": "<string>"
    },
    "outputVariables": {},
    "inputVariables": {},
    "createdTime": "<string>",
    "lastModifiedTime": "<string>"
  },
  "controls": [
    {
      "config": {
        "sourceNodeId": "<string>"
      },
      "id": "<string>",
      "category": "control",
      "type": "conditionEnd",
      "name": "<string>",
      "createdTime": "<string>",
      "lastModifiedTime": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json
parentNodeId
string
required

witch node this the parent, if not provided, it is a root node

type
enum<string>
required

type of logic

可用选项:
condition,
Repeat
name
string

name of the node

description
string

description of the node

config
any | null

node configuration

Response

201 - application/json

Successful created

logic
object
required
controls
object[]
required

workflow control nodes, contains the logic branch and the end node