Skip to main content
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
string
header
required

Authorization header with Bearer token

Path Parameters

session_id
string<uuid>
required

Query Parameters

is_shared
boolean
default:false
include_deleted
boolean
default:false

Response

Successful Response

chat_session_id
string<uuid>
required
description
string | null
required
persona_name
string | null
required
personal_icon_name
string | null
required
messages
ChatMessageDetail · object[]
required
time_created
string<date-time>
required
shared_status
enum<string>
required
Available options:
public,
private
current_alternate_model
string | null
required
current_temperature_override
number | null
required
packets
Packet · object[][]
required
persona_id
integer | null
deleted
boolean
default:false