You can call the DescribeDomainFileSizeProportionData operation to query the proportion of file sizes with a minimum time granularity of one hour.

  • If you do not set the StartTime and EndTime parameters, the data within the last 24 hours is queried.
  • If you set both the StartTime and EndTime parameters, the data within the specified time range is queried.
Note
  • You can query either one domain name or all domain names under your account.
  • The maximum time range that you can specify is the last 90 days.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required Description
Action String  Yes The operation that you want to perform. Set this parameter to DescribeDomainFileSizeProportionData.
DomainName String Yes The domain name that you want to query. You can specify only one domain name.
StartTime String No The beginning of the time range where the data is queried.
  • Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format.
  • The time must be in UTC.
  • The minimum time granularity is one hour.
  • If you do not set this parameter, the data in the last 24 hours is queried.
EndTime String No
  • The end of the time range where the data is queried. The end time must be later than the start time.
  • Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format.
  • The time must be in UTC.

Response parameters

Parameter Type Description
RequestId String The ID of the request.
DomainName String The domain name information.
DataInterval String The data sampling interval, which is set to one hour or one day.
StartTime DateTime The beginning of the time range where the data was queried.
EndTime DateTime The end of the time range where the data was queried.
FileSizeProportionDataInterval UsageData[] The number of queries per second at each interval.

UsageData

Parameter Type Description
TimeStamp String The timestamp of the data.
Value FileSizeProportionData [] The list of proportions of file sizes.

FileSizeProportionData

Parameter Type Description
FileSize String  The file size range.
Proportion String The proportion of the file size.

Examples

Sample request

http://cdn.aliyuncs.com?Action=DescribeDomainFileSizeProportionData&DomainName=example.com
&StartTime=2015-11-30T01:33:00Z
&EndTime=2015-11-30T05:40:00Z
&<Common request parameters>

Sample success response

JSON format

{
    "DataInterval": "3600",
    "RequestId": "23ACE7E2-2302-42E3-98F8-E5E697FD86C3",
    "FileSizeProportionDataInterval": {
        "UsageData": [
            {
                "Value": {
                    "FileSizeProportionData": [
                        {
                            "FileSize": "<1M",
                            "Proportion": "7.91"
                        },
                        {
                            "FileSize": "<20K",
                            "Proportion": "0.137"
                        },
                        {
                            "FileSize": "<5K",
                            "Proportion": "64.544"
                        },
                        {
                            "FileSize": ">1M",
                            "Proportion": "21.334"
                        },
                        {
                            "FileSize": "<10K",
                            "Proportion": "0.01"
                        },
                        {
                            "FileSize": "<50K",
                            "Proportion": "0.02"
                        },
                        {
                            "FileSize": "<100K",
                            "Proportion": "6.046"
                        }
                    ]
                },
                "TimeStamp": "2015-11-30T03:00:00Z"
            },
            {
                "Value": {
                    "FileSizeProportionData": [
                        {
                            "FileSize": "<1M",
                            "Proportion": "4.564"
                        },
                        {
                            "FileSize": "<20K",
                            "Proportion": "0.645"
                        },
                        {
                            "FileSize": "<5K",
                            "Proportion": "69.746"
                        },
                        {
                            "FileSize": ">1M",
                            "Proportion": "18.534"
                        },
                        {
                            "FileSize": "<10K",
                            "Proportion": "0.01"
                        },
                        {
                            "FileSize": "<50K",
                            "Proportion": "0.068"
                        },
                        {
                            "FileSize": "<100K",
                            "Proportion": "6.432"
                        }
                    ]
                },
                "TimeStamp": "2015-11-30T04:00:00Z"
            },
            {
                "Value": {
                    "FileSizeProportionData": [
                        {
                            "FileSize": "<1M",
                            "Proportion": "16.066"
                        },
                        {
                            "FileSize": "<20K",
                            "Proportion": "0.07"
                        },
                        {
                            "FileSize": "<5K",
                            "Proportion": "52.842"
                        },
                        {
                            "FileSize": ">1M",
                            "Proportion": "26.43"
                        },
                        {
                            "FileSize": "<10K",
                            "Proportion": "0.018"
                        },
                        {
                            "FileSize": "<50K",
                            "Proportion": "0.026"
                        },
                        {
                            "FileSize": "<100K",
                            "Proportion": "4.547"
                        }
                    ]
                },
                "TimeStamp": "2015-11-30T02:00:00Z"
            },
            {
                "Value": {
                    "FileSizeProportionData": [
                        {
                            "FileSize": "<1M",
                            "Proportion": "4.521"
                        },
                        {
                            "FileSize": "<20K",
                            "Proportion": "1.551"
                        },
                        {
                            "FileSize": "<5K",
                            "Proportion": "68.254"
                        },
                        {
                            "FileSize": ">1M",
                            "Proportion": "18.625"
                        },
                        {
                            "FileSize": "<10K",
                            "Proportion": "0.631"
                        },
                        {
                            "FileSize": "<50K",
                            "Proportion": "0.026"
                        },
                        {
                            "FileSize": "<100K",
                            "Proportion": "6.392"
                        }
                    ]
                },
                "TimeStamp": "2015-11-30T05:00:00Z"
            }
        ]
    },
    "DomainName": "example.com",
    "EndTime": "2015-11-30T05:40:00Z",
    "StartTime": "2015-11-30T01:33:00Z"
}

Error codes

Error code Error message HTTP status code Description
Throttling Request was denied due to request throttling. 503 The error message returned because the request is denied due to network traffic throttling.
IllegalOperation Illegal domain, operation is not permitted. 403 The error message returned because the domain name is invalid.
OperationDenied Your account does not open CDN service yet. 403 The error message returned because the CDN service is not activated.
OperationDenied Your CDN service is suspended. 403 The error message returned because the CDN service is suspended.
InvalidDomain.NotFound The domain provided does not belong to you. 404 The error message returned because the domain name does not exist or does not belong to you.
InvalidDomain.Offline The domain provided is offline. 404 The error message returned because the domain name is disabled.
ServiceBusy The specified Domain is configuring, please retry later. 403 The error message returned because the domain name is being configured. Please try again later.
InvalidDomain.Configure_failed Failed to configure the provided domain. 500 The error message returned because the domain name configuration fails.
MissingParameter StartTime and EndTime can not be single. 400 The error message returned because you must specify both the StartTime and EndTime parameters.
InvalidStartTime.Malformed Specified start time is malformed. 400 The error message returned because the format of the StartTime parameter is invalid.
InvalidEndTime.Malformed Specified end time is malformed. 400 The error message returned because the format of the EndTime parameter is invalid.
InvalidEndTime.Mismatch Specified end time does not math the specified start time. 400 The error message returned because the EndTime is earlier than the StartTime.
InvalidStartTime.ValueNotSupported Specified end time does not math the specified start time. 400 The error message returned because the time range specified by the StartTime and EndTime parameters exceeds 90 days.
InvalidDomainName.ValueNotSupported InvalidDomainName.ValueNotSupported 400 The error message returned because you can only set the DomainName parameter to one domain name or leave the parameter empty.