curl --request PUT \
--url https://api.extole.io/v6/jobs/{jobId}/triggers/{triggerId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"component_ids": [
"component_id"
],
"component_references": [
{
"component_id": "component_id",
"socket_names": [
"socket_name"
]
}
],
"directory_path": "directory_path",
"enabled": true,
"match_type": "EXACT",
"parent_job_id": "parent_job_id",
"pattern": "pattern",
"sftp_destination_id": "sftp_destination_id",
"trigger_type": "FILE_NAME_MATCHES"
}
'import requests
url = "https://api.extole.io/v6/jobs/{jobId}/triggers/{triggerId}"
payload = {
"component_ids": ["component_id"],
"component_references": [
{
"component_id": "component_id",
"socket_names": ["socket_name"]
}
],
"directory_path": "directory_path",
"enabled": True,
"match_type": "EXACT",
"parent_job_id": "parent_job_id",
"pattern": "pattern",
"sftp_destination_id": "sftp_destination_id",
"trigger_type": "FILE_NAME_MATCHES"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
component_ids: ['component_id'],
component_references: [{component_id: 'component_id', socket_names: ['socket_name']}],
directory_path: 'directory_path',
enabled: true,
match_type: 'EXACT',
parent_job_id: 'parent_job_id',
pattern: 'pattern',
sftp_destination_id: 'sftp_destination_id',
trigger_type: 'FILE_NAME_MATCHES'
})
};
fetch('https://api.extole.io/v6/jobs/{jobId}/triggers/{triggerId}', 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://api.extole.io/v6/jobs/{jobId}/triggers/{triggerId}",
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([
'component_ids' => [
'component_id'
],
'component_references' => [
[
'component_id' => 'component_id',
'socket_names' => [
'socket_name'
]
]
],
'directory_path' => 'directory_path',
'enabled' => true,
'match_type' => 'EXACT',
'parent_job_id' => 'parent_job_id',
'pattern' => 'pattern',
'sftp_destination_id' => 'sftp_destination_id',
'trigger_type' => 'FILE_NAME_MATCHES'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.extole.io/v6/jobs/{jobId}/triggers/{triggerId}"
payload := strings.NewReader("{\n \"component_ids\": [\n \"component_id\"\n ],\n \"component_references\": [\n {\n \"component_id\": \"component_id\",\n \"socket_names\": [\n \"socket_name\"\n ]\n }\n ],\n \"directory_path\": \"directory_path\",\n \"enabled\": true,\n \"match_type\": \"EXACT\",\n \"parent_job_id\": \"parent_job_id\",\n \"pattern\": \"pattern\",\n \"sftp_destination_id\": \"sftp_destination_id\",\n \"trigger_type\": \"FILE_NAME_MATCHES\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://api.extole.io/v6/jobs/{jobId}/triggers/{triggerId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"component_ids\": [\n \"component_id\"\n ],\n \"component_references\": [\n {\n \"component_id\": \"component_id\",\n \"socket_names\": [\n \"socket_name\"\n ]\n }\n ],\n \"directory_path\": \"directory_path\",\n \"enabled\": true,\n \"match_type\": \"EXACT\",\n \"parent_job_id\": \"parent_job_id\",\n \"pattern\": \"pattern\",\n \"sftp_destination_id\": \"sftp_destination_id\",\n \"trigger_type\": \"FILE_NAME_MATCHES\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v6/jobs/{jobId}/triggers/{triggerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"component_ids\": [\n \"component_id\"\n ],\n \"component_references\": [\n {\n \"component_id\": \"component_id\",\n \"socket_names\": [\n \"socket_name\"\n ]\n }\n ],\n \"directory_path\": \"directory_path\",\n \"enabled\": true,\n \"match_type\": \"EXACT\",\n \"parent_job_id\": \"parent_job_id\",\n \"pattern\": \"pattern\",\n \"sftp_destination_id\": \"sftp_destination_id\",\n \"trigger_type\": \"FILE_NAME_MATCHES\"\n}"
response = http.request(request)
puts response.read_body{
"component_ids": [
"<string>"
],
"component_references": [
{
"component_id": "<string>",
"socket_names": [
"<string>"
]
}
],
"enabled": true,
"id": "<string>",
"parent_job_id": "<string>",
"trigger_type": "FILE_NAME_MATCHES",
"directory_path": "<string>",
"match_type": "EXACT",
"pattern": "<string>",
"sftp_destination_id": "<string>"
}Update a trigger
Updates the trigger. The request trigger type must match the stored trigger.
Fields omitted from the body are left unchanged, except trigger_type, which the request schema marks required and which every request must send.
curl --request PUT \
--url https://api.extole.io/v6/jobs/{jobId}/triggers/{triggerId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"component_ids": [
"component_id"
],
"component_references": [
{
"component_id": "component_id",
"socket_names": [
"socket_name"
]
}
],
"directory_path": "directory_path",
"enabled": true,
"match_type": "EXACT",
"parent_job_id": "parent_job_id",
"pattern": "pattern",
"sftp_destination_id": "sftp_destination_id",
"trigger_type": "FILE_NAME_MATCHES"
}
'import requests
url = "https://api.extole.io/v6/jobs/{jobId}/triggers/{triggerId}"
payload = {
"component_ids": ["component_id"],
"component_references": [
{
"component_id": "component_id",
"socket_names": ["socket_name"]
}
],
"directory_path": "directory_path",
"enabled": True,
"match_type": "EXACT",
"parent_job_id": "parent_job_id",
"pattern": "pattern",
"sftp_destination_id": "sftp_destination_id",
"trigger_type": "FILE_NAME_MATCHES"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
component_ids: ['component_id'],
component_references: [{component_id: 'component_id', socket_names: ['socket_name']}],
directory_path: 'directory_path',
enabled: true,
match_type: 'EXACT',
parent_job_id: 'parent_job_id',
pattern: 'pattern',
sftp_destination_id: 'sftp_destination_id',
trigger_type: 'FILE_NAME_MATCHES'
})
};
fetch('https://api.extole.io/v6/jobs/{jobId}/triggers/{triggerId}', 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://api.extole.io/v6/jobs/{jobId}/triggers/{triggerId}",
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([
'component_ids' => [
'component_id'
],
'component_references' => [
[
'component_id' => 'component_id',
'socket_names' => [
'socket_name'
]
]
],
'directory_path' => 'directory_path',
'enabled' => true,
'match_type' => 'EXACT',
'parent_job_id' => 'parent_job_id',
'pattern' => 'pattern',
'sftp_destination_id' => 'sftp_destination_id',
'trigger_type' => 'FILE_NAME_MATCHES'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.extole.io/v6/jobs/{jobId}/triggers/{triggerId}"
payload := strings.NewReader("{\n \"component_ids\": [\n \"component_id\"\n ],\n \"component_references\": [\n {\n \"component_id\": \"component_id\",\n \"socket_names\": [\n \"socket_name\"\n ]\n }\n ],\n \"directory_path\": \"directory_path\",\n \"enabled\": true,\n \"match_type\": \"EXACT\",\n \"parent_job_id\": \"parent_job_id\",\n \"pattern\": \"pattern\",\n \"sftp_destination_id\": \"sftp_destination_id\",\n \"trigger_type\": \"FILE_NAME_MATCHES\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://api.extole.io/v6/jobs/{jobId}/triggers/{triggerId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"component_ids\": [\n \"component_id\"\n ],\n \"component_references\": [\n {\n \"component_id\": \"component_id\",\n \"socket_names\": [\n \"socket_name\"\n ]\n }\n ],\n \"directory_path\": \"directory_path\",\n \"enabled\": true,\n \"match_type\": \"EXACT\",\n \"parent_job_id\": \"parent_job_id\",\n \"pattern\": \"pattern\",\n \"sftp_destination_id\": \"sftp_destination_id\",\n \"trigger_type\": \"FILE_NAME_MATCHES\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v6/jobs/{jobId}/triggers/{triggerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"component_ids\": [\n \"component_id\"\n ],\n \"component_references\": [\n {\n \"component_id\": \"component_id\",\n \"socket_names\": [\n \"socket_name\"\n ]\n }\n ],\n \"directory_path\": \"directory_path\",\n \"enabled\": true,\n \"match_type\": \"EXACT\",\n \"parent_job_id\": \"parent_job_id\",\n \"pattern\": \"pattern\",\n \"sftp_destination_id\": \"sftp_destination_id\",\n \"trigger_type\": \"FILE_NAME_MATCHES\"\n}"
response = http.request(request)
puts response.read_body{
"component_ids": [
"<string>"
],
"component_references": [
{
"component_id": "<string>",
"socket_names": [
"<string>"
]
}
],
"enabled": true,
"id": "<string>",
"parent_job_id": "<string>",
"trigger_type": "FILE_NAME_MATCHES",
"directory_path": "<string>",
"match_type": "EXACT",
"pattern": "<string>",
"sftp_destination_id": "<string>"
}Path Parameters
Body
- FILE_NAME_MATCHES
- LANDS_IN_DIRECTORY
How the pattern is matched against filenames. A literal value or a buildtime expression resolved from component references when the trigger is saved. Buildtime expressions use JobBuildtimeContext.
EXACT, REGEX Filename pattern to match. A literal value or a buildtime expression resolved from component references when the trigger is saved. Buildtime expressions use JobBuildtimeContext.
Whether this trigger takes part in deciding when the job runs. A disabled trigger is ignored when a file arrives. A literal value or a buildtime expression resolved from component references when the trigger is saved; defaults to true when omitted on create. Buildtime expressions use JobBuildtimeContext.
Id of the job this trigger belongs to. A literal job id or a buildtime expression resolved from component references when the trigger is saved; when omitted the trigger belongs to the job in the request path. Buildtime expressions use JobBuildtimeContext.
Optional directory path prefix to match. A literal value or a buildtime expression resolved from component references when the trigger is saved. Buildtime expressions use JobBuildtimeContext.
Optional SFTP destination id to match. A literal value or a buildtime expression resolved from component references when the trigger is saved. Buildtime expressions use JobBuildtimeContext.
Response
Successful response
- FILE_NAME_MATCHES
- LANDS_IN_DIRECTORY
Stored trigger definition. Field enabled is unevaluated and appears in buildtime-evaluatable form.
Whether this trigger takes part in deciding when the job runs, as the buildtime expression or literal that was saved. Buildtime expressions use JobBuildtimeContext.
Id of the job this trigger belongs to, as the buildtime expression or literal that was saved. Buildtime expressions use JobBuildtimeContext.
Optional directory path prefix to match. Buildtime expressions use JobBuildtimeContext.
How the pattern is matched against filenames. A literal value or a buildtime expression resolved from component references when the trigger is saved. Buildtime expressions use JobBuildtimeContext.
EXACT, REGEX Filename pattern to match. A literal value or a buildtime expression resolved from component references when the trigger is saved. Buildtime expressions use JobBuildtimeContext.
Optional SFTP destination id to match. Buildtime expressions use JobBuildtimeContext.
Was this page helpful?
