Traffic Usage Summary by Day
GET
/pub/user-usage-flow/total
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
| app_key | query | string(password) | Yes | Authentication key |
| start_time | query | string(Y-m-d H:i:s) | No | Start time, can be accurate to seconds. Please note that log records have a delay within 5 minutes. Default is within 7 days. |
| end_time | query | string(Y-m-d H:i:s) | No | End time, can be accurate to seconds. Please note that log records have a delay within 5 minutes. Default is current time. |
| username | query | string | No | Sub-account name, default queries all accounts, can specify sub-account. Please note that if you have added sub-accounts with the same name, this query will return all usage records for proxy accounts with the same name. |
| product_type | query | number | No | Package type |
Response Example
200 Response
{
"code": 200,
"msg": "string",
"data": {
"list": [
{
"day": "2022-08-01",
"flow": 0
}
]
}
}
Response Result
| Status Code | Status Code Meaning | Description | Data Model |
|---|---|---|---|
| 200 | OK | Request successful | Inline |
Response Data Structure
Status Code 200
| Name | Type | Required | Constraint | Chinese Name | Description |
|---|---|---|---|---|---|
| » code | integer | false | none | Status code: 200 success, 3 invalid app_key, 156 account not verified | |
| » msg | string | false | none | Status message | |
| » data | object | false | none | none | |
| »» list | [object] | false | none | none | |
| »»» day | string | false | none | Date | |
| »»» flow | integer | false | none | Traffic consumed, unit: KB |
