Update a dependency
curl --request PATCH \
--url https://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/dependencies/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target_task_id": "66666666-7777-4888-8999-aaaaaaaaaaaa"
}
'import requests
url = "https://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/dependencies/{id}"
payload = { "target_task_id": "66666666-7777-4888-8999-aaaaaaaaaaaa" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({target_task_id: '66666666-7777-4888-8999-aaaaaaaaaaaa'})
};
fetch('https://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/dependencies/{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://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/dependencies/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'target_task_id' => '66666666-7777-4888-8999-aaaaaaaaaaaa'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/dependencies/{id}"
payload := strings.NewReader("{\n \"target_task_id\": \"66666666-7777-4888-8999-aaaaaaaaaaaa\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/dependencies/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"target_task_id\": \"66666666-7777-4888-8999-aaaaaaaaaaaa\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/dependencies/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"target_task_id\": \"66666666-7777-4888-8999-aaaaaaaaaaaa\"\n}"
response = http.request(request)
puts response.read_body{
"id": "a1b2c3d4-e5f6-4789-a0b1-c2d3e4f5a6b7",
"source_task_id": "11111111-2222-4333-8444-555555555555",
"target_task_id": "66666666-7777-4888-8999-aaaaaaaaaaaa"
}Revision dependencies
Update a dependency
Repoints a dependency. source_task_id and target_task_id may be sent independently; an omitted endpoint keeps its current value. Repointing replaces the dependency, so the response carries a new id and the old one returns 404.
PATCH
/
orchestrator
/
api
/
v1
/
workflows
/
{workflow_id}
/
revisions
/
{revision_id}
/
dependencies
/
{id}
Update a dependency
curl --request PATCH \
--url https://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/dependencies/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target_task_id": "66666666-7777-4888-8999-aaaaaaaaaaaa"
}
'import requests
url = "https://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/dependencies/{id}"
payload = { "target_task_id": "66666666-7777-4888-8999-aaaaaaaaaaaa" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({target_task_id: '66666666-7777-4888-8999-aaaaaaaaaaaa'})
};
fetch('https://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/dependencies/{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://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/dependencies/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'target_task_id' => '66666666-7777-4888-8999-aaaaaaaaaaaa'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/dependencies/{id}"
payload := strings.NewReader("{\n \"target_task_id\": \"66666666-7777-4888-8999-aaaaaaaaaaaa\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/dependencies/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"target_task_id\": \"66666666-7777-4888-8999-aaaaaaaaaaaa\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/dependencies/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"target_task_id\": \"66666666-7777-4888-8999-aaaaaaaaaaaa\"\n}"
response = http.request(request)
puts response.read_body{
"id": "a1b2c3d4-e5f6-4789-a0b1-c2d3e4f5a6b7",
"source_task_id": "11111111-2222-4333-8444-555555555555",
"target_task_id": "66666666-7777-4888-8999-aaaaaaaaaaaa"
}Authorizations
A Phrase Platform JWT issued for Orchestrator, sent as Authorization: Bearer <JWT>. See Authentication and access for how to obtain one.
Path Parameters
Body
application/json
The endpoints to change
Response
OK
A directed dependency in a revision's execution graph: source_task_id runs before target_task_id.
Was this page helpful?