Update Workflow
curl --request PUT \
--url https://platform.unstructuredapp.io/api/v1/workflows/{workflow_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destination_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow_nodes": [
{
"name": "<string>",
"type": "<string>",
"subtype": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"settings": {}
}
],
"template_id": "<string>",
"reprocess_all": true
}
'import requests
url = "https://platform.unstructuredapp.io/api/v1/workflows/{workflow_id}"
payload = {
"name": "<string>",
"source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destination_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow_nodes": [
{
"name": "<string>",
"type": "<string>",
"subtype": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"settings": {}
}
],
"template_id": "<string>",
"reprocess_all": True
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
source_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
destination_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
workflow_nodes: [
{
name: '<string>',
type: '<string>',
subtype: '<string>',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
settings: {}
}
],
template_id: '<string>',
reprocess_all: true
})
};
fetch('https://platform.unstructuredapp.io/api/v1/workflows/{workflow_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.unstructuredapp.io/api/v1/workflows/{workflow_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'source_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'destination_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'workflow_nodes' => [
[
'name' => '<string>',
'type' => '<string>',
'subtype' => '<string>',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'settings' => [
]
]
],
'template_id' => '<string>',
'reprocess_all' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.unstructuredapp.io/api/v1/workflows/{workflow_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"source_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"destination_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workflow_nodes\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"subtype\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"settings\": {}\n }\n ],\n \"template_id\": \"<string>\",\n \"reprocess_all\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://platform.unstructuredapp.io/api/v1/workflows/{workflow_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"source_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"destination_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workflow_nodes\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"subtype\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"settings\": {}\n }\n ],\n \"template_id\": \"<string>\",\n \"reprocess_all\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.unstructuredapp.io/api/v1/workflows/{workflow_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"source_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"destination_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workflow_nodes\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"subtype\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"settings\": {}\n }\n ],\n \"template_id\": \"<string>\",\n \"reprocess_all\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"sources": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"destinations": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"workflow_nodes": [
{
"name": "<string>",
"type": "<string>",
"subtype": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"settings": {}
}
],
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"workflow_type": "basic",
"schedule": {
"crontab_entries": [
{
"cron_expression": "0 0 * * *"
}
]
},
"updated_at": "2023-11-07T05:31:56Z",
"reprocess_all": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}workflows
Update Workflow
Update an existing workflow’s name, connectors, schedule, or workflow type.
PUT
/
api
/
v1
/
workflows
/
{workflow_id}
Update Workflow
curl --request PUT \
--url https://platform.unstructuredapp.io/api/v1/workflows/{workflow_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destination_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow_nodes": [
{
"name": "<string>",
"type": "<string>",
"subtype": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"settings": {}
}
],
"template_id": "<string>",
"reprocess_all": true
}
'import requests
url = "https://platform.unstructuredapp.io/api/v1/workflows/{workflow_id}"
payload = {
"name": "<string>",
"source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destination_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow_nodes": [
{
"name": "<string>",
"type": "<string>",
"subtype": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"settings": {}
}
],
"template_id": "<string>",
"reprocess_all": True
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
source_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
destination_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
workflow_nodes: [
{
name: '<string>',
type: '<string>',
subtype: '<string>',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
settings: {}
}
],
template_id: '<string>',
reprocess_all: true
})
};
fetch('https://platform.unstructuredapp.io/api/v1/workflows/{workflow_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.unstructuredapp.io/api/v1/workflows/{workflow_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'source_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'destination_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'workflow_nodes' => [
[
'name' => '<string>',
'type' => '<string>',
'subtype' => '<string>',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'settings' => [
]
]
],
'template_id' => '<string>',
'reprocess_all' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.unstructuredapp.io/api/v1/workflows/{workflow_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"source_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"destination_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workflow_nodes\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"subtype\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"settings\": {}\n }\n ],\n \"template_id\": \"<string>\",\n \"reprocess_all\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://platform.unstructuredapp.io/api/v1/workflows/{workflow_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"source_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"destination_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workflow_nodes\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"subtype\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"settings\": {}\n }\n ],\n \"template_id\": \"<string>\",\n \"reprocess_all\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.unstructuredapp.io/api/v1/workflows/{workflow_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"source_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"destination_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workflow_nodes\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"subtype\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"settings\": {}\n }\n ],\n \"template_id\": \"<string>\",\n \"reprocess_all\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"sources": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"destinations": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"workflow_nodes": [
{
"name": "<string>",
"type": "<string>",
"subtype": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"settings": {}
}
],
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"workflow_type": "basic",
"schedule": {
"crontab_entries": [
{
"cron_expression": "0 0 * * *"
}
]
},
"updated_at": "2023-11-07T05:31:56Z",
"reprocess_all": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
Path Parameters
Body
application/json
Available options:
basic, advanced, platinum, custom Show child attributes
Show child attributes
Available options:
every 15 minutes, every hour, every 2 hours, every 4 hours, every 6 hours, every 8 hours, every 10 hours, every 12 hours, daily, weekly, monthly Response
Successful Response
Show child attributes
Show child attributes
Available options:
active, inactive Available options:
basic, advanced, platinum, custom Show child attributes
Show child attributes
Example:
{
"crontab_entries": [{ "cron_expression": "0 0 * * *" }]
}
Was this page helpful?

