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-taskAuthorization
AuthorizationBearer token · headerrequiredor
AuthorizationOAuth2 access token · headerrequiredPath parameters
graph_idstringrequiredRequest body
requiredapplication/jsontask_idstringrequiredmin length 1
Responses
201Successful Response
successbooleandefault: true
dataTemplateGraphResult | anyShow propertiesHide properties
Any of:
TemplateGraphResult
graphNodeGraphrequiredShow propertiesHide properties
idstringnamestringrequireddescriptionstringdefault: ""
definitionobjectui_stateobjectforked_fromstring | anyShow propertiesHide properties
Any of:
string
stringany
anytemplatebooleandefault: false
owner_idstringrequiredcreated_atstring<date-time>updated_atstring<date-time>deleted_atstring<date-time> | anyShow propertiesHide properties
Any of:
string<date-time>
string<date-time>any
anyrun_idstring | anyShow propertiesHide properties
Any of:
string
stringany
anyany
anymessagestring | anyShow propertiesHide properties
Any of:
string
stringany
anyerrorsstring[] | anyShow propertiesHide properties
Any of:
string[]
Array of
stringstringany
any422Validation Error
detailValidationError[]Show propertiesHide properties
Array of
ValidationErrorlocstring | integer[]requiredShow propertiesHide properties
Array of
string | integerAny of:
string
stringinteger
integermsgstringrequiredtypestringrequiredinputanyctxobjectRequest
curl -X POST "/api/v1/graphs/string/for-task" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"task_id": "string"
}'const response = await fetch("/api/v1/graphs/string/for-task", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"task_id": "string"
})
});import requests
response = requests.post(
"/api/v1/graphs/string/for-task",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"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"
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}