Update the trigger of a revision
curl --request PATCH \
--url https://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/trigger \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filters": {
"data": [
{
"comparator": "=",
"path": {
"source": "5b0f7c3e-6d0a-4c5e-9a57-2f1f0c1e8d4a",
"type": "trigger",
"value": "{{ $.project.uid }}"
},
"type": "string",
"value": [
"aBcD1234"
]
}
],
"dataLogicalOperator": "and"
},
"name": "On project created"
}
'import requests
url = "https://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/trigger"
payload = {
"filters": {
"data": [
{
"comparator": "=",
"path": {
"source": "5b0f7c3e-6d0a-4c5e-9a57-2f1f0c1e8d4a",
"type": "trigger",
"value": "{{ $.project.uid }}"
},
"type": "string",
"value": ["aBcD1234"]
}
],
"dataLogicalOperator": "and"
},
"name": "On project created"
}
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({
filters: {
data: [
{
comparator: '=',
path: {
source: '5b0f7c3e-6d0a-4c5e-9a57-2f1f0c1e8d4a',
type: 'trigger',
value: '{{ $.project.uid }}'
},
type: 'string',
value: ['aBcD1234']
}
],
dataLogicalOperator: 'and'
},
name: 'On project created'
})
};
fetch('https://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/trigger', 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}/trigger",
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([
'filters' => [
'data' => [
[
'comparator' => '=',
'path' => [
'source' => '5b0f7c3e-6d0a-4c5e-9a57-2f1f0c1e8d4a',
'type' => 'trigger',
'value' => '{{ $.project.uid }}'
],
'type' => 'string',
'value' => [
'aBcD1234'
]
]
],
'dataLogicalOperator' => 'and'
],
'name' => 'On project created'
]),
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}/trigger"
payload := strings.NewReader("{\n \"filters\": {\n \"data\": [\n {\n \"comparator\": \"=\",\n \"path\": {\n \"source\": \"5b0f7c3e-6d0a-4c5e-9a57-2f1f0c1e8d4a\",\n \"type\": \"trigger\",\n \"value\": \"{{ $.project.uid }}\"\n },\n \"type\": \"string\",\n \"value\": [\n \"aBcD1234\"\n ]\n }\n ],\n \"dataLogicalOperator\": \"and\"\n },\n \"name\": \"On project created\"\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}/trigger")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filters\": {\n \"data\": [\n {\n \"comparator\": \"=\",\n \"path\": {\n \"source\": \"5b0f7c3e-6d0a-4c5e-9a57-2f1f0c1e8d4a\",\n \"type\": \"trigger\",\n \"value\": \"{{ $.project.uid }}\"\n },\n \"type\": \"string\",\n \"value\": [\n \"aBcD1234\"\n ]\n }\n ],\n \"dataLogicalOperator\": \"and\"\n },\n \"name\": \"On project created\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/trigger")
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 \"filters\": {\n \"data\": [\n {\n \"comparator\": \"=\",\n \"path\": {\n \"source\": \"5b0f7c3e-6d0a-4c5e-9a57-2f1f0c1e8d4a\",\n \"type\": \"trigger\",\n \"value\": \"{{ $.project.uid }}\"\n },\n \"type\": \"string\",\n \"value\": [\n \"aBcD1234\"\n ]\n }\n ],\n \"dataLogicalOperator\": \"and\"\n },\n \"name\": \"On project created\"\n}"
response = http.request(request)
puts response.read_body{
"filters": {
"data": [
{
"comparator": "=",
"path": {
"source": "5b0f7c3e-6d0a-4c5e-9a57-2f1f0c1e8d4a",
"type": "trigger",
"value": "{{ $.project.uid }}"
},
"type": "string",
"value": [
"aBcD1234"
]
}
],
"dataLogicalOperator": "and"
},
"id": "5b0f7c3e-6d0a-4c5e-9a57-2f1f0c1e8d4a",
"input_parameters": {},
"name": "On project created",
"source": {
"operation_id": "project.created",
"provider": "tms"
},
"webhook_url": null
}Revision trigger
Update the trigger of a revision
Changes only the attributes you send; the rest keep their current values. filters: null removes the filters. Send source to bind the trigger to another event.
PATCH
/
orchestrator
/
api
/
v1
/
workflows
/
{workflow_id}
/
revisions
/
{revision_id}
/
trigger
Update the trigger of a revision
curl --request PATCH \
--url https://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/trigger \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filters": {
"data": [
{
"comparator": "=",
"path": {
"source": "5b0f7c3e-6d0a-4c5e-9a57-2f1f0c1e8d4a",
"type": "trigger",
"value": "{{ $.project.uid }}"
},
"type": "string",
"value": [
"aBcD1234"
]
}
],
"dataLogicalOperator": "and"
},
"name": "On project created"
}
'import requests
url = "https://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/trigger"
payload = {
"filters": {
"data": [
{
"comparator": "=",
"path": {
"source": "5b0f7c3e-6d0a-4c5e-9a57-2f1f0c1e8d4a",
"type": "trigger",
"value": "{{ $.project.uid }}"
},
"type": "string",
"value": ["aBcD1234"]
}
],
"dataLogicalOperator": "and"
},
"name": "On project created"
}
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({
filters: {
data: [
{
comparator: '=',
path: {
source: '5b0f7c3e-6d0a-4c5e-9a57-2f1f0c1e8d4a',
type: 'trigger',
value: '{{ $.project.uid }}'
},
type: 'string',
value: ['aBcD1234']
}
],
dataLogicalOperator: 'and'
},
name: 'On project created'
})
};
fetch('https://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/trigger', 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}/trigger",
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([
'filters' => [
'data' => [
[
'comparator' => '=',
'path' => [
'source' => '5b0f7c3e-6d0a-4c5e-9a57-2f1f0c1e8d4a',
'type' => 'trigger',
'value' => '{{ $.project.uid }}'
],
'type' => 'string',
'value' => [
'aBcD1234'
]
]
],
'dataLogicalOperator' => 'and'
],
'name' => 'On project created'
]),
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}/trigger"
payload := strings.NewReader("{\n \"filters\": {\n \"data\": [\n {\n \"comparator\": \"=\",\n \"path\": {\n \"source\": \"5b0f7c3e-6d0a-4c5e-9a57-2f1f0c1e8d4a\",\n \"type\": \"trigger\",\n \"value\": \"{{ $.project.uid }}\"\n },\n \"type\": \"string\",\n \"value\": [\n \"aBcD1234\"\n ]\n }\n ],\n \"dataLogicalOperator\": \"and\"\n },\n \"name\": \"On project created\"\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}/trigger")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filters\": {\n \"data\": [\n {\n \"comparator\": \"=\",\n \"path\": {\n \"source\": \"5b0f7c3e-6d0a-4c5e-9a57-2f1f0c1e8d4a\",\n \"type\": \"trigger\",\n \"value\": \"{{ $.project.uid }}\"\n },\n \"type\": \"string\",\n \"value\": [\n \"aBcD1234\"\n ]\n }\n ],\n \"dataLogicalOperator\": \"and\"\n },\n \"name\": \"On project created\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.phrase.com/orchestrator/api/v1/workflows/{workflow_id}/revisions/{revision_id}/trigger")
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 \"filters\": {\n \"data\": [\n {\n \"comparator\": \"=\",\n \"path\": {\n \"source\": \"5b0f7c3e-6d0a-4c5e-9a57-2f1f0c1e8d4a\",\n \"type\": \"trigger\",\n \"value\": \"{{ $.project.uid }}\"\n },\n \"type\": \"string\",\n \"value\": [\n \"aBcD1234\"\n ]\n }\n ],\n \"dataLogicalOperator\": \"and\"\n },\n \"name\": \"On project created\"\n}"
response = http.request(request)
puts response.read_body{
"filters": {
"data": [
{
"comparator": "=",
"path": {
"source": "5b0f7c3e-6d0a-4c5e-9a57-2f1f0c1e8d4a",
"type": "trigger",
"value": "{{ $.project.uid }}"
},
"type": "string",
"value": [
"aBcD1234"
]
}
],
"dataLogicalOperator": "and"
},
"id": "5b0f7c3e-6d0a-4c5e-9a57-2f1f0c1e8d4a",
"input_parameters": {},
"name": "On project created",
"source": {
"operation_id": "project.created",
"provider": "tms"
},
"webhook_url": null
}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
Attributes to update
Request body for updating a revision's trigger. Only the attributes you send change, and each one replaces the stored value. When source changes, the resulting input_parameters and filters must be valid for the newly bound event, so replace them in the same request if needed.
Response
OK
The trigger configured on a revision, including its full configuration.
Was this page helpful?