Skip to main content

Read member daily trend

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.
NameLocationTypeRequiredDescriptionExample
AuthorizationheaderstringYesApplication API key, passed as a Bearer token.Bearer qwk_***
X-Request-IdheaderstringNoOptional request tracing identifier; generated by the server if omitted.req-20260831-001

Request parameters

NameLocationTypeRequiredDescriptionExample
user_idpathstring · uuidRequiredA nonzero, canonical lowercase UUID; invalid values return 422."<uuid>"
dsquerystring · dateRequiredData date"<string>"
daysqueryinteger · int64NoNumber of days7

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 statuscodeMeaning
422data_statistics_invalid_requestInvalid member UUID, date or number of days.
404data_statistics_member_not_foundThe upstream service explicitly reports that the member does not exist.
503data_statistics_snapshot_unavailableThe requested local statistics snapshot has not been published.
503data_statistics_upstream_unavailableThe upstream service failed or its response failed validation. This does not indicate zero usage.
200 OK
NameTypeRequiredDescriptionExample
end_datestring | null · dateYesEnd date"<string>"
last_data_update_timestring | nullYesSource 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"
pointsarray | nullYesDaily credit usage[{"credits":0,"date":"<string>"}]
start_datestring | null · dateYesStart date"<string>"
user_idstring · uuidYesUser ID"<uuid>"
user_namestring | nullYesUser name"<string>"
Response example
default Flat business error
NameTypeRequiredDescriptionExample
codestringNoStable business error code"<string>"
detailstringYesHuman-readable error description"<string>"
detailsOpenapiErrorDetailsNoError details{"field":"<string>","reason":"<string>","suggestion":"<string>"}
details.fieldstringNoRequest field that failed validation"<string>"
details.reasonstringNoStable validation failure reason"<string>"
details.suggestionstringNoSuggested normalized value"<string>"
errorstringYesStable HTTP error type"<string>"
Response example