Queries the monitoring data of the WebSocket network traffic for one or more accelerated domains. The maximum time range that you can specify for each request is the last 90 days.

Before you call this operation, pay attention to the following notes:
  • If you specify neither the StartTime parameter nor the EndTime parameter, the data within the last 24 hours is returned. If you specify the StartTime and EndTime parameters, the data within the specified time range is returned.
  • You can specify multiple accelerated domain names and separate them with commas (,).
  • The monitoring data is measured in bytes.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeDcdnDomainWebsocketTrafficData

The operation that you want to perform. Set the value to DescribeDcdnDomainWebsocketTrafficData.

DomainName String No example.com

The names of the accelerated domains. If you need to specify multiple accelerated domain names, separate them with commas (,).

By default, the operation returns the monitoring data for all the accelerated domains.

StartTime String No 2017-12-10T20:00:00Z

The beginning 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.

EndTime String No 2017-12-10T21:00:00Z

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 end time must be later than the start time.

Interval String No 300

The data collection interval. Unit: second. The value varies based on the values of the StartTime and EndTime parameters. Valid values:

  • If the time range from the start time to the end time is less than 3 days, valid values are 300, 3600, and 86400. The default value is 300.
  • If the time range from the start time to the end time is from 3 to 31 days (31 days excluded), valid values are 3600 and 86400. The default value is 3600.
  • If the time range from the start time to the end time is 31 days or longer, the valid value is 86400. The default value is 86400.
IspNameEn String No unicom

The name of the Internet service provider (ISP). You can call the DescribeCdnRegionAndIsp operation to query ISPs. If you do not specify this parameter, the operation returns the monitoring data for all the ISPs.

LocationNameEn String No beijing

The name of the region. You can call the DescribeCdnRegionAndIsp operation to query regions. If you do not specify this parameter, the operation returns the monitoring data for all the regions.

Response parameters

Parameter Type Example Description
DataInterval String 300

The data collection interval. Unit: second.

DomainName String example.com

The name of the accelerated domain.

EndTime String 2017-12-10T21:00:00Z

The end time.

RequestId String B955107D-E658-4E77-B913-E0AC3D31693E

The ID of the request.

StartTime String 2017-12-10T20:00:00Z

The start time.

TrafficDataPerInterval Array

The network traffic data that is collected for each interval.

DataModule
TimeStamp String 2017-12-10T20:00:00Z

The timestamp of the returned data.

WebsocketTraffic Float 423304182

The total network traffic.

Examples

Sample requests

http://dcdn.aliyuncs.com/?Action=DescribeDcdnDomainWebsocketTrafficData
&DomainName=example.com
&StartTime=2017-12-10T20:00:00Z
&EndTime=2017-12-10T21:00:00Z
&<Common request parameters>

Sample success responses

XML format

<DescribeDcdnDomainWebsocketTrafficDataResponse>
	  <DomainName>example.com</DomainName>
	  <DataInterval>300</DataInterval>
	  <TrafficDataPerInterval>
		    <DataModule>
			      <TimeStamp>2017-12-10T20:00:00Z</TimeStamp>
			      <WebsocketTraffic>423304182</WebsocketTraffic>
		    </DataModule>
	  </TrafficDataPerInterval>
	  <RequestId>B955107D-E658-4E77-B913-E0AC3D31693E</RequestId>
	  <StartTime>2017-12-10T20:00:00Z</StartTime>
	  <EndTime>2017-12-10T21:00:00Z</EndTime>
</DescribeDcdnDomainWebsocketTrafficDataResponse>

JSON format

{
    "DomainName": "example.com",
    "DataInterval": "300",
    "TrafficDataPerInterval": {
        "DataModule": [
            {
                "TimeStamp": "2017-12-10T20:00:00Z",
                "WebsocketTraffic": 423304182
            }
        ]
    },
    "RequestId": "B955107D-E658-4E77-B913-E0AC3D31693E",
    "StartTime": "2017-12-10T20:00:00Z",
    "EndTime": "2017-12-10T21:00:00Z"
}

Error codes

HttpCode Error code Error message Description
400 MissingTimeParameter The StartTime and EndTime must be both specified. The error message returned because only the StartTime parameter or the EndTime parameter is specified. Specify both parameters or leave both parameters empty.
400 InvalidEndTime.Malformed The specified EndTime is invalid. The error message returned because the format of the specified end time is invalid. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
400 InvalidEndTime.Mismatch The specified EndTime is earlier than the StartTime. The error message returned because the specified end time is earlier than the specified start time.
400 InvalidStartTime.ValueNotSupported The specified StartTime is invalid. The error message returned because the specified start time is not supported. Specify another value.

For a list of error codes, visit the API Error Center.