- Print
- PDF
QueryLineChart
- Print
- PDF
Available in VPC
Get the line 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/lines |
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:
The required status was modified as follows:
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/lines' \
--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 |
---|---|---|---|
charts | Array | - | line chart query result |
VpcLineChart
The following describes VpcLineChart
.
Field | Type | Required | Description |
---|---|---|---|
name | String | - | groupingType name |
no | String | - | groupingType number |
timeValue | Array | - | Traffic values by time |
inTimeValue | Array | - | Inbound traffic values by time |
outTimeValue | Array | - | Outbound traffic values by time |
totalLineStatistic | Array | - | Traffic statistics information |
inLineStatistic | Array | - | Inbound traffic statistics information |
outLineStatistic | Array | - | Outbound traffic statistics information |
Timevalue
The following describes Timevalue
.
Field | Type | Required | Description |
---|---|---|---|
time | Integer | - | Time
|
value | Number | - | Traffic value (bps) |
VpcLineStatistic
The following describes VpcLineStatistic
.
Field | Type | Required | Description |
---|---|---|---|
sum | Number | - | Traffic sum (bps) |
avg | Number | - | Traffic average (bps) |
min | Number | - | Traffic minimum (bps) |
max | Number | - | Traffic maximum (bps) |
last | Number | - | Last 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:
{
"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": 0.0,
"avg": 0.0,
"min": 0.0,
"max": 0.0,
"last": 0.0
},
"totalLineStatistic": {
"sum": 0.0,
"avg": 0.0,
"min": 0.0,
"max": 0.0,
"last": 0.0
}
}
]
}