QueryLineChart
- Print
- PDF
QueryLineChart
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Overview
Available in the VPC environment.
Inquire NTM's line chart.
Request
API URL
URL: https://vpc-ntm.apigw.ntruss.com/chart/v1/vpc/traffic/chart/lines
Method: POST
Request header
The request header specified in the common setting is required.
x-ncp-apigw-signature-v2: {generated signature}
x-ncp-apigw-timestamp: {current timestamp}
x-ncp-iam-access-key: {your iam access key}
Request body
key | essential | Type | Constraints | Description |
---|---|---|---|---|
trafficType | Y | TrafficType | INTERNET ,PRIVATE | Traffic |
groupingType | Y | GroupingType | SERVER ,COUNTRY ,CITY ,REGION ,AS ,VPC ,SUBNET ,PET | |
vpcMetricType | Y | VpcMetricType | BYTES_MAX ,BYTES_SUM ,PACKTES_MAX ,PACKTES_MAX ,PACKTES_SUM | traffic collected information |
directionType | Y | VpcDirectionType | IN ,OUT ,ALL | traffic direction |
period | Y | PeriodType | DAY ,HOUR ,MINUTE ,THIRTY_MINUTE ,FIFTEEN_MINUTE | Unit time |
startTime | Y | Long | Millisecond | Measurement Start Time |
endTime | Y | Long | Millisecond | Measurement End Time |
asNo | N | String | Carrier Number | |
cityCode | N | String | CityCode | |
countryCode | N | String | CountryCode | |
instanceNo | N | String | InstanceNo | |
regionNo | N | String | RegionNo | |
typeCode | N | String | TypeCode | |
vpcNo | N | String | VPC Number | |
subnetNo | N | String | Subnet Number | |
limit | Y | Integer | default: 10, Maximum: 3000 | Maximum number of lines |
BYTES_SUM
: The average of traffic total for 1 minuteBYTES_MAX
: Traffic maximum value for 1 minute.
Response body
key | Type | Constraints | Description |
---|---|---|---|
topValues | List[VpcLineChart] |
VpcLineChart
key | Type | Constraints | Description |
---|---|---|---|
no | String | Number of Grouping type | |
name | String | Name of Grouping type | |
timeValue | List[TimeValue] | Traffic by time | |
inTimeValue | List[TimeValue] | Inbound traffic by time | |
outTimeValue | List[TimeValue] | Outbound traffic by time | |
totalLineStatistic | List[TimeValue] | Statistical information of traffic | |
inLineStatistic | List[TimeValue] | IStatistical information of inbound traffic | |
outLineStatistic | List[TimeValue] | Statistical information of outbound traffic |
TimeValue
Key | Type | Constraints | Description |
---|---|---|---|
time | Integer | time | |
value | Float | unit: bps | Traffic value |
VpcLineStatistic
Key | Type | Constraints | Description |
---|---|---|---|
sum | Float | Unit: bps | The sum of traffic |
avg | Float | Unit: bps | The average of traffic |
min | Float | Unit: bps | The minimum of traffic |
max | Float | Unit: bps | The maximum of traffic |
last | Float | Unit: bps | The last of traffic |
Example
Request Example
POST /vpc/traffic/chart/lines
Host: vpc-ntm.apigw.ntruss.com
x-ncp-apigw-signature-v2: {generated signature}
x-ncp-apigw-timestamp: {current timestamp}
x-ncp-iam-access-key: {your iam access key}
{
"trafficType": "PRIVATE",
"groupingType": "REGION",
"vpcMetricType": "BYTES_MAX",
"directionType": "ALL",
"period": "FIFTEEN_MINUTE",
"startTime": 1644205260000,
"endTime": 1644226860000,
"asNo": "",
"cityCode": "",
"countryCode": "",
"instanceNo": "",
"regionNo": "",
"typeCode": "",
"vpcNo": ""
}
Response Example
- Http status 200 is provided for normal response
"charts": [
{
"name": "Korea",
"no": "1",
"timeValue": [
{
"time": 1644205500000,
"value": 0.0
},
{
"time": 1644206400000,
"value": 17172.0
}
],
"inTimeValue": [
{
"time": 1644205500000,
"value": 0.0
},
{
"time": 1644206400000,
"value": 0.0
}
],
"outTimeValue": [
{
"time": 1644205500000,
"value": 0.0
},
{
"time": 1644206400000,
"value": 17172.0
}
],
"inLineStatistic": {
"sum": 0.0,
"avg": 0.0,
"min": 0.0,
"max": 0.0,
"last": 0.0
},
"outLineStatistic": {
"sum": 94446.0,
"avg": 3935.25,
"min": 0.0,
"max": 17172.0,
"last": 0.0
},
"totalLineStatistic": {
"sum": 94446.0,
"avg": 3935.25,
"min": 0.0,
"max": 17172.0,
"last": 0.0
}
}
]
}
Was this article helpful?