Agents
Update an agent trigger
Update an agent trigger configuration or enabled state.
PATCH
/
v1
/
agents
/
{agentId}
/
triggers
/
{triggerId}
TypeScript SDK
import Tembo from '@tembo-io/sdk';
const client = new Tembo();
const trigger = await client.agents.triggers.update('7c9e6679-7425-40de-944b-e07fc1f90ae7', {
agentId: '7c9e6679-7425-40de-944b-e07fc1f90ae7',
name: 'x',
});curl --request PATCH \
--url https://api.tembo.io/v1/agents/{agentId}/triggers/{triggerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"integrationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filters": {
"projects": [
"<string>"
],
"boards": [
"<string>"
],
"statuses": [
"<string>"
],
"assignedTo": [
"<string>"
],
"labels": [
"<string>"
],
"includeNewIssues": true
}
}
'import requests
url = "https://api.tembo.io/v1/agents/{agentId}/triggers/{triggerId}"
payload = {
"name": "<string>",
"integrationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filters": {
"projects": ["<string>"],
"boards": ["<string>"],
"statuses": ["<string>"],
"assignedTo": ["<string>"],
"labels": ["<string>"],
"includeNewIssues": True
}
}
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({
name: '<string>',
integrationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
filters: {
projects: ['<string>'],
boards: ['<string>'],
statuses: ['<string>'],
assignedTo: ['<string>'],
labels: ['<string>'],
includeNewIssues: true
}
})
};
fetch('https://api.tembo.io/v1/agents/{agentId}/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.tembo.io/v1/agents/{agentId}/triggers/{triggerId}",
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([
'name' => '<string>',
'integrationId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'filters' => [
'projects' => [
'<string>'
],
'boards' => [
'<string>'
],
'statuses' => [
'<string>'
],
'assignedTo' => [
'<string>'
],
'labels' => [
'<string>'
],
'includeNewIssues' => true
]
]),
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://api.tembo.io/v1/agents/{agentId}/triggers/{triggerId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"integrationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"filters\": {\n \"projects\": [\n \"<string>\"\n ],\n \"boards\": [\n \"<string>\"\n ],\n \"statuses\": [\n \"<string>\"\n ],\n \"assignedTo\": [\n \"<string>\"\n ],\n \"labels\": [\n \"<string>\"\n ],\n \"includeNewIssues\": true\n }\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://api.tembo.io/v1/agents/{agentId}/triggers/{triggerId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"integrationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"filters\": {\n \"projects\": [\n \"<string>\"\n ],\n \"boards\": [\n \"<string>\"\n ],\n \"statuses\": [\n \"<string>\"\n ],\n \"assignedTo\": [\n \"<string>\"\n ],\n \"labels\": [\n \"<string>\"\n ],\n \"includeNewIssues\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tembo.io/v1/agents/{agentId}/triggers/{triggerId}")
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 \"name\": \"<string>\",\n \"integrationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"filters\": {\n \"projects\": [\n \"<string>\"\n ],\n \"boards\": [\n \"<string>\"\n ],\n \"statuses\": [\n \"<string>\"\n ],\n \"assignedTo\": [\n \"<string>\"\n ],\n \"labels\": [\n \"<string>\"\n ],\n \"includeNewIssues\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"triggerName": "<string>",
"enabledAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"triggerDisplayName": "<string>",
"integrationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"integrationType": "<string>",
"filters": {
"projects": [
"<string>"
],
"boards": [
"<string>"
],
"statuses": [
"<string>"
],
"assignedTo": [
"<string>"
],
"labels": [
"<string>"
],
"includeNewIssues": true
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Required string length:
1 - 200Conditions that determine whether the selected integration event starts the agent. Available fields depend on the integration and event type.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
- Option 18
- Option 19
- Option 20
- Option 21
- Option 22
- Option 23
- Option 24
- Option 25
- Option 26
- Option 27
- Option 28
- Option 29
- Option 30
- Option 31
- Option 32
- Option 33
- Option 34
- Option 35
- Option 36
- Option 37
- Option 38
- Option 39
- Option 40
- Option 41
Show child attributes
Show child attributes
Response
Update an agent trigger
Required string length:
1 - 200Conditions that determine whether the selected integration event starts the agent. Available fields depend on the integration and event type.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
- Option 18
- Option 19
- Option 20
- Option 21
- Option 22
- Option 23
- Option 24
- Option 25
- Option 26
- Option 27
- Option 28
- Option 29
- Option 30
- Option 31
- Option 32
- Option 33
- Option 34
- Option 35
- Option 36
- Option 37
- Option 38
- Option 39
- Option 40
- Option 41
Show child attributes
Show child attributes
Was this page helpful?
⌘I
TypeScript SDK
import Tembo from '@tembo-io/sdk';
const client = new Tembo();
const trigger = await client.agents.triggers.update('7c9e6679-7425-40de-944b-e07fc1f90ae7', {
agentId: '7c9e6679-7425-40de-944b-e07fc1f90ae7',
name: 'x',
});curl --request PATCH \
--url https://api.tembo.io/v1/agents/{agentId}/triggers/{triggerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"integrationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filters": {
"projects": [
"<string>"
],
"boards": [
"<string>"
],
"statuses": [
"<string>"
],
"assignedTo": [
"<string>"
],
"labels": [
"<string>"
],
"includeNewIssues": true
}
}
'import requests
url = "https://api.tembo.io/v1/agents/{agentId}/triggers/{triggerId}"
payload = {
"name": "<string>",
"integrationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filters": {
"projects": ["<string>"],
"boards": ["<string>"],
"statuses": ["<string>"],
"assignedTo": ["<string>"],
"labels": ["<string>"],
"includeNewIssues": True
}
}
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({
name: '<string>',
integrationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
filters: {
projects: ['<string>'],
boards: ['<string>'],
statuses: ['<string>'],
assignedTo: ['<string>'],
labels: ['<string>'],
includeNewIssues: true
}
})
};
fetch('https://api.tembo.io/v1/agents/{agentId}/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.tembo.io/v1/agents/{agentId}/triggers/{triggerId}",
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([
'name' => '<string>',
'integrationId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'filters' => [
'projects' => [
'<string>'
],
'boards' => [
'<string>'
],
'statuses' => [
'<string>'
],
'assignedTo' => [
'<string>'
],
'labels' => [
'<string>'
],
'includeNewIssues' => true
]
]),
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://api.tembo.io/v1/agents/{agentId}/triggers/{triggerId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"integrationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"filters\": {\n \"projects\": [\n \"<string>\"\n ],\n \"boards\": [\n \"<string>\"\n ],\n \"statuses\": [\n \"<string>\"\n ],\n \"assignedTo\": [\n \"<string>\"\n ],\n \"labels\": [\n \"<string>\"\n ],\n \"includeNewIssues\": true\n }\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://api.tembo.io/v1/agents/{agentId}/triggers/{triggerId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"integrationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"filters\": {\n \"projects\": [\n \"<string>\"\n ],\n \"boards\": [\n \"<string>\"\n ],\n \"statuses\": [\n \"<string>\"\n ],\n \"assignedTo\": [\n \"<string>\"\n ],\n \"labels\": [\n \"<string>\"\n ],\n \"includeNewIssues\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tembo.io/v1/agents/{agentId}/triggers/{triggerId}")
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 \"name\": \"<string>\",\n \"integrationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"filters\": {\n \"projects\": [\n \"<string>\"\n ],\n \"boards\": [\n \"<string>\"\n ],\n \"statuses\": [\n \"<string>\"\n ],\n \"assignedTo\": [\n \"<string>\"\n ],\n \"labels\": [\n \"<string>\"\n ],\n \"includeNewIssues\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"triggerName": "<string>",
"enabledAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"triggerDisplayName": "<string>",
"integrationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"integrationType": "<string>",
"filters": {
"projects": [
"<string>"
],
"boards": [
"<string>"
],
"statuses": [
"<string>"
],
"assignedTo": [
"<string>"
],
"labels": [
"<string>"
],
"includeNewIssues": true
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}