---
title: "List Users"
method: POST
path: "/tracing/users/query"
tags: ["Deprecated"]
deprecated: true
---

# List Users

`POST /tracing/users/query`

> **Deprecated.**

List distinct user IDs from span attributes.

Returns the distinct values of `ag.user.id` across spans in the
current project. Same pagination and `realtime` semantics as
`POST /tracing/sessions/query`; pass the returned `windowing.next`
cursor on subsequent calls.

## Request body

- UsersQueryRequest — Request body for `POST /tracing/users/query`.
  - `realtime` boolean, nullable — When `true`, paginate by `last_active`. When `false` or unset, paginate by the stable `first_active` cursor.
  - `windowing` Windowing
    - `newest` string, date-time, nullable
    - `oldest` string, date-time, nullable
    - `next` string, uuid, nullable
    - `limit` integer, nullable
    - `order` 'ascending' | 'descending', nullable
    - `interval` integer, nullable
    - `rate` number, nullable

## Response `200`

Successful Response

- UserIdsResponse
  - `count` integer — Number of user IDs in this page.
  - `user_ids` string[] — Distinct values of `ag.user.id` in this page.
  - `windowing` Windowing
    - `newest` string, date-time, nullable
    - `oldest` string, date-time, nullable
    - `next` string, uuid, nullable
    - `limit` integer, nullable
    - `order` 'ascending' | 'descending', nullable
    - `interval` integer, nullable
    - `rate` number, nullable

## Other responses

- `422` — Validation Error

---

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