---
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

## Changes

- **2026-05-19** `a7f9a6823230` — 2 warning
  - removed the optional property `support_id` from the response with the `200` status
  - removed the optional property `support_ts` from the response with the `200` status
- **2026-05-08** `bb630edffa27` — 3 info
  - api tag `Deprecated` added
  - api tag `Traces` removed
  - endpoint deprecated
- **2026-05-08** `5e6f53ce5d08` — 1 info
  - api operation id `list_users` removed and replaced with `query_users`
- **2026-05-02** `6e37373d45fe` — 2 info
  - api tag `Traces` added
  - api tag `Observability` removed
- **2026-04-23** `925e8b901a26` — 2 info
  - added the optional property `support_id` to the response with the `200` status
  - added the optional property `support_ts` to the response with the `200` status

[Full history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/tracing/users/query/post.md)

---

[API](https://skmtc.dev/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.dev/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agenta-ai/agenta-api/revisions/713e4f3b7519/schema)
