최신 업데이트:2022-03-01 18:22:18
GET /bucketname?statistics&type=requests&method=PUT&startTime=201707200244 HTTP/1.1
Host: Bucket.Endpoint
Date: Date
Authorization: Authorization
Parameters for the interface are as follows:
Name | Description | Required |
---|---|---|
type | Statistics types.Optional values: requests(number of requests) , bandwidth, ObjectNum(number of objects) | Yes |
startTime | The start time of the statistics, accurated to minutes.If endTime is specified, the statistics is from startTime to endTime , and the interval between startTime and endTime cannot exceed one week.Format: YYYYMMDDhhmmss | Yes |
endTime | The start time of the statistics. Format: YYYYMMDDhhmmss | no |
method | Request method for monitoring data . This parameter does not take effect when querying the number of objects.Optional values: PUT /POST | Yes |
Use common request headers .
Request body is not required.
HTTP/1 status_code
x-amz-request-id: request id
Date: date
Content-Type: type
Content-Length: length
<?xml version=”0” encoding=”UTF-8” standalone=”yes”?>
<StatisticsResult xmlns=” http://wcs.chinanetcenter.com/document”>
<Owner>Owner<Owner>
<Bucket>Bucket</Bucket>
<Type>Type</Type>
<Operation >Operation </Operation >
<StartTime>StartTime</StartTime>
<EndTime>EndTime</EndTime>
<Results time="2017-07-23 02:44">2472</Results>
<Results time="2017-07-23 02:45">2546</Results>
……
</StatisticsResult>
Use common response headers .
See description of elements in response in the following table:
Field Name | Description |
---|---|
StatisticsResult | Root Node of response.Child nodes: Owner, Bucket, Type, StartTime, EndTime, ResultsType: XMLParent node: Null |
Owner | Bucket owner.Child node: NullParent node: StatisticsResultType: String |
Bucket | Bucket name.Child node: NullParent node: StatisticsResultType: String |
Type | Statistics types.Child node: NullParent node: StatisticsResultType: String ( requests/bandwidth/ ObjectNum ) |
Operation | Request method.Child node: NullParent node: StatisticsResultType: String ( PUT/POST ) When querying the number of objects, this field is empty |
StartTime | The start time of the statistics.Child node: NullParent node: StatisticsResultType: String (Format: YYYYMMDDhhmm) |
EndTime | The end time of the statistics.Child node: NullParent node: StatisticsResultType: String (Format: YYYYMMDDhhmm ) |
Results | Child node: NullParent node: StatisticsResultType: String |
Senario | HTTP status code | Error code | Message |
---|---|---|---|
A required parameter is missing from the request | 400 Bad Request | InvalidArgument | Please provide parameter {parameter name} |
The sub-resource is misspelled or not included when requesting | 405 Method Not Allowed | MethodNotAllowed | MethodNotAllowed |
The Method in the request does not belong to one of these methods: GET, HEAD, POST, PATCH, DELETE, OPTIONS, TRACE | 400 Bad Request | InvalidArgument | Method is invalid |
The startTime/endTime parameter format is illegal when requesting | 400 Bad Request | InvalidArgument | {parameter name} is Invalid |
The start time in the request is later than the current time | 400 Bad Request | InvalidArgument | {parameter name} is invalid |
in the request Start time is later than end time | 400 Bad Request | InvalidArgument | The startTIme must be less than endTime |
The end time in the request is later than the current time | 400 Bad Request | InvalidArgument | {parameter name} is invalid |
URL expires | 403 Forbidden | RequestTimeTooSkewed | The difference between the request time and the current time is too large. |
The actual interval between requested queries is greater than one week | 400 Bad Request | InvalidArgument | The difference between the startTime and endTime must be less than one week. |
The “type” in the request is not supported ( Spelling mistake and unsupported query are involed ) | 400 Bad Request | InvalidArgument | Parameter Type only support requests and bandwidth |
Send the same request over twice in a minute | 429 Too Many Requests | TooManyRequests | You have sent too many requests in a given amount of time. |