QueryLineChart
    • PDF

    QueryLineChart

    • PDF

    Article summary

    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:

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

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

    FieldTypeRequiredDescription
    chartsArray-line chart query result

    VpcLineChart

    The following describes VpcLineChart.

    FieldTypeRequiredDescription
    nameString-groupingType name
    noString-groupingType number
    timeValueArray-Traffic values by time
    inTimeValueArray-Inbound traffic values by time
    outTimeValueArray-Outbound traffic values by time
    totalLineStatisticArray-Traffic statistics information
    inLineStatisticArray-Inbound traffic statistics information
    outLineStatisticArray-Outbound traffic statistics information

    Timevalue

    The following describes Timevalue.

    FieldTypeRequiredDescription
    timeInteger-Time
    • Unix timestamp format
    valueNumber-Traffic value (bps)

    VpcLineStatistic

    The following describes VpcLineStatistic.

    FieldTypeRequiredDescription
    sumNumber-Traffic sum (bps)
    avgNumber-Traffic average (bps)
    minNumber-Traffic minimum (bps)
    maxNumber-Traffic maximum (bps)
    lastNumber-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
          }
        }
      ]
    }
    

    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.