Skip to main content
GET
/
api
/
v1
/
sessions
/
{session_id}
Get Session Route
curl --request GET \
  --url https://api.example.com/api/v1/sessions/{session_id}
import requests

url = "https://api.example.com/api/v1/sessions/{session_id}"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.example.com/api/v1/sessions/{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://api.example.com/api/v1/sessions/{session_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$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://api.example.com/api/v1/sessions/{session_id}"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/sessions/{session_id}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/api/v1/sessions/{session_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "proxy_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "call_count": 123,
  "total_request_tokens": 123,
  "total_response_tokens": 123,
  "first_call_at": "2023-11-07T05:31:56Z",
  "last_call_at": "2023-11-07T05:31:56Z",
  "session_name": "<string>",
  "avg_latency_ms": 123,
  "traces": []
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Headers

Authorization
string | null

Path Parameters

session_id
string<uuid>
required

Response

Successful Response

session_id
string<uuid>
required
proxy_id
string<uuid>
required
org_id
string<uuid>
required
call_count
integer
required
total_request_tokens
integer
required
total_response_tokens
integer
required
first_call_at
string<date-time>
required
last_call_at
string<date-time>
required
session_name
string | null
avg_latency_ms
number | null
traces
TraceRecord · object[]