Skip to main content
POST
/
v2
/
projects
/
{project_id}
/
spans
/
partial_search
Query Partial Spans
curl --request POST \
  --url https://api.galileo.ai/v2/projects/{project_id}/spans/partial_search \
  --header 'Content-Type: application/json' \
  --header 'Galileo-API-Key: <api-key>' \
  --data '
{
  "select_columns": {
    "column_ids": [
      "<string>"
    ],
    "include_all_metrics": false,
    "include_all_feedback": false
  },
  "starting_token": 0,
  "limit": 100,
  "previous_last_row_id": "<string>",
  "log_stream_id": "<string>",
  "experiment_id": "<string>",
  "metrics_testing_id": "<string>",
  "filters": [
    {
      "column_id": "<string>",
      "value": "<string>",
      "operator": "eq",
      "type": "id"
    }
  ],
  "filter_tree": {
    "filter": {
      "column_id": "<string>",
      "value": "<string>",
      "operator": "eq",
      "type": "id"
    }
  },
  "sort": {
    "column_id": "<string>",
    "ascending": true,
    "sort_type": "column"
  },
  "truncate_fields": false,
  "include_counts": false
}
'
{
  "num_records": 123,
  "starting_token": 0,
  "limit": 100,
  "paginated": false,
  "next_starting_token": 123,
  "last_row_id": "<string>",
  "records": [
    {
      "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": {},
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "trace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "updated_at": "2023-11-07T05:31:56Z",
      "has_children": true,
      "metrics_batch_id": "<string>",
      "session_batch_id": "<string>",
      "feedback_rating_info": {},
      "metric_info": {},
      "is_complete": true
    }
  ]
}

Authorizations

Galileo-API-Key
string
header
required

Path Parameters

project_id
string<uuid4>
required

Body

application/json

Request to query a genai project run (log stream or experiment) with partial results.

select_columns
SelectColumns · object
required
starting_token
integer
default:0
limit
integer
default:100
previous_last_row_id
string<uuid4> | null
log_stream_id
string<uuid4> | null

Log stream id associated with the traces.

experiment_id
string<uuid4> | null

Experiment id associated with the traces.

metrics_testing_id
string<uuid4> | null

Metrics testing id associated with the traces.

filters
(LogRecordsIDFilter · object | LogRecordsDateFilter · object | LogRecordsNumberFilter · object | LogRecordsBooleanFilter · object | LogRecordsCollectionFilter · object | LogRecordsTextFilter · object)[]
filter_tree
FilterLeaf[Annotated[Union[LogRecordsIDFilter, LogRecordsDateFilter, LogRecordsNumberFilter, LogRecordsBooleanFilter, LogRecordsCollectionFilter, LogRecordsTextFilter], FieldInfo(annotation=NoneType, required=True, discriminator='type')]] · object
sort
LogRecordsSortClause · object

Sort for the query. Defaults to native sort (created_at, id descending).

truncate_fields
boolean
default:false
include_counts
boolean
default:false

If True, include computed child counts (e.g., num_traces for sessions, num_spans for traces).

Response

Successful Response

num_records
integer
required

number of records

starting_token
integer
default:0
limit
integer
default:100
paginated
boolean
default:false
next_starting_token
integer | null
last_row_id
string<uuid4> | null
records
(PartialExtendedTraceRecord · object | PartialExtendedAgentSpanRecord · object | PartialExtendedWorkflowSpanRecord · object | PartialExtendedLlmSpanRecord · object | PartialExtendedToolSpanRecord · object | PartialExtendedRetrieverSpanRecord · object | PartialExtendedSessionRecord · object)[]

records matching the query