Querying Statistics About Domain Names
Function
- You can query data within the past 90 days.
- The time span of data queried cannot exceed 7 days.
- You can specify up to 100 domain names at a query.
- The start time and end time must be both specified.
- The start time and end time must be timestamps in milliseconds. Only exact 5-minute intervals are allowed, for example, 0 minutes, 5 minutes, 10 minutes, and 15 minutes. If the values are not exact 5-minute intervals, the returned data may not be the expected data.
- If the start time is 2019-01-24 20:15:00, the statistics in [20:15:00, 20:20:00) are collected.
- Unit: byte for traffic-related metrics, bit/s for bandwidth-related metrics, and number of times for request quantity. You can query statistics about specific domain names and details about specific metrics.
- If multiple domain names are passed, the data of each domain name is returned separately.
- You can query up to 10 metrics each time.
URI
GET /v1.0/cdn/statistics/domain-item-details
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enterprise_project_id |
No |
String |
Enterprise project that the resource belongs to. This parameter is valid only when the enterprise project function is enabled. The value all indicates all projects. This parameter is mandatory when you use an IAM user to call this API. |
start_time |
Yes |
Long |
Query start time (timestamp). Only exact 5-minute intervals are allowed. |
end_time |
Yes |
Long |
Query end time (timestamp). Only exact 5-minute intervals are allowed. |
domain_name |
Yes |
String |
Domain name list. Domain names are separated by commas (,), for example, www.test1.com,www.test2.com. The value all indicates that all domain names under your account are queried. |
service_area |
No |
String |
Possible values are mainland_china and outside_mainland_china. The default value is mainland_china. |
stat_type |
Yes |
String |
Network resource consumption statistics
Access statistics
HTTP status code statistics (one or more types can be returned)
|
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
domain_item_details |
DomainItemDetail object |
Domain name details. |
Parameter |
Type |
Description |
---|---|---|
start_time |
Long |
Time when data collection starts (timestamp). The time may be different from the request time. |
end_time |
Long |
Time when data collection ends (timestamp). The time may be different from the request time. |
stat_type |
String |
Metric type. |
domains |
Array of Map<String,Object> objects |
Metric data. If there is no data in the query time segment, an empty array [] is returned. |
Example Request
GET https://cdn.myhuaweicloud.com/v1.0/cdn/statistics/domain-item-details?start_time=1515996000000&end_time=1515999600000&domain_name=www.test1.com,www.test2.com&stat_type=flux
Example Response
Status code: 200
OK
{ "domain_item_details" : { "start_time" : 1515996000000, "end_time" : 1515999600000, "stat_type" : "flux", "domains" : [ { "domain_name" : "www.test1.com", "flux" : [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] }, { "domain_name" : "www.test2.com", "flux" : [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] } ] } }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot