curl --request PATCH \
--url https://api.example.com/api/chat/threads/{thread_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"instructions": "<string>",
"defaults": {
"trino_catalog": "<string>",
"trino_schema": "<string>",
"datahub_domain": "<string>",
"decisions_workspace": "<string>"
}
}
'import requests
url = "https://api.example.com/api/chat/threads/{thread_id}"
payload = {
"title": "<string>",
"instructions": "<string>",
"defaults": {
"trino_catalog": "<string>",
"trino_schema": "<string>",
"datahub_domain": "<string>",
"decisions_workspace": "<string>"
}
}
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({
title: '<string>',
instructions: '<string>',
defaults: {
trino_catalog: '<string>',
trino_schema: '<string>',
datahub_domain: '<string>',
decisions_workspace: '<string>'
}
})
};
fetch('https://api.example.com/api/chat/threads/{thread_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://api.example.com/api/chat/threads/{thread_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([
'title' => '<string>',
'instructions' => '<string>',
'defaults' => [
'trino_catalog' => '<string>',
'trino_schema' => '<string>',
'datahub_domain' => '<string>',
'decisions_workspace' => '<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://api.example.com/api/chat/threads/{thread_id}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"instructions\": \"<string>\",\n \"defaults\": {\n \"trino_catalog\": \"<string>\",\n \"trino_schema\": \"<string>\",\n \"datahub_domain\": \"<string>\",\n \"decisions_workspace\": \"<string>\"\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.example.com/api/chat/threads/{thread_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"instructions\": \"<string>\",\n \"defaults\": {\n \"trino_catalog\": \"<string>\",\n \"trino_schema\": \"<string>\",\n \"datahub_domain\": \"<string>\",\n \"decisions_workspace\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/chat/threads/{thread_id}")
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 \"title\": \"<string>\",\n \"instructions\": \"<string>\",\n \"defaults\": {\n \"trino_catalog\": \"<string>\",\n \"trino_schema\": \"<string>\",\n \"datahub_domain\": \"<string>\",\n \"decisions_workspace\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "regular",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"can_post": true,
"can_manage": true,
"can_share": true,
"title": "<string>",
"workspace_id": "<string>",
"instructions": "<string>",
"defaults": {
"trino_catalog": "<string>",
"trino_schema": "<string>",
"datahub_domain": "<string>",
"decisions_workspace": "<string>"
},
"subject": {
"type": "dataeng_query",
"id": "<string>",
"label": "<string>"
}
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"error": "<string>",
"code": 500
}Rename or archive a chat thread, or set its standing context
Whoever started the thread, or a workspace owner. Omitted fields are left alone. instructions and defaults are added to the workspace’s, never replacing them, and cannot change which tools exist or which need approval.
curl --request PATCH \
--url https://api.example.com/api/chat/threads/{thread_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"instructions": "<string>",
"defaults": {
"trino_catalog": "<string>",
"trino_schema": "<string>",
"datahub_domain": "<string>",
"decisions_workspace": "<string>"
}
}
'import requests
url = "https://api.example.com/api/chat/threads/{thread_id}"
payload = {
"title": "<string>",
"instructions": "<string>",
"defaults": {
"trino_catalog": "<string>",
"trino_schema": "<string>",
"datahub_domain": "<string>",
"decisions_workspace": "<string>"
}
}
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({
title: '<string>',
instructions: '<string>',
defaults: {
trino_catalog: '<string>',
trino_schema: '<string>',
datahub_domain: '<string>',
decisions_workspace: '<string>'
}
})
};
fetch('https://api.example.com/api/chat/threads/{thread_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://api.example.com/api/chat/threads/{thread_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([
'title' => '<string>',
'instructions' => '<string>',
'defaults' => [
'trino_catalog' => '<string>',
'trino_schema' => '<string>',
'datahub_domain' => '<string>',
'decisions_workspace' => '<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://api.example.com/api/chat/threads/{thread_id}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"instructions\": \"<string>\",\n \"defaults\": {\n \"trino_catalog\": \"<string>\",\n \"trino_schema\": \"<string>\",\n \"datahub_domain\": \"<string>\",\n \"decisions_workspace\": \"<string>\"\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.example.com/api/chat/threads/{thread_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"instructions\": \"<string>\",\n \"defaults\": {\n \"trino_catalog\": \"<string>\",\n \"trino_schema\": \"<string>\",\n \"datahub_domain\": \"<string>\",\n \"decisions_workspace\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/chat/threads/{thread_id}")
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 \"title\": \"<string>\",\n \"instructions\": \"<string>\",\n \"defaults\": {\n \"trino_catalog\": \"<string>\",\n \"trino_schema\": \"<string>\",\n \"datahub_domain\": \"<string>\",\n \"decisions_workspace\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "regular",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"can_post": true,
"can_manage": true,
"can_share": true,
"title": "<string>",
"workspace_id": "<string>",
"instructions": "<string>",
"defaults": {
"trino_catalog": "<string>",
"trino_schema": "<string>",
"datahub_domain": "<string>",
"decisions_workspace": "<string>"
},
"subject": {
"type": "dataeng_query",
"id": "<string>",
"label": "<string>"
}
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"error": "<string>",
"code": 500
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Body
Rename, archive or unarchive a thread. Omitted fields are left alone.
New title.
1 - 200Archive or restore the thread.
regular, archived Standing instructions for the assistant, as Markdown. Added to the base prompt, never replacing it, and added to rather than replacing any the workspace sets. Cannot change which tools exist or which need approval. Empty clears them.
4000Replaces the pinned defaults; send an empty object to clear them.
Show child attributes
Show child attributes
Response
Successful Response
A chat thread as the thread list shows it, with what you may do with it.
Thread ID.
Active or archived.
regular, archived When the thread was created.
Last activity in the thread.
Who started the thread.
Whether you can send messages in it.
Whether you can rename, archive or delete it.
Whether you can create share links for it.
Display title; null until the first message.
The workspace the thread belongs to; null for a personal thread.
Standing instructions for the assistant, as Markdown. Added to the base prompt, never replacing it, and added to rather than replacing any the workspace sets. Cannot change which tools exist or which need approval.
What the assistant reaches for first in this thread.
Show child attributes
Show child attributes
The item this thread is about, if it is bound to one.
Show child attributes
Show child attributes
Was this page helpful?

