Requirements, permissions, request and response fields, and error handling.
Request and permissions
GEThttps://openapi.qwenwork.ai/v1/biz/usage/meta
Authentication: Authorization: Bearer <access_token>; use an access token obtained through user OAuth authorization.
Required business Scope: biz.usage.read
Authorization method declared in the contract: Organization authorization (organization)
The platform must enable the Scope for the application. The user must have the required business permissions, and the target resource must be within their accessible scope. Availability of personal or organization authorization depends on the application's actual console configuration.
Behavior and limitations
Get the latest available usage statistics date and data update time to determine the data date for subsequent member usage queries. The application requires biz.usage.read authorization, and the operator requires organization usage read permission. No business parameters are required. Success returns latest_usage_data_date and last_data_update_time. Both are null when no statistics are available. The update time uses the timestamp string provided by the data source.Request body
The public contract does not declare a request body. Do not add identity fields or undeclared business fields.Success response
Preserve each business API's original response structure. Do not add a commoncode/msg/data wrapper.
HTTP 200
Usage data metadata retrieved successfully. Response type:application/json
Copy
{
"last_data_update_time": "2026-11-13 02:15:00",
"latest_usage_data_date": "2026-11-12"
}
| Field | Type | Required | Description and constraints |
|---|---|---|---|
last_data_update_time | string | null | Yes | Statistics update time, unchanged from Databus. |
latest_usage_data_date | string | null | Yes | Latest queryable usage data date, YYYY-MM-DD. |
Error responses
| HTTP | Description and handling |
|---|---|
400 | The request does not conform to the parameter contract. |
401 | Missing or invalid token. Check the organization-authorized access token. |
403 | Organization authorization, operator permission, or application source IP validation failed. |
422 | Parameter values failed Biz validation. Check the request path and parameters. |
429 | Rate limit exceeded. Reduce the call rate before retrying. |
500 | Databus rejected the query or Biz processing failed. Retain the request ID and contact support. |
502 | The usage upstream response is invalid, or Gateway did not obtain a valid Biz response. Retain the request ID and contact support. |
503 | A usage dependency, Biz, or the platform is temporarily unavailable. Retry later. |
504 | The call timed out. |
default | Other platform or service error. Handle according to error_code and retain the request ID. |
Complete field contract
The JSON below contains this API's complete request, response, and error schemas, nested constraints, and public extension definitions. Copy it for reference. No success examples are inferred where none are declared.Expand the complete API OpenAPI JSON
Expand the complete API OpenAPI JSON
Copy
{
"components": {
"securitySchemes": {
"OpenPlatformBearer": {
"description": "Organization-authorized application access token; Scope does not replace operator permissions or resource isolation",
"scheme": "bearer",
"type": "http"
}
}
},
"openapi": "3.1.0",
"paths": {
"/v1/biz/usage/meta": {
"get": {
"description": "Get the latest available usage statistics date and data update time to determine the data date for subsequent member usage queries.\n\nThe application requires biz.usage.read authorization, and the operator requires organization usage read permission. No business parameters are required.\n\nSuccess returns latest_usage_data_date and last_data_update_time. Both are null when no statistics are available. The update time uses the timestamp string provided by the data source.",
"operationId": "biz-get-usage-metadata",
"responses": {
"200": {
"content": {
"application/json": {
"example": {
"last_data_update_time": "2026-11-13 02:15:00",
"latest_usage_data_date": "2026-11-12"
},
"schema": {
"additionalProperties": false,
"properties": {
"last_data_update_time": {
"description": "Statistics update time, unchanged from Databus.",
"type": [
"string",
"null"
]
},
"latest_usage_data_date": {
"description": "Latest queryable usage data date, YYYY-MM-DD.",
"type": [
"string",
"null"
]
}
},
"required": [
"latest_usage_data_date",
"last_data_update_time"
],
"type": "object"
}
}
},
"description": "Usage data metadata retrieved successfully.",
"headers": {
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"400": {
"content": {
"application/json": {
"example": {
"code": 400,
"data": null,
"error_code": "OPENAPI_INVALID_REQUEST",
"msg": "请求参数不符合接口要求"
},
"schema": {
"additionalProperties": false,
"properties": {
"code": {
"type": "integer"
},
"data": {
"type": "null"
},
"error_code": {
"type": "string"
},
"msg": {
"type": "string"
},
"request_id": {
"type": "string"
},
"trace_id": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data",
"error_code"
],
"type": "object"
}
}
},
"description": "The request does not conform to the parameter contract.",
"headers": {
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"401": {
"content": {
"application/json": {
"example": {
"code": 401,
"data": null,
"error_code": "OPENAPI_UNAUTHENTICATED",
"msg": "访问凭证缺失、无效或已失效"
},
"schema": {
"additionalProperties": false,
"properties": {
"code": {
"type": "integer"
},
"data": {
"type": "null"
},
"error_code": {
"type": "string"
},
"msg": {
"type": "string"
},
"request_id": {
"type": "string"
},
"trace_id": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data",
"error_code"
],
"type": "object"
}
}
},
"description": "Missing or invalid token. Check the organization-authorized access token.",
"headers": {
"WWW-Authenticate": {
"schema": {
"type": "string"
}
},
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"403": {
"content": {
"application/json": {
"example": {
"code": 403,
"data": null,
"error_code": "openapi_permission_denied",
"msg": "没有操作权限"
},
"schema": {
"additionalProperties": false,
"properties": {
"code": {
"type": "integer"
},
"data": {
"type": "null"
},
"error_code": {
"type": "string"
},
"msg": {
"type": "string"
},
"request_id": {
"type": "string"
},
"trace_id": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data",
"error_code"
],
"type": "object"
}
}
},
"description": "Organization authorization, operator permission, or application source IP validation failed.",
"headers": {
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"422": {
"content": {
"application/json": {
"example": {
"code": 422,
"data": null,
"error_code": "OPENAPI_INVALID_REQUEST",
"msg": "请求参数无效"
},
"schema": {
"additionalProperties": false,
"properties": {
"code": {
"type": "integer"
},
"data": {
"type": "null"
},
"error_code": {
"type": "string"
},
"msg": {
"type": "string"
},
"request_id": {
"type": "string"
},
"trace_id": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data",
"error_code"
],
"type": "object"
}
}
},
"description": "Parameter values failed Biz validation. Check the request path and parameters.",
"headers": {
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"429": {
"content": {
"application/json": {
"example": {
"code": 429,
"data": null,
"error_code": "OPENAPI_RATE_LIMITED",
"msg": "调用频率超限"
},
"schema": {
"additionalProperties": false,
"properties": {
"code": {
"type": "integer"
},
"data": {
"type": "null"
},
"error_code": {
"type": "string"
},
"msg": {
"type": "string"
},
"request_id": {
"type": "string"
},
"trace_id": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data",
"error_code"
],
"type": "object"
}
}
},
"description": "Rate limit exceeded. Reduce the call rate before retrying.",
"headers": {
"Retry-After": {
"description": "Delay in seconds or HTTP date before retrying.",
"schema": {
"type": "string"
}
},
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"500": {
"content": {
"application/json": {
"example": {
"code": 500,
"data": null,
"error_code": "usage_request_rejected",
"msg": "用量查询被上游拒绝"
},
"schema": {
"additionalProperties": false,
"properties": {
"code": {
"type": "integer"
},
"data": {
"type": "null"
},
"error_code": {
"type": "string"
},
"msg": {
"type": "string"
},
"request_id": {
"type": "string"
},
"trace_id": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data",
"error_code"
],
"type": "object"
}
}
},
"description": "Databus rejected the query or Biz processing failed. Retain the request ID and contact support.",
"headers": {
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"502": {
"content": {
"application/json": {
"example": {
"code": 502,
"data": null,
"error_code": "usage_upstream_invalid",
"msg": "用量服务返回无效数据"
},
"schema": {
"additionalProperties": false,
"properties": {
"code": {
"type": "integer"
},
"data": {
"type": "null"
},
"error_code": {
"type": "string"
},
"msg": {
"type": "string"
},
"request_id": {
"type": "string"
},
"trace_id": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data",
"error_code"
],
"type": "object"
}
}
},
"description": "The usage upstream response is invalid, or Gateway did not obtain a valid Biz response. Retain the request ID and contact support.",
"headers": {
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"503": {
"content": {
"application/json": {
"example": {
"code": 503,
"data": null,
"error_code": "usage_unavailable",
"msg": "用量服务暂不可用"
},
"schema": {
"additionalProperties": false,
"properties": {
"code": {
"type": "integer"
},
"data": {
"type": "null"
},
"error_code": {
"type": "string"
},
"msg": {
"type": "string"
},
"request_id": {
"type": "string"
},
"trace_id": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data",
"error_code"
],
"type": "object"
}
}
},
"description": "A usage dependency, Biz, or the platform is temporarily unavailable. Retry later.",
"headers": {
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"504": {
"content": {
"application/json": {
"example": {
"code": 504,
"data": null,
"error_code": "OPENAPI_TIMEOUT",
"msg": "请求处理超时"
},
"schema": {
"additionalProperties": false,
"properties": {
"code": {
"type": "integer"
},
"data": {
"type": "null"
},
"error_code": {
"type": "string"
},
"msg": {
"type": "string"
},
"request_id": {
"type": "string"
},
"trace_id": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data",
"error_code"
],
"type": "object"
}
}
},
"description": "The call timed out.",
"headers": {
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"default": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"code": {
"type": "integer"
},
"data": {
"type": "null"
},
"error_code": {
"type": "string"
},
"msg": {
"type": "string"
},
"request_id": {
"type": "string"
},
"trace_id": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data",
"error_code"
],
"type": "object"
}
}
},
"description": "Other platform or service error. Handle according to error_code and retain the request ID.",
"headers": {
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed Trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID of the current open platform request, correlated with X-Request-ID through request logs. A complete trace may not be available if sampling did not retain it.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
}
},
"security": [
{
"OpenPlatformBearer": []
}
],
"summary": "Get usage data metadata",
"tags": [
"用量"
]
}
}
},
"info": {
"title": "Get usage data metadata",
"version": "2026-11-24"
},
"servers": [
{
"url": "https://openapi.qwenwork.ai"
}
]
}