Queries monitoring data including the amount of network traffic and the number of visits by directory.
Operation description
- This operation is available only to users that are on the whitelist. If the daily peak bandwidth value of your workloads reaches 10 Gbit/s, you can submit a ticket to apply to be included in the whitelist.
- You can call this API operation up to 6,000 times per second per account.
- Data collection by directory is available only to specified domain names within your Alibaba Cloud account. It cannot be enabled for all domain names within your Alibaba Cloud account.
- The average size of the files that belong to the domain name must be larger than 1 MB.
- The number of directories specified for a single domain name cannot exceed 100. If the number of directories exceeds 100, the data accuracy reduces.
- If you do not set StartTime or EndTime, data collected within the last 24 hours is queried. If you set both StartTime and EndTime, data within the specified time range is queried.
- You can query data collected within the last 30 days.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
cdn:DescribeDomainPathData | get | *Domain acs:cdn:*:{#accountId}:domain/{#DomainName} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
PageNumber | integer | No | The number of the page to return. Pages start from page 1. | 1 |
PageSize | integer | No | The number of entries to return on each page. Valid values: integers from 1 to 1000. | 20 |
Path | string | No | The paths that you want to query. Separate paths with forward slashes (/). If you do not set this parameter, all paths are queried. If you set the value to a directory, it must end with a forward slash (/). Note
Fuzzy match is not supported. If you want data to be collected based on a directory, you can specify a specific directory, for example, directory/path/. In this case, bandwidth data is collected based on directory/path/.
| /path/ |
StartTime | string | No | Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. Example: 2016-10-20T04:00:00Z. | 2016-10-20T04:00:00Z |
EndTime | string | No | The end of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. The interval between the start time and end time must be less than 30 days. Example: 2016-10-21T04:00:00Z. | 2016-10-21T04:00:00Z |
DomainName | string | Yes | The accelerated domain name. Note
You can specify only one domain name in each call.
| example.com |
Response parameters
Examples
Sample success responses
JSON
format
{
"EndTime": "2017-09-30T17:00:00Z",
"StartTime": "2017-09-30T16:00:00Z",
"PageSize": 20,
"PageNumber": 1,
"TotalCount": 2,
"DomainName": "example.com",
"DataInterval": "300",
"PathDataPerInterval": {
"UsageData": [
{
"Path": "/path/",
"Time": "2017-09-30T16:00:00Z",
"Acc": 10,
"Traffic": 346
}
]
}
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | InvalidPageSize.Malformed | PageSize must be of type Integer |
400 | InvalidPageSize.ExceedsMaximum | PageSize should be less than or equal to 1000 |
400 | InvalidPageSize.ExceedsMinimum | PageSize should be greater than or equal to 1 |
400 | InvalidPath.Malformed | Path must be of type String |
400 | InvalidStartTime.Malformed | StartTime must be of type String |
400 | InvalidEndTime.Malformed | EndTime must be of type String |
400 | InvalidDomainName.Malformed | DomainName must be of type String |
400 | MissingParameter | DomainName is required |
400 | InvalidDomainName.TooShort | DomainName should be at least 1 chars long |
400 | InvalidPageNumber.Malformed | PageNumber must be of type Integer |
400 | InvalidPageNumber.ExceedsMinimum | PageNumber should be greater than or equal to 1 |
400 | InvalidTime.OverRange | Specified StartTime or EndTime is over range |
For a list of error codes, visit the Service error codes.