QueryLineChart
    • PDF

    QueryLineChart

    • PDF

    Article Summary

    개요

    VPC 환경에서 이용 가능합니다.

    NTM의 line chart를 조회합니다.

    요청

    API URL

    URL: https://vpcntm.apigw.finntruss.com/chart/v1/vpc/traffic/chart/lines
    Method: POST
    

    요청 헤더

    공통설정에 명시된 요청헤더가 필요합니다.

    x-ncp-apigw-signature-v2: {generated signature}
    x-ncp-apigw-timestamp: {current timestamp}
    x-ncp-iam-access-key: {your iam access key}
    

    요청 바디

    key필수 여부타입제약사향설명
    trafficTypeYTrafficTypeINTERNET, PRIVATEtraffic의 종류
    groupingTypeYGroupingTypeSERVER, COUNTRY, CITY, REGION, AS, VPC, SUBNET, TYPEgrouping 종류
    vpcMetricTypeYVpcMetricTypeBYTES_MAX, BYTES_SUM, PACKTES_MAX, PACKTES_SUMtraffic 수집 정보
    directionTypeYVpcDirectionTypeIN, OUT, ALLtraffic의 방향
    periodYPeriodTypeDAY, HOUR, MINUTE, THIRTY_MINUTE, FIFTEEN_MINUTE단위 시간
    startTimeYLongMillisecond측정 시작 시간
    endTimeYLongMillisecond측정 종료 시간
    asNoNString통신사 번호
    cityCodeNString도시 코드
    countryCodeNString국가 코드
    instanceNoNString인스턴스 번호
    regionNoNString지역 번호
    typeCodeNString타입 코드
    vpcNoNStringVPC 번호
    subnetNoNStringSubnet 번호
    limitYIntegerdefault: 10, 최대: 3000최대 line 수
    • BYTES_SUM: 1분간 traffic 총합의 평균
    • BYTES_MAX: 1분간 traffic 최대 값

    응답 바디

    key타입제약사향설명
    topValuesList[VpcLineChart]

    VpcLineChart

    key타입제약사향설명
    noStringGrouping type의 번호
    nameStringGrouping type의 이름
    timeValueList[TimeValue]시간 별 traffic 값
    inTimeValueList[TimeValue]시간 별 inbound traffic 값
    outTimeValueList[TimeValue]시간 별 outbound traffic 값
    totalLineStatisticList[TimeValue]Traffic 통계 정보
    inLineStatisticList[TimeValue]Inbound traffic 통계 정보
    outLineStatisticList[TimeValue]Outbound traffic 통계 정보

    TimeValue

    key타입제약사향설명
    timeInteger시간
    valueFloat단위: bpsTraffic 값

    VpcLineStatistic

    key타입제약사향설명
    sumFloat단위: bpsTraffic 총합
    avgFloat단위: bpsTraffic 평균
    minFloat단위: bpsTraffic 최소 값
    maxFloat단위: bpsTraffic 최대 값
    lastFloat단위: bpsTraffic 마지막 값

    예시

    요청 예시

    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": ""
    }
    

    응답 예시

    오류 없이 조회가 완료된 경우 HTTP code 200과 line chart가 조회됩니다.

    "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
    			}
    		}
    	]
    }
    

    이 문서가 도움이 되었습니까?

    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.