curl --request PATCH \
--url https://api.example.com/api/chat/workspaces/{workspace_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<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/workspaces/{workspace_id}"
payload = {
"name": "<string>",
"description": "<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({
name: '<string>',
description: '<string>',
instructions: '<string>',
defaults: {
trino_catalog: '<string>',
trino_schema: '<string>',
datahub_domain: '<string>',
decisions_workspace: '<string>'
}
})
};
fetch('https://api.example.com/api/chat/workspaces/{workspace_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/workspaces/{workspace_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([
'name' => '<string>',
'description' => '<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/workspaces/{workspace_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<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/workspaces/{workspace_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<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/workspaces/{workspace_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 \"name\": \"<string>\",\n \"description\": \"<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>",
"name": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"your_role": "owner",
"description": "<string>",
"instructions": "<string>",
"defaults": {
"trino_catalog": "<string>",
"trino_schema": "<string>",
"datahub_domain": "<string>",
"decisions_workspace": "<string>"
}
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"error": "<string>",
"code": 500
}Change a chat workspace's details or its standing context
Owners only. Omitted fields are left alone; an empty description or empty instructions clear them. instructions and defaults are inherited by every chat in the workspace.
curl --request PATCH \
--url https://api.example.com/api/chat/workspaces/{workspace_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<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/workspaces/{workspace_id}"
payload = {
"name": "<string>",
"description": "<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({
name: '<string>',
description: '<string>',
instructions: '<string>',
defaults: {
trino_catalog: '<string>',
trino_schema: '<string>',
datahub_domain: '<string>',
decisions_workspace: '<string>'
}
})
};
fetch('https://api.example.com/api/chat/workspaces/{workspace_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/workspaces/{workspace_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([
'name' => '<string>',
'description' => '<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/workspaces/{workspace_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<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/workspaces/{workspace_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<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/workspaces/{workspace_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 \"name\": \"<string>\",\n \"description\": \"<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>",
"name": "<string>",
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"your_role": "owner",
"description": "<string>",
"instructions": "<string>",
"defaults": {
"trino_catalog": "<string>",
"trino_schema": "<string>",
"datahub_domain": "<string>",
"decisions_workspace": "<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 a workspace or change its description. Omitted fields stay.
Send an empty description to clear it.
New name.
1 - 100New description; empty clears it.
500Standing 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 workspace, with your role in it.
Workspace ID.
Display name.
Who created it.
When it was created.
When its details last changed.
Your highest role in it, directly or through a realm role.
owner, editor, viewer What it's for.
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 workspace.
Show child attributes
Show child attributes
Was this page helpful?

