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

Create Graph From Template

The canvas a task starts with: its template, already pointed at the task and at whatever creative the task came off, so the run that fills its cards needs nothing picked.

Always a new graph, so a template is a clean copy of itself rather than whichever fork the caller happens to own. Putting an existing canvas to work on a task is POST /graphs/{graph_id}/for-task. Declared above /graphs/{graph_id}, which would shadow it.

POST/api/v1/graphs/from-template
Authorization
AuthorizationBearer token · headerrequired
or
AuthorizationOAuth2 access token · headerrequired
Request body
requiredapplication/json
templatestringrequired
min length 1
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/from-template" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "template": "string",
  "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"
  ]
}