Update workflow
PUT
/api/v1/workflows/{id}
const url = 'https://dashboard.justcrawl.io/api/v1/workflows/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","dag":{"nodes":[{"id":"example","type":"entry","config":{}}],"edges":[{"id":"example","from":"example","to":"example","type":"default"}]}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://dashboard.justcrawl.io/api/v1/workflows/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "dag": { "nodes": [ { "id": "example", "type": "entry", "config": {} } ], "edges": [ { "id": "example", "from": "example", "to": "example", "type": "default" } ] } }'Update a workflow (creates a new version). Returns 400 if the workflow is a smart workflow.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
The workflow ID.
Request Body required
Section titled “Request Body required ” Media type application/json
object
name
required
string
dag
required
object
nodes
required
Array<object>
object
id
required
string
type
required
string
config
object
edges
required
Array<object>
object
id
required
string
from
required
string
to
required
string
type
required
string
Responses
Section titled “ Responses ”The updated workflow.
Media type application/json
object
workflowId
string format: uuid
name
string
status
string
version
integer
route
string
dag
object
nodes
required
Array<object>
object
id
required
string
type
required
string
config
object
edges
required
Array<object>
object
id
required
string
from
required
string
to
required
string
type
required
string
costPerThousand
number
smart
object
strategy
string
mode
string
domain
string
hasPendingSuggestion
boolean
createdAt
string format: date-time
Example
{ "status": "draft", "dag": { "nodes": [ { "type": "entry" } ], "edges": [ { "type": "default" } ] }, "smart": { "strategy": "success", "mode": "auto" }}Smart workflow cannot be edited directly. Clone it first.
Workflow not found.