Get workflow variable catalog
curl --request POST \
--url https://api.pineyard.ai/workflows/variable-catalog \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"definition": {
"definitionVersion": 1,
"nodes": [
{
"id": "start",
"type": "start",
"position": {
"x": 0,
"y": 0
},
"data": {}
},
{
"id": "end_ok",
"type": "end",
"position": {
"x": 0,
"y": 1
},
"data": {
"label": "Done"
}
}
],
"edges": [
{
"id": "e1",
"source": "start",
"target": "end_ok"
}
]
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
definition: {
definitionVersion: 1,
nodes: [
{id: 'start', type: 'start', position: {x: 0, y: 0}, data: {}},
{id: 'end_ok', type: 'end', position: {x: 0, y: 1}, data: {label: 'Done'}}
],
edges: [{id: 'e1', source: 'start', target: 'end_ok'}]
}
})
};
fetch('https://api.pineyard.ai/workflows/variable-catalog', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/workflows/variable-catalog"
payload = { "definition": {
"definitionVersion": 1,
"nodes": [
{
"id": "start",
"type": "start",
"position": {
"x": 0,
"y": 0
},
"data": {}
},
{
"id": "end_ok",
"type": "end",
"position": {
"x": 0,
"y": 1
},
"data": { "label": "Done" }
}
],
"edges": [
{
"id": "e1",
"source": "start",
"target": "end_ok"
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"triggerInput": {
"name": "<string>",
"type": "string",
"description": "<string>",
"allowedValues": [
"<string>"
],
"open": true,
"children": "<array>"
},
"producers": [
{
"nodeId": "<string>",
"label": "<string>",
"output": {
"name": "<string>",
"type": "string",
"description": "<string>",
"allowedValues": [
"<string>"
],
"open": true,
"children": "<array>"
}
}
],
"availabilityByNode": {},
"conditionOperatorsByType": {}
}{
"error": "invalid_body",
"issues": [
null
]
}{
"error": "workflow_invalid",
"details": [
"<string>"
]
}Workflows
Get workflow variable catalog
Typed variables available to a workflow definition: trigger inputs and the outputs of earlier steps.
POST
/
workflows
/
variable-catalog
Get workflow variable catalog
curl --request POST \
--url https://api.pineyard.ai/workflows/variable-catalog \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"definition": {
"definitionVersion": 1,
"nodes": [
{
"id": "start",
"type": "start",
"position": {
"x": 0,
"y": 0
},
"data": {}
},
{
"id": "end_ok",
"type": "end",
"position": {
"x": 0,
"y": 1
},
"data": {
"label": "Done"
}
}
],
"edges": [
{
"id": "e1",
"source": "start",
"target": "end_ok"
}
]
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
definition: {
definitionVersion: 1,
nodes: [
{id: 'start', type: 'start', position: {x: 0, y: 0}, data: {}},
{id: 'end_ok', type: 'end', position: {x: 0, y: 1}, data: {label: 'Done'}}
],
edges: [{id: 'e1', source: 'start', target: 'end_ok'}]
}
})
};
fetch('https://api.pineyard.ai/workflows/variable-catalog', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/workflows/variable-catalog"
payload = { "definition": {
"definitionVersion": 1,
"nodes": [
{
"id": "start",
"type": "start",
"position": {
"x": 0,
"y": 0
},
"data": {}
},
{
"id": "end_ok",
"type": "end",
"position": {
"x": 0,
"y": 1
},
"data": { "label": "Done" }
}
],
"edges": [
{
"id": "e1",
"source": "start",
"target": "end_ok"
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"triggerInput": {
"name": "<string>",
"type": "string",
"description": "<string>",
"allowedValues": [
"<string>"
],
"open": true,
"children": "<array>"
},
"producers": [
{
"nodeId": "<string>",
"label": "<string>",
"output": {
"name": "<string>",
"type": "string",
"description": "<string>",
"allowedValues": [
"<string>"
],
"open": true,
"children": "<array>"
}
}
],
"availabilityByNode": {},
"conditionOperatorsByType": {}
}{
"error": "invalid_body",
"issues": [
null
]
}{
"error": "workflow_invalid",
"details": [
"<string>"
]
}Required scope:
workflows.view
Requires workflows enabled for your workspace. Otherwise the request is refused; see Errors.
Authorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Body
application/json
Opaque workflow definition JSON object. Graph validation is performed by the workflow validator.
Show child attributes
Show child attributes
Example:
{
"definitionVersion": 1,
"nodes": [
{
"id": "start",
"type": "start",
"position": { "x": 0, "y": 0 },
"data": {}
},
{
"id": "end_ok",
"type": "end",
"position": { "x": 0, "y": 1 },
"data": { "label": "Done" }
}
],
"edges": [
{
"id": "e1",
"source": "start",
"target": "end_ok"
}
]
}

