---
title: "Get end-user activity histogram"
method: GET
path: "/v1/projects/{projectSlug}/users/{userId}/activity"
tags: ["Users"]
---

# Get end-user activity histogram

`GET /v1/projects/{projectSlug}/users/{userId}/activity`

Returns the end-user's per-bucket session activity across the range, oldest first. The range defaults to the trailing 30 days.

## Path parameters

- `projectSlug` string, required — Project slug (human-readable identifier)
- `userId` string, required — End-user identifier. URL-encode values containing special characters.

## Query parameters

- `fromIso` string, date-time — Lower bound (inclusive) of the time range. Defaults to 30 days before `toIso`.
- `toIso` string, date-time — Upper bound (inclusive) of the time range. Defaults to now.
- `errorsOnly` 'true' | 'false' — When `true`, scope every aggregate to errored traces only.

## Response `200`

Activity histogram

- UserActivityResponse
  - `buckets` UserActivityBucket[], required — Per-bucket session activity across the range, oldest first.
    - `bucket` string, required — ISO-8601 UTC timestamp of the bucket's start.
    - `count` integer, required — Distinct user-attributed sessions starting in the bucket.
    - `errorCount` integer, required — Of `count`, sessions with at least one errored trace.
  - `bucketSeconds` integer, required — Bucket width the buckets were computed with, in seconds.
  - `fromIso` string, required — ISO-8601 lower bound of the resolved range.
  - `toIso` string, required — ISO-8601 upper bound of the resolved range.

## Other responses

- `400` — Validation error
- `401` — Unauthorized
- `404` — Not found

---

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