QueryTopsChart
- Print
- PDF
QueryTopsChart
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Available in VPC
Get the top-N chart of the Network Traffic Monitoring service.
Request
This section describes the request format. The method and URI are as follows:
Method | URI |
---|---|
POST | /chart/v1/vpc/traffic/chart/tops |
Request headers
For information about the headers common to all Network Traffic Monitoring APIs, see Network Traffic Monitoring request headers.
Request body
You can include the following data in the body of your request:
Field | Type | Required | Description |
---|---|---|---|
vpcMetricType | String | Required | Traffic collection information
|
directionType | String | Required | Traffic direction
|
trafficType | String | Required | Traffic type
|
period | String | Required | Unit time
|
groupingType | String | Required | Grouping type
|
startTime | Integer | Optional | Measurement start time (millisecond)
|
endTime | Integer | Optional | Measurement end time (millisecond)
|
asNo | String | Optional | Network operator number |
cityCode | String | Optional | City code |
countryCode | String | Optional | Country code |
instanceNo | String | Optional | Instance number |
regionNo | String | Optional | Region number |
typeCode | String | Optional | Type code |
vpcNo | String | Optional | VPC number |
subnetNo | String | Optional | Subnet number |
limit | Integer | Optional | Number of maximum lines
|
Request example
The request example is as follows:
curl --location --request POST 'https://vpc-ntm.apigw.ntruss.com/chart/v1/vpc/traffic/chart/tops' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'x-ncp-dmn_cd: PUB' \
--data '{
"vpcMetricType": "BYTES_MAX",
"directionType": "ALL",
"trafficType": "PRIVATE",
"period": "DAY",
"groupingType": "REGION"
}'
Response
This section describes the response format.
Response body
The response body includes the following data:
Field | Type | Required | Description |
---|---|---|---|
topValues | Array | - | Top-N chart query result |
TopValue
The following describes TopValue
.
Field | Type | Required | Description |
---|---|---|---|
name | String | - | groupingType name |
no | String | - | groupingType number |
value | Integer | - | Traffic value (bps) |
inValue | Integer | - | Inbound traffic value (bps) |
outValue | Integer | - | Outbound traffic value (bps) |
Response status codes
For information about the HTTP status codes common to all Network Traffic Monitoring APIs, see Network Traffic Monitoring response status codes.
Response example
The response example is as follows:
{
"topValues": [
{
"no": "1",
"name": "Korea",
"value": 41997,
"inValue": 41997,
"outValue": 0
}
]
}
Was this article helpful?