POST
/
calls
/
stream_query
Calls Query Stream
curl --request POST \
  --url https://trace.wandb.ai/calls/stream_query \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "project_id": "<string>",
  "filter": {
    "op_names": [
      "<string>"
    ],
    "input_refs": [
      "<string>"
    ],
    "output_refs": [
      "<string>"
    ],
    "parent_ids": [
      "<string>"
    ],
    "trace_ids": [
      "<string>"
    ],
    "call_ids": [
      "<string>"
    ],
    "thread_ids": [
      "<string>"
    ],
    "turn_ids": [
      "<string>"
    ],
    "trace_roots_only": true,
    "wb_user_ids": [
      "<string>"
    ],
    "wb_run_ids": [
      "<string>"
    ]
  },
  "limit": 123,
  "offset": 123,
  "sort_by": [
    {
      "field": "<string>",
      "direction": "asc"
    }
  ],
  "query": {
    "$expr": {
      "$and": [
        {
          "$literal": "<any>"
        }
      ]
    }
  },
  "include_costs": true,
  "include_feedback": true,
  "include_storage_size": true,
  "include_total_storage_size": true,
  "columns": [
    "<string>"
  ],
  "expand_columns": [
    "inputs.self.message",
    "inputs.model.prompt"
  ]
}'
"<any>"

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Headers

accept
string
default:application/jsonl

Body

application/json
project_id
string
required
filter
object | null
limit
integer | null
offset
integer | null
sort_by
SortBy · object[] | null
query
object | null

The top-level object for querying traced calls.

The Query wraps a single $expr, which uses Mongo-style aggregation operators to filter calls. This expression can combine logical conditions, comparisons, type conversions, and string matching.

Examples: ``` # Filter calls where op_name == "predict" { "$expr": { "$eq": [ {"$getField": "op_name"}, {"$literal": "predict"} ] } }

# Filter where a call's display name contains "llm"
{
"$expr": {
"$contains": {
"input": {"$getField": "display_name"},
"substr": {"$literal": "llm"},
"case_insensitive": true
}
}
}
```
include_costs
boolean | null
default:false

Beta, subject to change. If true, the response will include any model costs for each call.

include_feedback
boolean | null
default:false

Beta, subject to change. If true, the response will include feedback for each call.

include_storage_size
boolean | null
default:false

Beta, subject to change. If true, the response will include the storage size for a call.

include_total_storage_size
boolean | null
default:false

Beta, subject to change. If true, the response will include the total storage size for a trace.

columns
string[] | null
expand_columns
string[] | null

Columns to expand, i.e. refs to other objects

Examples:
[
"inputs.self.message",
"inputs.model.prompt"
]

Response

Successful Response

The response is of type any.