Skip to main content
POST
/
hub
/
workflows
Create a new workflow
curl --request POST \
  --url https://api.quiva.ai/hub/workflows \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "MyWorkflow",
  "collection": "ms.hub.config.collection.workflow.1234567890",
  "description": "A workflow that processes data",
  "config": {
    "nodes": [
      {
        "data": {
          "id": "start",
          "name": "Start",
          "node_type": "map",
          "payload": {
            "message": "Start of workflow"
          }
        }
      },
      {
        "data": {
          "id": "process",
          "name": "Process",
          "node_type": "function",
          "subject": "quiva-function.process-function",
          "payload": {
            "input": "{start}"
          }
        }
      }
    ],
    "edges": [
      {
        "source": "start",
        "target": "process",
        "id": "edge1"
      }
    ],
    "result": "process"
  }
}
'
{
"subject": "ms.hub.config.workflow.draft.1234567890.98765432",
"name": "MyWorkflow",
"collection": "ms.hub.config.collection.workflow.1234567890",
"description": "A workflow that processes data",
"config": {
"nodes": [
{
"data": {
"id": "start",
"name": "Start",
"node_type": "map",
"payload": {
"message": "Start of workflow"
}
}
},
{
"data": {
"id": "process",
"name": "Process",
"node_type": "function",
"subject": "quiva-function.process-function",
"payload": {
"input": "{start}"
}
}
}
],
"edges": [
{
"source": "start",
"target": "process",
"id": "edge1"
}
],
"result": "process"
},
"modified": 1651395678
}

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme

Body

application/json
name
string
required

Name of the workflow

collection
string
required

Subject of the collection this workflow belongs to

description
string

Optional description of the workflow

config
object

Response

Workflow created successfully

subject
string

Subject identifier for the workflow

name
string

Name of the workflow

collection
string

Subject of the collection this workflow belongs to

description
string

Description of the workflow

config
object
modified
integer

Timestamp of last modification