All Products
Search
Document Center

CDN:DescribeDomainHttpCodeData

Last Updated:Oct 10, 2026

呼叫DescribeDomainHttpCodeData查詢加速網域5分鐘粒度的HTTP返回碼總數和佔比資料。

Operation description

  • 如果您不指定 StartTime 和 EndTime,該介面返回過去 24 小時的資料;指定 StartTime 和 EndTime,該介面返回指定時間段的資料。

支援查詢的時間粒度

根據單次查詢的最大時間跨度不同,請求參數 Interval 支援不同的查詢資料時間粒度,對應的可查詢歷史資料時間範圍和資料延遲如下:

時間粒度單次查詢的最大時間跨度可查詢歷史資料時間範圍資料延遲
5 分鐘3 天93 天15 分鐘
1 小時31 天186 天一般延遲 3-4 小時
1 天366 天366 天一般延遲 4 小時,不超過 24 小時

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cdn:DescribeDomainHttpCodeData

none

*Domain

acs:cdn:*:{#accountId}:domain/{#DomainName}

None None

Request parameters

Parameter

Type

Required

Description

Example

DomainName

string

No

加速網域,多個網域用半形逗號(,)分隔,一次最多支援 500 個網域查詢。

預設查詢所有加速網域。

example.com

StartTime

string

No

獲取資料起始時間點。 日期格式按照 ISO8601 表示法,並使用 UTC 時間,格式為 yyyy-MM-ddTHH:mm:ssZ。

2021-06-29T05:30:00Z

EndTime

string

No

獲取資料結束時間點。 日期格式按照 ISO8601 表示法,並使用 UTC 時間,格式為 yyyy-MM-ddTHH:mm:ssZ。

Note

結束時間需大於起始時間。

2021-06-29T05:45:00Z

Interval

string

No

指定查詢資料的時間粒度,單位:秒。

根據單次查詢的最大時間跨度不同,該參數支援 300(5 分鐘)、3600(1 小時)和 86400(1 天)取值,具體請參見使用說明中支援查詢的時間粒度。

300

IspNameEn

string

No

電信業者英文名,透過 DescribeCdnRegionAndIsp 介面獲得。如不填該參數,則代表預設查詢所有電信業者。

unicom

LocationNameEn

string

No

區域英文名,透過 DescribeCdnRegionAndIsp 介面獲得。如不填該參數,則代表預設查詢所有區域。

beijing

Response elements

Element

Type

Description

Example

object

EndTime

string

結束時間。時間格式為 ISO 8601,使用 UTC 時間。

2021-06-29T05:45:00Z

StartTime

string

開始時間。時間格式為 ISO 8601,使用 UTC 時間。

2021-06-29T05:30:00Z

RequestId

string

請求 ID。

BC858082-736F-4A25-867B-E5B67C85ACF7

DomainName

string

加速網域。

example.com

DataInterval

string

時間間隔。

300

HttpCodeData

object

UsageData

array<object>

每個時間間隔的 HTTP 返回碼佔比資料清單。

array<object>

TimeStamp

string

時間片起始時刻。時間格式為 ISO 8601,使用 UTC 時間。

2021-06-29T05:40:00Z

Value

object

CodeProportionData

array<object>

各返回碼佔比使用資料清單。

object

Code

string

HTTP 返回碼。

200

Proportion

string

佔比使用資料。

66.046511627907

Count

string

總數。

300

Examples

Success response

JSON format

{
  "EndTime": "2021-06-29T05:45:00Z",
  "StartTime": "2021-06-29T05:30:00Z",
  "RequestId": "BC858082-736F-4A25-867B-E5B67C85ACF7",
  "DomainName": "example.com",
  "DataInterval": "300",
  "HttpCodeData": {
    "UsageData": [
      {
        "TimeStamp": "2021-06-29T05:40:00Z",
        "Value": {
          "CodeProportionData": [
            {
              "Code": "200",
              "Proportion": "66.046511627907",
              "Count": "300"
            }
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 MissingTimeParameter The StartTime and EndTime must be both specified. You must set both the start time and the end time.
400 InvalidStartTime.Malformed The specified value of parameter StartTime is malformed.
400 InvalidEndTime.Malformed The specified value of parameter EndTime is malformed.
400 InvalidEndTime.Mismatch Specified EndTime does not match the specified StartTime. StartTime must be earlier than EndTime.
400 InvalidStartTime.ValueNotSupported The specified value of parameter StartTime is not supported.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.