---
title: "POST /inference-pipelines/{inferencePipelineId}/sessions"
method: POST
path: "/inference-pipelines/{inferencePipelineId}/sessions"
tags: ["Monitoring"]
---

# POST /inference-pipelines/{inferencePipelineId}/sessions

`POST /inference-pipelines/{inferencePipelineId}/sessions`

Get aggregated session data for an inference pipeline with pagination and metadata.

Returns a list of sessions for the inference pipeline, including activity statistics
such as record counts, token usage, cost, latency, and the first and last records.

## Path parameters

- `inferencePipelineId` string, uuid, required

## Query parameters

- `page` integer
- `perPage` integer
- `sortColumn` string
- `asc` boolean

## Request body

- DatasetFilter, nullable
  - `columnFilters` union[], nullable
    - union
      - object
        - `measurement` string, required — The name of the column.
        - `operator` 'contains_none' | 'contains_any' | 'contains_all' | 'one_of' | 'none_of', required
        - `value` union[], required
          - union
            - string
            - number
      - object
        - `measurement` string, required — The name of the column.
        - `operator` '>' | '>=' | 'is' | '<' | '<=' | '!=', required
        - `value` number, float, nullable, required
      - object
        - `measurement` string, required — The name of the column.
        - `operator` 'is' | '!=', required
        - `value` union, required
          - string
          - boolean
  - `searchQueryOr` string[], nullable
  - `searchQueryAnd` string[], nullable
  - `notSearchQueryOr` string[], nullable
  - `notSearchQueryAnd` string[], nullable
  - `rowIdList` integer[], nullable
  - `excludeRowIdList` integer[], nullable

## Response `200`

Response OK.

- object
  - `items` SessionAggregation[], required — Array of session aggregation data
    - `id` string, required — The unique session identifier
    - `dateCreated` string, date-time, required — Latest/most recent timestamp in the session
    - `dateOfFirstRecord` string, date-time, required — Timestamp of the first request in the session
    - `dateOfLastRecord` string, date-time, required — Timestamp of the last request in the session
    - `duration` number, float, required — Duration between first and last request (in milliseconds)
    - `records` integer, required — Total number of records/traces in the session
    - `userIds` string[], required — List of unique user IDs that participated in this session
    - `tokens` number, float, required — Total token count for the session
    - `cost` number, float, required — Total cost for the session
    - `latency` number, float, required — Total latency for the session (in milliseconds)
    - `firstRecord` object, required — The complete first record in the session
    - `lastRecord` object, required — The complete last record in the session

## Other responses

- `202` — Request accepted, data is being loaded.
- `default` — Unexpected error.

---

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