curl --request GET \
--url https://api.galileo.ai/v2/projects/{project_id}/sessions/{session_id} \
--header 'Splunk-AO-API-Key: <api-key>'import requests
url = "https://api.galileo.ai/v2/projects/{project_id}/sessions/{session_id}"
headers = {"Splunk-AO-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Splunk-AO-API-Key': '<api-key>'}};
fetch('https://api.galileo.ai/v2/projects/{project_id}/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.galileo.ai/v2/projects/{project_id}/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",
CURLOPT_HTTPHEADER => [
"Splunk-AO-API-Key: <api-key>"
],
]);
$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.galileo.ai/v2/projects/{project_id}/sessions/{session_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Splunk-AO-API-Key", "<api-key>")
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.galileo.ai/v2/projects/{project_id}/sessions/{session_id}")
.header("Splunk-AO-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galileo.ai/v2/projects/{project_id}/sessions/{session_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Splunk-AO-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"project_id": "<string>",
"run_id": "<string>",
"type": "session",
"input": "",
"redacted_input": "<string>",
"output": "<string>",
"redacted_output": "<string>",
"name": "",
"created_at": "2023-11-07T05:31:56Z",
"user_metadata": {},
"tags": [
"<string>"
],
"status_code": 123,
"metrics": {
"duration_ns": 123
},
"external_id": "<string>",
"dataset_input": "<string>",
"dataset_output": "<string>",
"dataset_metadata": {},
"session_id": "<string>",
"trace_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"has_children": true,
"metrics_batch_id": "<string>",
"session_batch_id": "<string>",
"feedback_rating_info": {},
"annotations": {},
"file_ids": [
"<string>"
],
"file_modalities": [
"text"
],
"annotation_aggregates": {},
"annotation_agreement": {},
"overall_annotation_agreement": 123,
"annotation_queue_ids": [
"<string>"
],
"fully_annotated": true,
"annotation_status": "NOT_STARTED",
"annotated_members": [
"<string>"
],
"progress_message": "",
"error_message": "",
"metric_info": {},
"files": {},
"previous_session_id": "<string>",
"num_traces": 123,
"traces": [
{
"id": "<string>",
"session_id": "<string>",
"trace_id": "<string>",
"project_id": "<string>",
"run_id": "<string>",
"spans": [
{
"id": "<string>",
"session_id": "<string>",
"project_id": "<string>",
"run_id": "<string>",
"parent_id": "<string>",
"spans": "<array>",
"type": "agent",
"input": "",
"redacted_input": "<string>",
"output": "<string>",
"redacted_output": "<string>",
"name": "",
"created_at": "2023-11-07T05:31:56Z",
"user_metadata": {},
"tags": [
"<string>"
],
"status_code": 123,
"metrics": {
"duration_ns": 123
},
"external_id": "<string>",
"dataset_input": "<string>",
"dataset_output": "<string>",
"dataset_metadata": {},
"trace_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"has_children": true,
"metrics_batch_id": "<string>",
"session_batch_id": "<string>",
"feedback_rating_info": {},
"annotations": {},
"file_ids": [
"<string>"
],
"file_modalities": [
"text"
],
"annotation_aggregates": {},
"annotation_agreement": {},
"overall_annotation_agreement": 123,
"annotation_queue_ids": [
"<string>"
],
"fully_annotated": true,
"annotation_status": "NOT_STARTED",
"annotated_members": [
"<string>"
],
"progress_message": "",
"error_message": "",
"metric_info": {},
"files": {},
"is_complete": true,
"step_number": 123,
"agent_type": "default",
"agent_name": "<string>"
}
],
"type": "trace",
"input": "",
"redacted_input": "<string>",
"output": "<string>",
"redacted_output": "<string>",
"name": "",
"created_at": "2023-11-07T05:31:56Z",
"user_metadata": {},
"tags": [
"<string>"
],
"status_code": 123,
"metrics": {
"duration_ns": 123
},
"external_id": "<string>",
"dataset_input": "<string>",
"dataset_output": "<string>",
"dataset_metadata": {},
"updated_at": "2023-11-07T05:31:56Z",
"has_children": true,
"metrics_batch_id": "<string>",
"session_batch_id": "<string>",
"feedback_rating_info": {},
"annotations": {},
"file_ids": [
"<string>"
],
"file_modalities": [
"text"
],
"annotation_aggregates": {},
"annotation_agreement": {},
"overall_annotation_agreement": 123,
"annotation_queue_ids": [
"<string>"
],
"fully_annotated": true,
"annotation_status": "NOT_STARTED",
"annotated_members": [
"<string>"
],
"progress_message": "",
"error_message": "",
"metric_info": {},
"files": {},
"dataset_generated_output": "<string>",
"is_complete": true,
"num_spans": 123
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Get Session
curl --request GET \
--url https://api.galileo.ai/v2/projects/{project_id}/sessions/{session_id} \
--header 'Splunk-AO-API-Key: <api-key>'import requests
url = "https://api.galileo.ai/v2/projects/{project_id}/sessions/{session_id}"
headers = {"Splunk-AO-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Splunk-AO-API-Key': '<api-key>'}};
fetch('https://api.galileo.ai/v2/projects/{project_id}/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.galileo.ai/v2/projects/{project_id}/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",
CURLOPT_HTTPHEADER => [
"Splunk-AO-API-Key: <api-key>"
],
]);
$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.galileo.ai/v2/projects/{project_id}/sessions/{session_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Splunk-AO-API-Key", "<api-key>")
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.galileo.ai/v2/projects/{project_id}/sessions/{session_id}")
.header("Splunk-AO-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galileo.ai/v2/projects/{project_id}/sessions/{session_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Splunk-AO-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"project_id": "<string>",
"run_id": "<string>",
"type": "session",
"input": "",
"redacted_input": "<string>",
"output": "<string>",
"redacted_output": "<string>",
"name": "",
"created_at": "2023-11-07T05:31:56Z",
"user_metadata": {},
"tags": [
"<string>"
],
"status_code": 123,
"metrics": {
"duration_ns": 123
},
"external_id": "<string>",
"dataset_input": "<string>",
"dataset_output": "<string>",
"dataset_metadata": {},
"session_id": "<string>",
"trace_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"has_children": true,
"metrics_batch_id": "<string>",
"session_batch_id": "<string>",
"feedback_rating_info": {},
"annotations": {},
"file_ids": [
"<string>"
],
"file_modalities": [
"text"
],
"annotation_aggregates": {},
"annotation_agreement": {},
"overall_annotation_agreement": 123,
"annotation_queue_ids": [
"<string>"
],
"fully_annotated": true,
"annotation_status": "NOT_STARTED",
"annotated_members": [
"<string>"
],
"progress_message": "",
"error_message": "",
"metric_info": {},
"files": {},
"previous_session_id": "<string>",
"num_traces": 123,
"traces": [
{
"id": "<string>",
"session_id": "<string>",
"trace_id": "<string>",
"project_id": "<string>",
"run_id": "<string>",
"spans": [
{
"id": "<string>",
"session_id": "<string>",
"project_id": "<string>",
"run_id": "<string>",
"parent_id": "<string>",
"spans": "<array>",
"type": "agent",
"input": "",
"redacted_input": "<string>",
"output": "<string>",
"redacted_output": "<string>",
"name": "",
"created_at": "2023-11-07T05:31:56Z",
"user_metadata": {},
"tags": [
"<string>"
],
"status_code": 123,
"metrics": {
"duration_ns": 123
},
"external_id": "<string>",
"dataset_input": "<string>",
"dataset_output": "<string>",
"dataset_metadata": {},
"trace_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"has_children": true,
"metrics_batch_id": "<string>",
"session_batch_id": "<string>",
"feedback_rating_info": {},
"annotations": {},
"file_ids": [
"<string>"
],
"file_modalities": [
"text"
],
"annotation_aggregates": {},
"annotation_agreement": {},
"overall_annotation_agreement": 123,
"annotation_queue_ids": [
"<string>"
],
"fully_annotated": true,
"annotation_status": "NOT_STARTED",
"annotated_members": [
"<string>"
],
"progress_message": "",
"error_message": "",
"metric_info": {},
"files": {},
"is_complete": true,
"step_number": 123,
"agent_type": "default",
"agent_name": "<string>"
}
],
"type": "trace",
"input": "",
"redacted_input": "<string>",
"output": "<string>",
"redacted_output": "<string>",
"name": "",
"created_at": "2023-11-07T05:31:56Z",
"user_metadata": {},
"tags": [
"<string>"
],
"status_code": 123,
"metrics": {
"duration_ns": 123
},
"external_id": "<string>",
"dataset_input": "<string>",
"dataset_output": "<string>",
"dataset_metadata": {},
"updated_at": "2023-11-07T05:31:56Z",
"has_children": true,
"metrics_batch_id": "<string>",
"session_batch_id": "<string>",
"feedback_rating_info": {},
"annotations": {},
"file_ids": [
"<string>"
],
"file_modalities": [
"text"
],
"annotation_aggregates": {},
"annotation_agreement": {},
"overall_annotation_agreement": 123,
"annotation_queue_ids": [
"<string>"
],
"fully_annotated": true,
"annotation_status": "NOT_STARTED",
"annotated_members": [
"<string>"
],
"progress_message": "",
"error_message": "",
"metric_info": {},
"files": {},
"dataset_generated_output": "<string>",
"is_complete": true,
"num_spans": 123
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Query Parameters
If False, omit the redacted_input and redacted_output fields from the response. When redaction is active these hold the same text already returned in input/output, so clients that do not read them can halve the payload. This does not change whether redaction is applied.
Response
Successful Response
Read-side session response that also accepts synthesized stub_trace roots.
Same shape as ExtendedSessionRecordWithChildren, except traces allows the
StubTraceRecord placeholder produced by create_tree_for_extended_read_session
for spans whose TraceRecord hasn't arrived yet. Defined independently of
ExtendedSessionRecordWithChildren/RecordWithChildTraces rather than
subclassing them, since widening their Sequence[ExtendedTraceRecordWithChildren]
field to also allow StubTraceRecord in a subclass is an LSP violation mypy
correctly rejects.
Was this page helpful?