---
title: "Get Session"
method: GET
path: "/projects/{project_id}/sessions/{session_id}"
tags: ["trace"]
---

# Get Session

`GET /projects/{project_id}/sessions/{session_id}`

## Path parameters

- `session_id` string, uuid4, required
- `project_id` string, uuid4, required

## Query parameters

- `include_presigned_urls` boolean

## Response `200`

Successful Response

- ExtendedReadSessionRecordWithChildren — 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.
  - `type` 'session' — Type of the trace, span or session.
  - `input` union
    - string
    - GalileoCoreSchemasLoggingLlmMessage[]
      - `content` union, required
        - string
        - union[]
          - union
            - TextContentPart — A text segment within a message.
              - …
            - FileContentPart — Reference to a file associated with this message. The file_id can be resolved via the ``files`` dict returned on trace/span detail responses, which contains metadata such as modality, MIME type, and a presigned download URL.
              - …
      - `role` 'agent' | 'assistant' | 'developer' | 'function' | 'system' | 'tool' | 'user', required
      - `tool_call_id` string, nullable
      - `tool_calls` ToolCall[], nullable
        - `id` string, required
        - `function` ToolCallFunction, required
          - `name` string, required
          - `arguments` string, required
    - union[]
      - union
        - TextContentPart — A text segment within a message.
          - `type` 'text'
          - `text` string, required
        - FileContentPart — Reference to a file associated with this message. The file_id can be resolved via the ``files`` dict returned on trace/span detail responses, which contains metadata such as modality, MIME type, and a presigned download URL.
          - `type` 'file'
          - `file_id` string, uuid4, required
  - `redacted_input` union — Redacted input of the trace or span.
    - string
    - GalileoCoreSchemasLoggingLlmMessage[]
      - `content` union, required
        - string
        - union[]
          - union
            - TextContentPart — A text segment within a message.
              - …
            - FileContentPart — Reference to a file associated with this message. The file_id can be resolved via the ``files`` dict returned on trace/span detail responses, which contains metadata such as modality, MIME type, and a presigned download URL.
              - …
      - `role` 'agent' | 'assistant' | 'developer' | 'function' | 'system' | 'tool' | 'user', required
      - `tool_call_id` string, nullable
      - `tool_calls` ToolCall[], nullable
        - `id` string, required
        - `function` ToolCallFunction, required
          - `name` string, required
          - `arguments` string, required
    - union[]
      - union
        - TextContentPart — A text segment within a message.
          - `type` 'text'
          - `text` string, required
        - FileContentPart — Reference to a file associated with this message. The file_id can be resolved via the ``files`` dict returned on trace/span detail responses, which contains metadata such as modality, MIME type, and a presigned download URL.
          - `type` 'file'
          - `file_id` string, uuid4, required
  - `output` union — Output of the trace or span.
    - string
    - GalileoCoreSchemasLoggingLlmMessage
      - `content` union, required
        - string
        - union[]
          - union
            - TextContentPart — A text segment within a message.
              - …
            - FileContentPart — Reference to a file associated with this message. The file_id can be resolved via the ``files`` dict returned on trace/span detail responses, which contains metadata such as modality, MIME type, and a presigned download URL.
              - …
      - `role` 'agent' | 'assistant' | 'developer' | 'function' | 'system' | 'tool' | 'user', required
      - `tool_call_id` string, nullable
      - `tool_calls` ToolCall[], nullable
        - `id` string, required
        - `function` ToolCallFunction, required
          - `name` string, required
          - `arguments` string, required
    - DocumentOutput[]
      - `content` string, required — Content of the document.
      - `metadata` object
    - union[]
      - union
        - TextContentPart — A text segment within a message.
          - `type` 'text'
          - `text` string, required
        - FileContentPart — Reference to a file associated with this message. The file_id can be resolved via the ``files`` dict returned on trace/span detail responses, which contains metadata such as modality, MIME type, and a presigned download URL.
          - `type` 'file'
          - `file_id` string, uuid4, required
    - ControlResult
      - `action` 'deny' | 'steer' | 'observe', required
      - `matched` boolean, required — Whether the control matched. False covers both non-match and error cases; use error_message to distinguish errors.
      - `confidence` number, nullable — Confidence score reported by the control evaluation result.
      - `error_message` string, nullable — Error text when control evaluation failed. This should be null for normal matches and non-matches.
  - `redacted_output` union — Redacted output of the trace or span.
    - string
    - GalileoCoreSchemasLoggingLlmMessage
      - `content` union, required
        - string
        - union[]
          - union
            - TextContentPart — A text segment within a message.
              - …
            - FileContentPart — Reference to a file associated with this message. The file_id can be resolved via the ``files`` dict returned on trace/span detail responses, which contains metadata such as modality, MIME type, and a presigned download URL.
              - …
      - `role` 'agent' | 'assistant' | 'developer' | 'function' | 'system' | 'tool' | 'user', required
      - `tool_call_id` string, nullable
      - `tool_calls` ToolCall[], nullable
        - `id` string, required
        - `function` ToolCallFunction, required
          - `name` string, required
          - `arguments` string, required
    - DocumentOutput[]
      - `content` string, required — Content of the document.
      - `metadata` object
    - union[]
      - union
        - TextContentPart — A text segment within a message.
          - `type` 'text'
          - `text` string, required
        - FileContentPart — Reference to a file associated with this message. The file_id can be resolved via the ``files`` dict returned on trace/span detail responses, which contains metadata such as modality, MIME type, and a presigned download URL.
          - `type` 'file'
          - `file_id` string, uuid4, required
    - ControlResult
      - `action` 'deny' | 'steer' | 'observe', required
      - `matched` boolean, required — Whether the control matched. False covers both non-match and error cases; use error_message to distinguish errors.
      - `confidence` number, nullable — Confidence score reported by the control evaluation result.
      - `error_message` string, nullable — Error text when control evaluation failed. This should be null for normal matches and non-matches.
  - `name` string — Name of the trace, span or session.
  - `created_at` string, date-time — Timestamp of the trace or span's creation.
  - `user_metadata` object — Metadata associated with this trace or span.
  - `tags` string[] — Tags associated with this trace or span.
  - `status_code` integer, nullable — Status code of the trace or span. Used for logging failure or error states.
  - `metrics` Metrics
    - `duration_ns` integer, nullable — Duration of the trace or span in nanoseconds. Displayed as 'Latency' in Galileo.
  - `external_id` string, nullable — A user-provided session, trace or span ID.
  - `dataset_input` string, nullable — Input to the dataset associated with this trace
  - `dataset_output` string, nullable — Output from the dataset associated with this trace
  - `dataset_metadata` object — Metadata from the dataset associated with this trace
  - `id` string, uuid4, required — Galileo ID of the session
  - `session_id` string, uuid4, nullable — Galileo ID of the session containing the trace or span or session
  - `trace_id` string, uuid4, nullable — Galileo ID of the trace containing the span (or the same value as id for a trace)
  - `project_id` string, uuid4, required — Galileo ID of the project associated with this trace or span
  - `run_id` string, uuid4, required — Galileo ID of the run (log stream or experiment) associated with this trace or span
  - `updated_at` string, date-time, nullable — Timestamp of the session or trace or span's last update
  - `has_children` boolean, nullable — Whether or not this trace or span has child spans
  - `metrics_batch_id` string, uuid4, nullable — Galileo ID of the metrics batch associated with this trace or span
  - `session_batch_id` string, uuid4, nullable — Galileo ID of the metrics batch associated with this trace or span
  - `feedback_rating_info` object — Feedback information related to the record
  - `annotations` object — Annotations keyed by template ID and annotator ID
  - `file_ids` string[] — IDs of files associated with this record
  - `file_modalities` ContentModality[] — Modalities of files associated with this record
  - `annotation_aggregates` object — Annotation aggregate information keyed by template ID
  - `annotation_agreement` object — Annotation agreement scores keyed by template ID
  - `overall_annotation_agreement` number, nullable — Average annotation agreement across all templates in the queue
  - `annotation_queue_ids` string[] — IDs of annotation queues this record is in
  - `fully_annotated` boolean, nullable — Whether every field is annotated by every annotator in the queue
  - `progress_message` string — Runner progress text written directly to CH span
  - `error_message` string — Runner error text written directly to CH span
  - `metric_info` object, nullable — Detailed information about the metrics associated with this trace or span
  - `files` object, nullable — File metadata keyed by file ID for files associated with this record
  - `previous_session_id` string, uuid4, nullable
  - `num_traces` integer, nullable
  - `traces` union[]
    - union
      - ExtendedTraceRecordWithChildren
        - `spans` union[]
          - union
            - ExtendedAgentSpanRecordWithChildren
              - …
            - ExtendedWorkflowSpanRecordWithChildren
              - …
            - ExtendedLlmSpanRecord
              - …
            - ExtendedToolSpanRecordWithChildren
              - …
            - ExtendedRetrieverSpanRecordWithChildren
              - …
            - ExtendedControlSpanRecord
              - …
        - `type` 'trace' — Type of the trace, span or session.
        - `input` union — Input to the trace or span.
          - string
          - union[]
            - union
              - …
        - `redacted_input` union — Redacted input of the trace or span.
          - string
          - union[]
            - union
              - …
        - `output` union — Output of the trace or span.
          - string
          - union[]
            - union
              - …
        - `redacted_output` union — Redacted output of the trace or span.
          - string
          - union[]
            - union
              - …
        - `name` string — Name of the trace, span or session.
        - `created_at` string, date-time — Timestamp of the trace or span's creation.
        - `user_metadata` object — Metadata associated with this trace or span.
        - `tags` string[] — Tags associated with this trace or span.
        - `status_code` integer, nullable — Status code of the trace or span. Used for logging failure or error states.
        - `metrics` Metrics
          - `duration_ns` integer, nullable — Duration of the trace or span in nanoseconds. Displayed as 'Latency' in Galileo.
        - `external_id` string, nullable — A user-provided session, trace or span ID.
        - `dataset_input` string, nullable — Input to the dataset associated with this trace
        - `dataset_output` string, nullable — Output from the dataset associated with this trace
        - `dataset_metadata` object — Metadata from the dataset associated with this trace
        - `id` string, uuid4, required — Galileo ID of the trace
        - `session_id` string, uuid4, required — Galileo ID of the session containing the trace (or the same value as id for a trace)
        - `trace_id` string, uuid4, required — Galileo ID of the trace containing the span (or the same value as id for a trace)
        - `project_id` string, uuid4, required — Galileo ID of the project associated with this trace or span
        - `run_id` string, uuid4, required — Galileo ID of the run (log stream or experiment) associated with this trace or span
        - `updated_at` string, date-time, nullable — Timestamp of the session or trace or span's last update
        - `has_children` boolean, nullable — Whether or not this trace or span has child spans
        - `metrics_batch_id` string, uuid4, nullable — Galileo ID of the metrics batch associated with this trace or span
        - `session_batch_id` string, uuid4, nullable — Galileo ID of the metrics batch associated with this trace or span
        - `feedback_rating_info` object — Feedback information related to the record
        - `annotations` object — Annotations keyed by template ID and annotator ID
        - `file_ids` string[] — IDs of files associated with this record
        - `file_modalities` ContentModality[] — Modalities of files associated with this record
        - `annotation_aggregates` object — Annotation aggregate information keyed by template ID
        - `annotation_agreement` object — Annotation agreement scores keyed by template ID
        - `overall_annotation_agreement` number, nullable — Average annotation agreement across all templates in the queue
        - `annotation_queue_ids` string[] — IDs of annotation queues this record is in
        - `fully_annotated` boolean, nullable — Whether every field is annotated by every annotator in the queue
        - `progress_message` string — Runner progress text written directly to CH span
        - `error_message` string — Runner error text written directly to CH span
        - `metric_info` object, nullable — Detailed information about the metrics associated with this trace or span
        - `files` object, nullable — File metadata keyed by file ID for files associated with this record
        - `is_complete` boolean — Whether the trace is complete or not
        - `num_spans` integer, nullable
      - StubTraceRecord — Placeholder for a trace referenced by spans but not yet ingested. Synthesized when one or more spans declare trace_id=X but no TraceRecord with that id exists in storage. Holds the orphan spans together so the client can render them under a single root. Extends ExtendedRecordWithChildSpans so isinstance checks work uniformly for both real and stub traces.
        - `spans` union[]
          - union
            - ExtendedAgentSpanRecordWithChildren
              - …
            - ExtendedWorkflowSpanRecordWithChildren
              - …
            - ExtendedLlmSpanRecord
              - …
            - ExtendedToolSpanRecordWithChildren
              - …
            - ExtendedRetrieverSpanRecordWithChildren
              - …
            - ExtendedControlSpanRecord
              - …
        - `type` 'stub_trace' — Discriminator; identifies this as a synthesized placeholder, not a real trace.
        - `id` string, uuid4, required — ID of the missing trace, taken from span trace_id references.
        - `project_id` string, uuid4, nullable — Project ID inferred from child spans, if all agree; otherwise None.
        - `run_id` string, uuid4, nullable — Run ID inferred from child spans, if all agree; otherwise None.
        - `session_id` string, uuid4, nullable — Session ID inferred from child spans, if all agree; otherwise None.
        - `created_at` string, date-time, required — Earliest created_at among child spans; used to order under a session.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/galileo/apis/galileo-api-server.md) · [All operations](https://skmtc.net/galileo/apis/galileo-api-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/galileo/galileo-api-server/versions/933e8c8e6366/schema)
