latestOpenAPI 3.1.02026-08-08127304355.9 KB

69c553220183

Search & Analytics

List Sessions

Retrieve sessions with their completions, ordered by most recent first. Use to display conversation history or analyze LLM usage patterns. Traces are referenced by ID but not expanded.

Filter by custom metadata using query parameters prefixed with custom_metadata. (e.g., custom_metadata.user_id=123).

page_size defaults to 10, maximum 100.

Prefer using the /search/sessions endpoint for more advanced filtering.

get/api/v2/projects/{project_id}/sessions

Path parameters

project_idstring required

Query parameters

pageinteger
page_sizeinteger
to_datestring nullable
from_datestring nullable
test_liststring nullable
test_run_idstring nullable
prompt_namestring nullable
review_queue_idstring nullable

Response

The type of parameterized generics.

That is, for example, type(List[int]) is _GenericAlias.

Objects which are instances of this class include:

  • Parameterized container types, e.g. Tuple[int], List[int].
  • Note that native container types, e.g. tuple, list, use types.GenericAlias instead.
  • Parameterized classes: class C[T]: pass

    C[int] is a _GenericAlias

  • Callable aliases, generic Callable aliases, and parameterized Callable aliases: T = TypeVar('T')

    _CallableGenericAlias inherits from _GenericAlias.

    A = Callable[[], None] # _CallableGenericAlias B = Callable[[T], None] # _CallableGenericAlias C = B[int] # _CallableGenericAlias
  • Parameterized Final, ClassVar, TypeForm, TypeGuard, and TypeIs:

    All _GenericAlias

    Final[int] ClassVar[float] TypeForm[bytearray] TypeGuard[bool] TypeIs[range]

Note that instances of this class are not classes (e.g by inspect.isclass), even though they behave like them.

session_idstring uuid required
start_timestring required
custom_metadataobject required