All Products
Search
Document Center

CDN:DescribeDomainPathData

Last Updated:Aug 06, 2024

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
cdn:DescribeDomainPathDataget
  • Domain
    acs:cdn:*:{#accountId}:domain/{#DomainName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
PageNumberintegerNo

The number of the page to return. Pages start from page 1.

1
PageSizeintegerNo

The number of entries to return on each page. Valid values: integers from 1 to 1000.

20
PathstringNo

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/
StartTimestringNo

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
EndTimestringNo

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
DomainNamestringYes

The accelerated domain name.

Note You can specify only one domain name in each call.
example.com

Response parameters

ParameterTypeDescriptionExample
object
EndTimestring

The end of the time range during which data was queried.

2017-09-30T17:00:00Z
StartTimestring

The start of the time range during which data was queried.

2017-09-30T16:00:00Z
PageSizeinteger

The number of entries returned per page.

20
PageNumberinteger

The page number of the returned page. Pages start from page 1.

1
TotalCountinteger

The total number of entries returned.

2
DomainNamestring

The accelerated domain name.

example.com
DataIntervalstring

The time interval. Unit: seconds.

300
PathDataPerIntervalarray<object>

A list of bandwidth values collected at each time interval.

object
Pathstring

The path.

/path/
Timestring

The point in time.

2017-09-30T16:00:00Z
Accinteger

The number of visits to the URL.

10
Trafficinteger

The amount of network traffic. Unit: bytes.

346

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError message
400InvalidPageSize.MalformedPageSize must be of type Integer
400InvalidPageSize.ExceedsMaximumPageSize should be less than or equal to 1000
400InvalidPageSize.ExceedsMinimumPageSize should be greater than or equal to 1
400InvalidPath.MalformedPath must be of type String
400InvalidStartTime.MalformedStartTime must be of type String
400InvalidEndTime.MalformedEndTime must be of type String
400InvalidDomainName.MalformedDomainName must be of type String
400MissingParameterDomainName is required
400InvalidDomainName.TooShortDomainName should be at least 1 chars long
400InvalidPageNumber.MalformedPageNumber must be of type Integer
400InvalidPageNumber.ExceedsMinimumPageNumber should be greater than or equal to 1
400InvalidTime.OverRangeSpecified StartTime or EndTime is over range

For a list of error codes, visit the Service error codes.