Update a ticket
curl --request PATCH \
--url {schemes}://api.upsun.com/tickets/{ticket_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"collaborator_ids": [
"<string>"
],
"collaborators_replace": null
}
'import requests
url = "{schemes}://api.upsun.com/tickets/{ticket_id}"
payload = {
"collaborator_ids": ["<string>"],
"collaborators_replace": None
}
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({collaborator_ids: ['<string>'], collaborators_replace: null})
};
fetch('{schemes}://api.upsun.com/tickets/{ticket_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 => "{schemes}://api.upsun.com/tickets/{ticket_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([
'collaborator_ids' => [
'<string>'
],
'collaborators_replace' => null
]),
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 := "{schemes}://api.upsun.com/tickets/{ticket_id}"
payload := strings.NewReader("{\n \"collaborator_ids\": [\n \"<string>\"\n ],\n \"collaborators_replace\": null\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("{schemes}://api.upsun.com/tickets/{ticket_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"collaborator_ids\": [\n \"<string>\"\n ],\n \"collaborators_replace\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("{schemes}://api.upsun.com/tickets/{ticket_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"collaborator_ids\": [\n \"<string>\"\n ],\n \"collaborators_replace\": null\n}"
response = http.request(request)
puts response.read_body{
"ticket_id": 123,
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"type": "problem",
"subject": "<string>",
"description": "<string>",
"priority": "low",
"followup_tid": "<string>",
"status": "closed",
"recipient": "<string>",
"requester_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"submitter_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assignee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "<string>",
"collaborator_ids": [
"<string>"
],
"has_incidents": true,
"due": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"subscription_id": "<string>",
"ticket_group": "<string>",
"support_plan": "<string>",
"affected_url": "<string>",
"queue": "<string>",
"issue_type": "<string>",
"resolution_time": "2023-11-07T05:31:56Z",
"response_time": "2023-11-07T05:31:56Z",
"project_url": "<string>",
"region": "<string>",
"category": "access",
"environment": "env_development",
"ticket_sharing_status": "ts_sent_to_platform",
"application_ticket_url": "<string>",
"infrastructure_ticket_url": "<string>",
"jira": [
{
"id": 123,
"ticket_id": 123,
"issue_id": 123,
"issue_key": "<string>",
"created_at": 123,
"updated_at": 123
}
],
"zd_ticket_url": "<string>"
}Support
Update a ticket
PATCH
/
tickets
/
{ticket_id}
Update a ticket
curl --request PATCH \
--url {schemes}://api.upsun.com/tickets/{ticket_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"collaborator_ids": [
"<string>"
],
"collaborators_replace": null
}
'import requests
url = "{schemes}://api.upsun.com/tickets/{ticket_id}"
payload = {
"collaborator_ids": ["<string>"],
"collaborators_replace": None
}
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({collaborator_ids: ['<string>'], collaborators_replace: null})
};
fetch('{schemes}://api.upsun.com/tickets/{ticket_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 => "{schemes}://api.upsun.com/tickets/{ticket_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([
'collaborator_ids' => [
'<string>'
],
'collaborators_replace' => null
]),
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 := "{schemes}://api.upsun.com/tickets/{ticket_id}"
payload := strings.NewReader("{\n \"collaborator_ids\": [\n \"<string>\"\n ],\n \"collaborators_replace\": null\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("{schemes}://api.upsun.com/tickets/{ticket_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"collaborator_ids\": [\n \"<string>\"\n ],\n \"collaborators_replace\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("{schemes}://api.upsun.com/tickets/{ticket_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"collaborator_ids\": [\n \"<string>\"\n ],\n \"collaborators_replace\": null\n}"
response = http.request(request)
puts response.read_body{
"ticket_id": 123,
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"type": "problem",
"subject": "<string>",
"description": "<string>",
"priority": "low",
"followup_tid": "<string>",
"status": "closed",
"recipient": "<string>",
"requester_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"submitter_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assignee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "<string>",
"collaborator_ids": [
"<string>"
],
"has_incidents": true,
"due": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"subscription_id": "<string>",
"ticket_group": "<string>",
"support_plan": "<string>",
"affected_url": "<string>",
"queue": "<string>",
"issue_type": "<string>",
"resolution_time": "2023-11-07T05:31:56Z",
"response_time": "2023-11-07T05:31:56Z",
"project_url": "<string>",
"region": "<string>",
"category": "access",
"environment": "env_development",
"ticket_sharing_status": "ts_sent_to_platform",
"application_ticket_url": "<string>",
"infrastructure_ticket_url": "<string>",
"jira": [
{
"id": 123,
"ticket_id": 123,
"issue_id": 123,
"issue_key": "<string>",
"created_at": 123,
"updated_at": 123
}
],
"zd_ticket_url": "<string>"
}Authorizations
Body
application/json
Response
Success.
The support ticket object.
Was this page helpful?