Read member daily trend. GET /api/openapi/v1/analytics/usage/members/{user_id}/daily-trend, scope admin.v1.analytics-usage.read.
- Scope: admin.v1.analytics-usage.read
- Permission: Read organization-wide usage (analytics-usage)
- Permission type: Read
- Endpoint: GET/api/openapi/v1/analytics/usage/members/{user_id}/daily-trend
Authentication and request headers
Call with an application API key. This endpoint checks only the scope above; read, manage and execute permissions do not imply one another.
| Name | Location | Type | Required | Description | Example |
|---|---|---|---|---|---|
| Authorization | header | string | Yes | Application API key, passed as a Bearer token. | Bearer qwk_*** |
| X-Request-Id | header | string | No | Optional request tracing identifier; generated by the server if omitted. | req-20260831-001 |
Request parameters
| Name | Location | Type | Required | Description | Example |
|---|---|---|---|---|---|
| user_id | path | string · uuid | Required | A nonzero, canonical lowercase UUID; invalid values return 422. | "<uuid>" |
| ds | query | string · date | Required | Data date | "<string>" |
| days | query | integer · int64 | No | Number of days | 7 |
Request example
cURL
Responses
When no usage trend exists, the endpoint returns 200 with points set to []; user_name may be null. It does not insert zero-valued data points.
The returned window and update time may differ from the requested ds. The window still covers the requested number of consecutive days, and existing credit values retain their original precision.
| HTTP status | code | Meaning |
|---|---|---|
| 422 | data_statistics_invalid_request | Invalid member UUID, date or number of days. |
| 404 | data_statistics_member_not_found | The upstream service explicitly reports that the member does not exist. |
| 503 | data_statistics_snapshot_unavailable | The requested local statistics snapshot has not been published. |
| 503 | data_statistics_upstream_unavailable | The upstream service failed or its response failed validation. This does not indicate zero usage. |
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| end_date | string | null · date | Yes | End date | "<string>" |
| last_data_update_time | string | null | Yes | Source update time in YYYY-MM-DD HH:mm:ss format, also accepting the legacy YYYY-MM-DD date format. The time zone is not converted, and the value may differ from ds. | "2026-09-21 13:00:00" |
| points | array | null | Yes | Daily credit usage | [{"credits":0,"date":"<string>"}] |
| start_date | string | null · date | Yes | Start date | "<string>" |
| user_id | string · uuid | Yes | User ID | "<uuid>" |
| user_name | string | null | Yes | User name | "<string>" |
default Flat business error
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| code | string | No | Stable business error code | "<string>" |
| detail | string | Yes | Human-readable error description | "<string>" |
| details | OpenapiErrorDetails | No | Error details | {"field":"<string>","reason":"<string>","suggestion":"<string>"} |
| details.field | string | No | Request field that failed validation | "<string>" |
| details.reason | string | No | Stable validation failure reason | "<string>" |
| details.suggestion | string | No | Suggested normalized value | "<string>" |
| error | string | Yes | Stable HTTP error type | "<string>" |