Update a ticket integration
curl --request PUT \
--url https://sreagent.app/api/v1/config/ticket_integrations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_email": "<string>",
"api_token": "<string>",
"auth_url": "<string>",
"auto_file": true,
"base_url": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"create_project_id": "<string>",
"create_sprint_id": "<string>",
"create_team_id": "<string>",
"enabled": true,
"issue_type": "<string>",
"project_key": "<string>",
"refresh_token": "<string>"
}
'import requests
url = "https://sreagent.app/api/v1/config/ticket_integrations/{id}"
payload = {
"account_email": "<string>",
"api_token": "<string>",
"auth_url": "<string>",
"auto_file": True,
"base_url": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"create_project_id": "<string>",
"create_sprint_id": "<string>",
"create_team_id": "<string>",
"enabled": True,
"issue_type": "<string>",
"project_key": "<string>",
"refresh_token": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_email: '<string>',
api_token: '<string>',
auth_url: '<string>',
auto_file: true,
base_url: '<string>',
client_id: '<string>',
client_secret: '<string>',
create_project_id: '<string>',
create_sprint_id: '<string>',
create_team_id: '<string>',
enabled: true,
issue_type: '<string>',
project_key: '<string>',
refresh_token: '<string>'
})
};
fetch('https://sreagent.app/api/v1/config/ticket_integrations/{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://sreagent.app/api/v1/config/ticket_integrations/{id}",
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([
'account_email' => '<string>',
'api_token' => '<string>',
'auth_url' => '<string>',
'auto_file' => true,
'base_url' => '<string>',
'client_id' => '<string>',
'client_secret' => '<string>',
'create_project_id' => '<string>',
'create_sprint_id' => '<string>',
'create_team_id' => '<string>',
'enabled' => true,
'issue_type' => '<string>',
'project_key' => '<string>',
'refresh_token' => '<string>'
]),
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://sreagent.app/api/v1/config/ticket_integrations/{id}"
payload := strings.NewReader("{\n \"account_email\": \"<string>\",\n \"api_token\": \"<string>\",\n \"auth_url\": \"<string>\",\n \"auto_file\": true,\n \"base_url\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"create_project_id\": \"<string>\",\n \"create_sprint_id\": \"<string>\",\n \"create_team_id\": \"<string>\",\n \"enabled\": true,\n \"issue_type\": \"<string>\",\n \"project_key\": \"<string>\",\n \"refresh_token\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://sreagent.app/api/v1/config/ticket_integrations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_email\": \"<string>\",\n \"api_token\": \"<string>\",\n \"auth_url\": \"<string>\",\n \"auto_file\": true,\n \"base_url\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"create_project_id\": \"<string>\",\n \"create_sprint_id\": \"<string>\",\n \"create_team_id\": \"<string>\",\n \"enabled\": true,\n \"issue_type\": \"<string>\",\n \"project_key\": \"<string>\",\n \"refresh_token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sreagent.app/api/v1/config/ticket_integrations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_email\": \"<string>\",\n \"api_token\": \"<string>\",\n \"auth_url\": \"<string>\",\n \"auto_file\": true,\n \"base_url\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"create_project_id\": \"<string>\",\n \"create_sprint_id\": \"<string>\",\n \"create_team_id\": \"<string>\",\n \"enabled\": true,\n \"issue_type\": \"<string>\",\n \"project_key\": \"<string>\",\n \"refresh_token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"message": "<string>"
}ticket_integrations
Update a ticket integration
Save this organization’s credentials for one ticket system, one row per provider. Zoho Sprints authenticates with client_id, client_secret and refresh_token against auth_url; Jira with account_email and api_token. Only the fields you send change, an omitted secret keeps the stored one, and the board columns are mapped with set_ticket_status_map rather than here.
PUT
/
ticket_integrations
/
{id}
Update a ticket integration
curl --request PUT \
--url https://sreagent.app/api/v1/config/ticket_integrations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_email": "<string>",
"api_token": "<string>",
"auth_url": "<string>",
"auto_file": true,
"base_url": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"create_project_id": "<string>",
"create_sprint_id": "<string>",
"create_team_id": "<string>",
"enabled": true,
"issue_type": "<string>",
"project_key": "<string>",
"refresh_token": "<string>"
}
'import requests
url = "https://sreagent.app/api/v1/config/ticket_integrations/{id}"
payload = {
"account_email": "<string>",
"api_token": "<string>",
"auth_url": "<string>",
"auto_file": True,
"base_url": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"create_project_id": "<string>",
"create_sprint_id": "<string>",
"create_team_id": "<string>",
"enabled": True,
"issue_type": "<string>",
"project_key": "<string>",
"refresh_token": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_email: '<string>',
api_token: '<string>',
auth_url: '<string>',
auto_file: true,
base_url: '<string>',
client_id: '<string>',
client_secret: '<string>',
create_project_id: '<string>',
create_sprint_id: '<string>',
create_team_id: '<string>',
enabled: true,
issue_type: '<string>',
project_key: '<string>',
refresh_token: '<string>'
})
};
fetch('https://sreagent.app/api/v1/config/ticket_integrations/{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://sreagent.app/api/v1/config/ticket_integrations/{id}",
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([
'account_email' => '<string>',
'api_token' => '<string>',
'auth_url' => '<string>',
'auto_file' => true,
'base_url' => '<string>',
'client_id' => '<string>',
'client_secret' => '<string>',
'create_project_id' => '<string>',
'create_sprint_id' => '<string>',
'create_team_id' => '<string>',
'enabled' => true,
'issue_type' => '<string>',
'project_key' => '<string>',
'refresh_token' => '<string>'
]),
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://sreagent.app/api/v1/config/ticket_integrations/{id}"
payload := strings.NewReader("{\n \"account_email\": \"<string>\",\n \"api_token\": \"<string>\",\n \"auth_url\": \"<string>\",\n \"auto_file\": true,\n \"base_url\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"create_project_id\": \"<string>\",\n \"create_sprint_id\": \"<string>\",\n \"create_team_id\": \"<string>\",\n \"enabled\": true,\n \"issue_type\": \"<string>\",\n \"project_key\": \"<string>\",\n \"refresh_token\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://sreagent.app/api/v1/config/ticket_integrations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_email\": \"<string>\",\n \"api_token\": \"<string>\",\n \"auth_url\": \"<string>\",\n \"auto_file\": true,\n \"base_url\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"create_project_id\": \"<string>\",\n \"create_sprint_id\": \"<string>\",\n \"create_team_id\": \"<string>\",\n \"enabled\": true,\n \"issue_type\": \"<string>\",\n \"project_key\": \"<string>\",\n \"refresh_token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sreagent.app/api/v1/config/ticket_integrations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_email\": \"<string>\",\n \"api_token\": \"<string>\",\n \"auth_url\": \"<string>\",\n \"auto_file\": true,\n \"base_url\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"create_project_id\": \"<string>\",\n \"create_sprint_id\": \"<string>\",\n \"create_team_id\": \"<string>\",\n \"enabled\": true,\n \"issue_type\": \"<string>\",\n \"project_key\": \"<string>\",\n \"refresh_token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"message": "<string>"
}Authorizations
Body
application/json
Response
Updated.
Was this page helpful?