Projects
Update workflow
Renames a project workflow, replaces its pipeline and/or when it runs (on).
PATCH
/
api
/
projects
/
{id}
/
workflows
/
{bindingId}
Update workflow
curl --request PATCH \
--url https://{baseUrl}/api/v1/api/projects/{id}/workflows/{bindingId} \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://{baseUrl}/api/v1/api/projects/{id}/workflows/{bindingId}"
payload = {}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://{baseUrl}/api/v1/api/projects/{id}/workflows/{bindingId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{baseUrl}/api/v1/api/projects/{id}/workflows/{bindingId}"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PATCH", 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))
}{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"projectId": "<string>",
"workflow": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"content": {
"jobs": {},
"name": "<string>",
"on": {
"target": [
"<string>"
],
"schedule": [
{
"cron": "0 2 * * 1"
}
],
"assetsAdded": {
"windowMinutes": 720,
"maxAssets": 2500.5,
"targetTypes": [
"<string>"
]
}
}
},
"filePath": "<string>",
"isCanDelete": true,
"isCanEdit": true
},
"workflowId": "<string>",
"triggers": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"projectWorkflowId": "<string>",
"type": "cron",
"config": {
"windowMinutes": 720,
"maxAssets": 2500.5,
"targetTypes": [
"<string>"
]
},
"enabled": true,
"cron": "<string>",
"lastFiredAt": "2023-11-07T05:31:56Z"
}
],
"lastRun": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"totalJobs": 123,
"status": "pending",
"workflowName": "<string>",
"jobHistoryName": "<string>",
"jobRunType": "manual"
}
}Body
application/json
⌘I
Update workflow
curl --request PATCH \
--url https://{baseUrl}/api/v1/api/projects/{id}/workflows/{bindingId} \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://{baseUrl}/api/v1/api/projects/{id}/workflows/{bindingId}"
payload = {}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://{baseUrl}/api/v1/api/projects/{id}/workflows/{bindingId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{baseUrl}/api/v1/api/projects/{id}/workflows/{bindingId}"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PATCH", 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))
}{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"projectId": "<string>",
"workflow": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"content": {
"jobs": {},
"name": "<string>",
"on": {
"target": [
"<string>"
],
"schedule": [
{
"cron": "0 2 * * 1"
}
],
"assetsAdded": {
"windowMinutes": 720,
"maxAssets": 2500.5,
"targetTypes": [
"<string>"
]
}
}
},
"filePath": "<string>",
"isCanDelete": true,
"isCanEdit": true
},
"workflowId": "<string>",
"triggers": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"projectWorkflowId": "<string>",
"type": "cron",
"config": {
"windowMinutes": 720,
"maxAssets": 2500.5,
"targetTypes": [
"<string>"
]
},
"enabled": true,
"cron": "<string>",
"lastFiredAt": "2023-11-07T05:31:56Z"
}
],
"lastRun": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"totalJobs": 123,
"status": "pending",
"workflowName": "<string>",
"jobHistoryName": "<string>",
"jobRunType": "manual"
}
}