Get Chat Session
curl --request GET \
--url https://cloud.onyx.app/api/chat/get-chat-session/{session_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://cloud.onyx.app/api/chat/get-chat-session/{session_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://cloud.onyx.app/api/chat/get-chat-session/{session_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://cloud.onyx.app/api/chat/get-chat-session/{session_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://cloud.onyx.app/api/chat/get-chat-session/{session_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cloud.onyx.app/api/chat/get-chat-session/{session_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.onyx.app/api/chat/get-chat-session/{session_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"chat_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"persona_name": "<string>",
"personal_icon_name": "<string>",
"messages": [
{
"message_id": 123,
"message": "<string>",
"time_sent": "2023-11-07T05:31:56Z",
"files": [
{
"id": "<string>",
"name": "<string>",
"user_file_id": "<string>"
}
],
"chat_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_message": 123,
"latest_child_message": 123,
"reasoning_tokens": "<string>",
"context_docs": [
{
"document_id": "<string>",
"chunk_ind": 123,
"semantic_identifier": "<string>",
"blurb": "<string>",
"boost": 123,
"hidden": true,
"metadata": {},
"match_highlights": [
"<string>"
],
"db_doc_id": 123,
"link": "<string>",
"score": 0,
"is_relevant": true,
"relevance_explanation": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"primary_owners": [
"<string>"
],
"secondary_owners": [
"<string>"
],
"is_internet": false
}
],
"citations": {},
"error": "<string>",
"current_feedback": "<string>"
}
],
"time_created": "2023-11-07T05:31:56Z",
"current_alternate_model": "<string>",
"current_temperature_override": 123,
"packets": [
[
{
"placement": {
"turn_index": 123,
"tab_index": 0,
"sub_turn_index": 123
},
"obj": {
"type": "stop",
"stop_reason": "<string>"
}
}
]
],
"persona_id": 123,
"deleted": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Chat
Get Chat Session
GET
/
chat
/
get-chat-session
/
{session_id}
Get Chat Session
curl --request GET \
--url https://cloud.onyx.app/api/chat/get-chat-session/{session_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://cloud.onyx.app/api/chat/get-chat-session/{session_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://cloud.onyx.app/api/chat/get-chat-session/{session_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://cloud.onyx.app/api/chat/get-chat-session/{session_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://cloud.onyx.app/api/chat/get-chat-session/{session_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cloud.onyx.app/api/chat/get-chat-session/{session_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.onyx.app/api/chat/get-chat-session/{session_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"chat_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"persona_name": "<string>",
"personal_icon_name": "<string>",
"messages": [
{
"message_id": 123,
"message": "<string>",
"time_sent": "2023-11-07T05:31:56Z",
"files": [
{
"id": "<string>",
"name": "<string>",
"user_file_id": "<string>"
}
],
"chat_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_message": 123,
"latest_child_message": 123,
"reasoning_tokens": "<string>",
"context_docs": [
{
"document_id": "<string>",
"chunk_ind": 123,
"semantic_identifier": "<string>",
"blurb": "<string>",
"boost": 123,
"hidden": true,
"metadata": {},
"match_highlights": [
"<string>"
],
"db_doc_id": 123,
"link": "<string>",
"score": 0,
"is_relevant": true,
"relevance_explanation": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"primary_owners": [
"<string>"
],
"secondary_owners": [
"<string>"
],
"is_internet": false
}
],
"citations": {},
"error": "<string>",
"current_feedback": "<string>"
}
],
"time_created": "2023-11-07T05:31:56Z",
"current_alternate_model": "<string>",
"current_temperature_override": 123,
"packets": [
[
{
"placement": {
"turn_index": 123,
"tab_index": 0,
"sub_turn_index": 123
},
"obj": {
"type": "stop",
"stop_reason": "<string>"
}
}
]
],
"persona_id": 123,
"deleted": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Authorization header with Bearer token
Path Parameters
Response
Successful Response
Show child attributes
Show child attributes
Available options:
public, private Show child attributes
Show child attributes
⌘I