QueryLineChart
    • PDF

    QueryLineChart

    • PDF

    Article Summary

    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

    keyessentialTypeConstraintsDescription
    trafficTypeYTrafficTypeINTERNET,PRIVATETraffic
    groupingTypeYGroupingTypeSERVER,COUNTRY,CITY,REGION,AS,VPC,SUBNET,PET
    vpcMetricTypeYVpcMetricTypeBYTES_MAX,BYTES_SUM,PACKTES_MAX,PACKTES_MAX,PACKTES_SUMtraffic collected information
    directionTypeYVpcDirectionTypeIN,OUT,ALLtraffic direction
    periodYPeriodTypeDAY,HOUR,MINUTE,THIRTY_MINUTE,FIFTEEN_MINUTEUnit time
    startTimeYLongMillisecondMeasurement Start Time
    endTimeYLongMillisecondMeasurement End Time
    asNoNStringCarrier Number
    cityCodeNStringCityCode
    countryCodeNStringCountryCode
    instanceNoNStringInstanceNo
    regionNoNStringRegionNo
    typeCodeNStringTypeCode
    vpcNoNStringVPC Number
    subnetNoNStringSubnet Number
    limitYIntegerdefault: 10, Maximum: 3000Maximum number of lines
    • BYTES_SUM: The average of traffic total for 1 minute
    • BYTES_MAX: Traffic maximum value for 1 minute.

    Response body

    keyTypeConstraintsDescription
    topValuesList[VpcLineChart]

    VpcLineChart

    keyTypeConstraintsDescription
    noStringNumber of Grouping type
    nameStringName of Grouping type
    timeValueList[TimeValue]Traffic by time
    inTimeValueList[TimeValue]Inbound traffic by time
    outTimeValueList[TimeValue]Outbound traffic by time
    totalLineStatisticList[TimeValue]Statistical information of traffic
    inLineStatisticList[TimeValue]IStatistical information of inbound traffic
    outLineStatisticList[TimeValue]Statistical information of outbound traffic

    TimeValue

    KeyTypeConstraintsDescription
    timeIntegertime
    valueFloatunit: bpsTraffic value

    VpcLineStatistic

    KeyTypeConstraintsDescription
    sumFloatUnit: bpsThe sum of traffic
    avgFloatUnit: bpsThe average of traffic
    minFloatUnit: bpsThe minimum of traffic
    maxFloatUnit: bpsThe maximum of traffic
    lastFloatUnit: bpsThe 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?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.