Skip to content
Kumquat
Esc
↑↓navigate↵open⌘Jpreview

Add Graph To Task

Put an existing canvas to work on another task: a draft instance pointed at that task’s records, with nothing spent until somebody runs it.

The other half of from-template. The graph is untouched and can be anybody’s — the instance is the caller’s own, which is what lets one canvas serve several tasks without stranding either.

POST/api/v1/graphs/{graph_id}/for-task
Authorization
AuthorizationBearer token · headerrequired
or
AuthorizationOAuth2 access token · headerrequired
Path parameters
graph_idstringrequired
Request body
requiredapplication/json
task_idstringrequired
min length 1
Responses
201Successful Response
successboolean
default: true
dataTemplateGraphResult | any
Show properties
Any of:
TemplateGraphResult
graphNodeGraphrequired
Show properties
idstring
namestringrequired
descriptionstring
default: ""
definitionobject
ui_stateobject
forked_fromstring | any
Show properties
Any of:
string
string
any
any
templateboolean
default: false
owner_idstringrequired
created_atstring<date-time>
updated_atstring<date-time>
deleted_atstring<date-time> | any
Show properties
Any of:
string<date-time>
string<date-time>
any
any
run_idstring | any
Show properties
Any of:
string
string
any
any
any
any
messagestring | any
Show properties
Any of:
string
string
any
any
errorsstring[] | any
Show properties
Any of:
string[]
Array of string
string
any
any
422Validation Error
detailValidationError[]
Show properties
Array of ValidationError
locstring | integer[]required
Show properties
Array of string | integer
Any of:
string
string
integer
integer
msgstringrequired
typestringrequired
inputany
ctxobject
Request
curl -X POST "/api/v1/graphs/string/for-task" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "task_id": "string"
}'
Response
{
  "success": true,
  "data": {
    "graph": {
      "id": "string",
      "name": "string",
      "description": "",
      "definition": {},
      "ui_state": {},
      "forked_from": "string",
      "template": false,
      "owner_id": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "deleted_at": "2019-08-24T14:15:22Z"
    },
    "run_id": "string"
  },
  "message": "string",
  "errors": [
    "string"
  ]
}