All Products
Search
Document Center

Network Intelligence Service:GetTransitRouterFlowTopN

Last Updated:Apr 29, 2024

Queries the rankings of inter-region traffic data in the form of 1-tuple, 2-tuple, or 5-tuple. Inter-region traffic data can be ranked by metrics such as traffic volumes and the number of packets.

Debugging

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

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
BeginTimelongYes

The beginning of the time range to query. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. The maximum time range that you can query is 24 hours.

1684373600099
EndTimelongYes

The end of the time range to query. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. The maximum time range that you can query is 24 hours.

1638239093000
TopNintegerNo

Specifies the maximum number of data entries to display. Default value: 10. Maximum value: 100.

20
DirectionstringYes

The direction of the inter-region traffic in the local regions or for the local IP addresses. Valid values:

  • in: inbound traffic
  • out: outbound traffic
in
GroupBystringYes

The dimension for ranking inter-region traffic data. The value of this parameter is case-sensitive. Valid values:

  • 1Tuple: queries the rankings of inter-region traffic data for the local regions, Cloud Enterprise Network (CEN) instances, and IP addresses.
  • 2Tuple: queries the rankings of inter-region traffic data for the local and remote regions, and the local and remote IP addresses.
  • 5Tuple: queries the rankings of inter-region traffic data for the local and remote IP addresses, local and remote ports, and protocols.
  • Cen: queries the rankings of inter-region traffic data for CEN instances.
  • RegionPair: queries the rankings of inter-region traffic data for the local and remote regions.
  • Port: queries the rankings of inter-region traffic data for the local and remote ports.
  • Protocol: queries the rankings of inter-region traffic data for the protocols.
1Tuple
ThisRegionstringNo

The local region where the local IP address resides.

cn-shanghai
ThisIpstringNo

The local IP address.

1.8.XX.XX
ThisPortstringNo

The local port.

80
OtherRegionstringNo

The remote region.

ap-southeast-1
OtherIpstringNo

The remote IP address.

122.112.XX.XX
OtherPortstringNo

The remote port.

10869
ProtocolstringNo

The protocol number.

Note All protocols are supported. This parameter is required only if you set GroupBy to 5Tuple or Protocol.
6
OrderBystringNo

The metric for ranking inter-region traffic data. Default value: Bytes. This value specifies that inter-region traffic data is ranked by traffic volume.

Bytes
SortstringNo

The order for ranking inter-region traffic data. Valid values:

  • desc: descending order
  • asc: ascending order
desc
CenIdstringNo

The CEN instance ID.

cen-ia8kw1zjv4hyal****
BandwithPackageIdstringNo

The ID of the CEN bandwidth plan.

cenbwp-ia8kw1zjv4hyal*****
AccountIdsarrayNo

The IDs of the member accounts.

stringNo

The ID of the member account.

[\"118639953821xxxx\"]
UseMultiAccountbooleanNo

Specifies whether to enable the multi-account management feature. Default value: false. This value specifies that the multi-account management feature is disabled.

Note By default, the multi-account management feature is not available. If you want to use this feature, contact your account manager to apply for permissions.
false

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

D5E98683-355B-5867-8D3D-A24755F6895B
TransitRouterFlowTopNobject []

The ranking result of inter-region traffic data.

AccountIdstring

The account ID.

118639953821xxxx
CenIdstring

The CEN instance ID.

cen-ia8kw1zjv4hyal****
ThisRegionstring

The local region where the local IP address resides.

cn-shanghai
ThisIpstring

The local IP address.

1.8.XX.XX
ThisPortstring

The local port.

80
OtherRegionstring

The remote region where the remote IP address resides.

ap-southeast-1
OtherIpstring

The remote IP address.

47.216.XX.XX
OtherPortstring

The remote port.

53470
Protocolstring

The protocol number.

6
StartTimestring

The beginning of the time range that you queried. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2023-01-31T05:40:00Z
EndTimestring

The end of the time range that you queried. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2023-01-31T06:40:00Z
Packetsdouble

The total number of packets in the specified time range.

88
Bytesdouble

The total volume of traffic in the specified time range.

188
BandwithPackageIdstring

The ID of the CEN bandwidth plan.

cenbwp-ia8kw1zjv4hyal****

Examples

Sample success responses

JSONformat

{
  "RequestId": "D5E98683-355B-5867-8D3D-A24755F6895B",
  "TransitRouterFlowTopN": [
    {
      "AccountId": "118639953821xxxx",
      "CenId": "cen-ia8kw1zjv4hyal****",
      "ThisRegion": "cn-shanghai",
      "ThisIp": "1.8.XX.XX",
      "ThisPort": "80",
      "OtherRegion": "ap-southeast-1",
      "OtherIp": "47.216.XX.XX",
      "OtherPort": "53470",
      "Protocol": "6",
      "StartTime": "2023-01-31T05:40:00Z",
      "EndTime": "2023-01-31T06:40:00Z",
      "Packets": 88,
      "Bytes": 188,
      "BandwithPackageId": "cenbwp-ia8kw1zjv4hyal****"
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
400IllegalParam.TopNThe TopN(%s) should not greater than 100.Only top 100 are supported. Actual input: (%s).
400IllegalParam.BeginTimeThe specified begin time (%s) is invalid.The specified start time (%s) is invalid.
400IllegalParam.BeginTimeAndEndTimeIt only supports querying data for up to 7 days: %s.You can query data within the last seven days: %s.
400IllegalParam.OrderByThe specified param of orderBy (%s) is invalid.The specified sort field (%s) is invalid.
400IllegalParam.SortThe specified Sort(%s) is invalid.Valid values for the sort field: desc and asc.
400IllegalParam.AccountIdsThe specified parameter accountId (%s) is invalid.The specified parameter accountId (%s) is invalid.
400IllegalParam.inOrOutValid values for the inOrOut parameter: in and out.Valid values for the inOrOut parameter: in and out.

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

Change history

Change timeSummary of changesOperation
2023-12-07The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
2023-10-24The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change