Publish Template
Put a graph on the shelf the team starts from. Any graph, yours or not — it is copied and stays where it is — and publishing the same one again refreshes its template in place.
POST
/api/v1/graphs/{graph_id}/templateAuthorization
AuthorizationBearer token · headerrequiredor
AuthorizationOAuth2 access token · headerrequiredPath parameters
graph_idstringrequiredRequest body
requiredapplication/jsonnamestringrequiredmin length 1 · max length 200
descriptionstringdefault: ""
Responses
200Successful Response
successbooleandefault: true
dataNodeGraph | anyShow propertiesHide properties
Any of:
NodeGraph
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
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/template" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": ""
}'const response = await fetch("/api/v1/graphs/string/template", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "string",
"description": ""
})
});import requests
response = requests.post(
"/api/v1/graphs/string/template",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"name": "string",
"description": ""
},
)Response
{
"success": true,
"data": {
"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"
},
"message": "string",
"errors": [
"string"
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}