QueryTopsChart
    • PDF

    QueryTopsChart

    • PDF

    Article summary

    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:

    MethodURI
    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:

    FieldTypeRequiredDescription
    vpcMetricTypeStringRequiredTraffic collection information
    • BYTES_MAX | BYTES_SUM | PACKETS_MAX | PACKETS_SUM
      • BYTES_MAX: 1-minute traffic peak
      • BYTES_SUM: Average of 1-minute traffic totals
      • PACKETS_MAX: Maximum 1-minute packets
      • PACKETS_SUM: Average of 1-minute packet totals
    directionTypeStringRequiredTraffic direction
    • IN | OUT | ALL
    trafficTypeStringRequiredTraffic type
    • INTERNET | PRIVATE
    periodStringRequiredUnit time
    • DAY | HOUR | MINUTE | THIRTY_MINUTE | FIFTEEN_MINUTE
    groupingTypeStringRequiredGrouping type
    • SERVER | COUNTRY | CITY | REGION | AS | VPC | SUBNET | TYPE
    startTimeIntegerOptionalMeasurement start time (millisecond)
    • Unix timestamp format
    endTimeIntegerOptionalMeasurement end time (millisecond)
    • Unix timestamp format
    asNoStringOptionalNetwork operator number
    cityCodeStringOptionalCity code
    countryCodeStringOptionalCountry code
    instanceNoStringOptionalInstance number
    regionNoStringOptionalRegion number
    typeCodeStringOptionalType code
    vpcNoStringOptionalVPC number
    subnetNoStringOptionalSubnet number
    limitIntegerOptionalNumber of maximum lines
    • 1 - 3000 (default: 10)

    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:

    FieldTypeRequiredDescription
    topValuesArray-Top-N chart query result

    TopValue

    The following describes TopValue.

    FieldTypeRequiredDescription
    nameString-groupingType name
    noString-groupingType number
    valueInteger-Traffic value (bps)
    inValueInteger-Inbound traffic value (bps)
    outValueInteger-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?

    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.