Update Workflow
curl --request PUT \
--url https://{tenant_id}.api.useago.com/api/v1/workflows/{workflow_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"revision": 2,
"name": "<string>",
"description": "<string>",
"draft": {
"nodes": [
{
"id": "<string>",
"type": "<string>",
"version": 1,
"name": "",
"config": {},
"position": {
"x": 123,
"y": 123
}
}
],
"edges": [
{
"source": "<string>",
"target": "<string>",
"port": "next"
}
],
"input_schema": {},
"execution": "async"
},
"allowed_agent_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://{tenant_id}.api.useago.com/api/v1/workflows/{workflow_id}"
payload = {
"revision": 2,
"name": "<string>",
"description": "<string>",
"draft": {
"nodes": [
{
"id": "<string>",
"type": "<string>",
"version": 1,
"name": "",
"config": {},
"position": {
"x": 123,
"y": 123
}
}
],
"edges": [
{
"source": "<string>",
"target": "<string>",
"port": "next"
}
],
"input_schema": {},
"execution": "async"
},
"allowed_agent_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
revision: 2,
name: '<string>',
description: '<string>',
draft: {
nodes: [
{
id: '<string>',
type: '<string>',
version: 1,
name: '',
config: {},
position: {x: 123, y: 123}
}
],
edges: [{source: '<string>', target: '<string>', port: 'next'}],
input_schema: {},
execution: 'async'
},
allowed_agent_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://{tenant_id}.api.useago.com/api/v1/workflows/{workflow_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Workflows
Update Workflow
PUT
/
api
/
v1
/
workflows
/
{workflow_id}
Update Workflow
curl --request PUT \
--url https://{tenant_id}.api.useago.com/api/v1/workflows/{workflow_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"revision": 2,
"name": "<string>",
"description": "<string>",
"draft": {
"nodes": [
{
"id": "<string>",
"type": "<string>",
"version": 1,
"name": "",
"config": {},
"position": {
"x": 123,
"y": 123
}
}
],
"edges": [
{
"source": "<string>",
"target": "<string>",
"port": "next"
}
],
"input_schema": {},
"execution": "async"
},
"allowed_agent_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://{tenant_id}.api.useago.com/api/v1/workflows/{workflow_id}"
payload = {
"revision": 2,
"name": "<string>",
"description": "<string>",
"draft": {
"nodes": [
{
"id": "<string>",
"type": "<string>",
"version": 1,
"name": "",
"config": {},
"position": {
"x": 123,
"y": 123
}
}
],
"edges": [
{
"source": "<string>",
"target": "<string>",
"port": "next"
}
],
"input_schema": {},
"execution": "async"
},
"allowed_agent_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
revision: 2,
name: '<string>',
description: '<string>',
draft: {
nodes: [
{
id: '<string>',
type: '<string>',
version: 1,
name: '',
config: {},
position: {x: 123, y: 123}
}
],
edges: [{source: '<string>', target: '<string>', port: 'next'}],
input_schema: {},
execution: 'async'
},
allowed_agent_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://{tenant_id}.api.useago.com/api/v1/workflows/{workflow_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Authorizations
Path Parameters
Body
application/json
Current revision from get_workflow; a stale revision returns a conflict.
Required range:
x >= 1Required string length:
1 - 160Maximum string length:
2000Full replacement graph when provided.
Show child attributes
Show child attributes
Maximum array length:
100Response
200
OK
