Class UserListParams
-
- All Implemented Interfaces:
-
com.anthropic.core.Params
public final class UserListParams implements Params
Get per-user activity for a given day, with cursor-based pagination.
Returns activity metrics for each user in the organization, sorted by email address. Use
group_by[]for per-RBAC-group aggregates, orfilter[]to scope results to specific members, groups, or a chat project. Available to organizations on a Claude Enterprise plan. Requires an API key with theread:analyticsscope.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classUserListParams.BuilderA builder for UserListParams.
-
Method Summary
Modifier and Type Method Description final Optional<LocalDate>date()UTC date in YYYY-MM-DD format. final Optional<LocalDate>endingDate()UTC date in YYYY-MM-DD format. final Optional<List<String>>filter()Filters as dimension:value, e.g.final Optional<List<AnalyticsUserGroupBy>>groupBy()Dimensions to break results out by (e.g. final Optional<Long>limit()Number of results per page (1-1000, default 100). final Optional<AnalyticsOrder>order()Sort direction: ascordesc.final Optional<String>orderBy()Sort field. final Optional<String>page()Opaque cursor from a previous response's next_pagefield.final Optional<LocalDate>startingDate()UTC date in YYYY-MM-DD format. final Headers_additionalHeaders()Additional headers to send with the request. final QueryParams_additionalQueryParams()Additional query param to send with the request. final UserListParams.BuildertoBuilder()Headers_headers()The full set of headers in the parameters, including both fixed and additional headers. QueryParams_queryParams()The full set of query params in the parameters, including both fixed and additional query params. SpanData_spanData()The data for the OpenTelemetry span of a call to the method with these parameters. Booleanequals(Object other)IntegerhashCode()StringtoString()final static UserListParamsnone()final static UserListParams.Builderbuilder()Returns a mutable builder for constructing an instance of UserListParams. -
-
Method Detail
-
date
final Optional<LocalDate> date()
UTC date in YYYY-MM-DD format. The day to get user activity for. Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day) and may be revised by a few percent over the following days. No earlier than 2026-01-01.
-
endingDate
final Optional<LocalDate> endingDate()
UTC date in YYYY-MM-DD format. End of the date range (exclusive); only valid with
starting_date. Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day), so this can be at most today — which is also the default when omitted, resolved once when the first page is served and reused for the rest of the pagination sequence. At most 366 days afterstarting_date.
-
filter
final Optional<List<String>> filter()
Filters as
dimension:value, e.g.filter[]=rbac_group_id:{id}. Repeat the param for OR within a dimension and across dimensions for AND. Supported dimensions on this endpoint:project_id,rbac_group_id,user_id. Value forms:project_idtakes a tagged project id (claude_proj_...);rbac_group_idtakes the tagged id (rbac_group_..., as emitted in responses and by the spend-limits API) or a bare group UUID, and matches users who held the group at any point during each covered UTC day (time-of-usage attribution);user_idtakes a tagged user id (user_...), as emitted in responses. An unsupported dimension returns 400. At most 100 entries. Aproject_idfilter limits each member's row to their claude.ai chat activity in that project and cannot be combined withgroup_by[]or anrbac_group_idfilter. On these rows, every count inchat_cowork_unified_metrics.sessionsis 0, because sessions are not measured per project. On any day a member sent a chat message in Chat and Cowork unified, all of that member's project activity for the day is counted inchat_cowork_unified_metrics.chatinstead ofchat_metrics.
-
groupBy
final Optional<List<AnalyticsUserGroupBy>> groupBy()
Dimensions to break results out by (e.g.
group_by[]=rbac_group_id). Supported on this endpoint:rbac_group_id. Rows are already per-member, so the one supported grouping aggregates them per RBAC group instead. Grouped rows carry the requested dimension values as additional fields and paginate like ungrouped responses vianext_page; an unsupported dimension returns 400.rbac_group_idattributes a user to every group they held at any point during each covered UTC day, so grouped rows are not an exclusive partition and can sum above org-level totals. At most 100 entries.
-
order
final Optional<AnalyticsOrder> order()
Sort direction:
ascordesc. Defaults toascfor the endpoint's sort column and todescwhenorder_bynames a metric (a top-N ranking). Applies toorder_by, or to the endpoint's default sort field whenorder_byis omitted.
-
orderBy
final Optional<String> orderBy()
Sort field. Restricted to the endpoint's sort column plus its rankable metrics (metrics default to descending; a few metrics rank in date-range mode only, per the endpoint's documented orderable set).
-
startingDate
final Optional<LocalDate> startingDate()
UTC date in YYYY-MM-DD format. Start of a date range (inclusive). Enables rollup mode: one row per entity aggregated over the whole range — addable counters are summed across days, and a distinct count is never summed where summing could double-count (a field's range value is recomputed exactly over the window, approximate via HLL with typical error under 2%, null, or — for the creation-event counts, whose per-day values cannot overlap — a per-day sum that is itself exact; each field's own description says which). Use either
dateorstarting_date, not both. Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day) and may be revised by a few percent over the following days. No earlier than 2026-01-01.
-
_additionalHeaders
final Headers _additionalHeaders()
Additional headers to send with the request.
-
_additionalQueryParams
final QueryParams _additionalQueryParams()
Additional query param to send with the request.
-
toBuilder
final UserListParams.Builder toBuilder()
-
_headers
Headers _headers()
The full set of headers in the parameters, including both fixed and additional headers.
-
_queryParams
QueryParams _queryParams()
The full set of query params in the parameters, including both fixed and additional query params.
-
_spanData
SpanData _spanData()
The data for the OpenTelemetry span of a call to the method with these parameters.
-
none
final static UserListParams none()
-
builder
final static UserListParams.Builder builder()
Returns a mutable builder for constructing an instance of UserListParams.
-
-
-
-