Get usage

Prev Next

Available in Classic and VPC

Get CDN service usage within the query period.

Request

This section describes the request format. The method and URI are as follows:

Method URI
GET | POST /cdn/v2/getGlobalCdnUsageData
Note

This guide is based on the GET method. POST method call tests can be performed through Swagger in the API Gateway service of the NAVER Cloud Platform console.

Request headers

For information about the headers common to all Global CDN APIs, see Global CDN request headers.

Request query parameters

You can use the following query parameters with your request:

Field Type Required Description
cdnInstanceNoList.N Array Required CDN instance number list
  • See Get instance.
  • Example: cdnInstanceNoList.1=2323&cdnInstanceNoList.2=1212
startDate String Required Query start date and time
  • yyyyMMddHH format.
  • Get aggregate data at 1-hour intervals from the query start date and time.
endDate String Required Query end date and time
  • yyyyMMddHH format
responseFormatType String Optional Format of the response data
  • xml (default) | json

Request example

The request example is as follows:

curl --location --request GET 'https://ncloud.apigw.ntruss.com/cdn/v2/getGlobalCdnUsageData?cdnInstanceNoList.1=2851****&startDate=2025071623&endDate=2025071817&responseFormatType=json' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
getGlobalCdnUsageDataResponse Object - Response result
getGlobalCdnUsageDataResponse.startDate String - Search start date and time
getGlobalCdnUsageDataResponse.endDate String - Search end date and time
getGlobalCdnUsageDataResponse.aggregation Number - Aggregation interval (second)
getGlobalCdnUsageDataResponse.volumeDataRecordList Array - Transfer volume data list
  • [timestamp, value] format
getGlobalCdnUsageDataResponse.requestDataRecordList Array - Request count data list
  • [timestamp, value] format
getGlobalCdnUsageDataResponse.bandwidthDataRecordList Array - Traffic data list
  • [timestamp, value] format
getGlobalCdnUsageDataResponse.volumeDataUnit String - Transfer volume unit: bytes (valid value)
getGlobalCdnUsageDataResponse.requestDataUnit String - Request count unit: count (valid value)
getGlobalCdnUsageDataResponse.bandwidthDataUnit String - Traffic unit: Mbps (valid value)
getGlobalCdnUsageDataResponse.pointStart Number - Query start date and time (millisecond)
  • Unix timestamp format
getGlobalCdnUsageDataResponse.pointInterval Number - Aggregation interval (millisecond)
getGlobalCdnUsageDataResponse.maxBandwidth Number - Maximum traffic within the query period
getGlobalCdnUsageDataResponse.totalVolume Number - Total transfer volume within the query period
getGlobalCdnUsageDataResponse.totalRequest Number - Total request count within the query period
getGlobalCdnUsageDataResponse.requestId String - ID for the request
  • UUID format
getGlobalCdnUsageDataResponse.returnCode String - Response code
getGlobalCdnUsageDataResponse.returnMessage String - Response message

Response status codes

For information about the HTTP status codes common to all Global CDN APIs, see Global CDN response status codes.

Response example

The response example is as follows:

{
    "getGlobalCdnUsageDataResponse": {
        "startDate": "2025071623",
        "endDate": "2025071817",
        "aggregation": 86400,
        "volumeDataRecordList": [
            [
                1752674400000,
                0
            ],
            [
                1752760800000,
                1371687657
            ]
        ],
        "requestDataRecordList": [
            [
                1752674400000,
                0
            ],
            [
                1752760800000,
                6
            ]
        ],
        "bandwidthDataRecordList": [
            [
                1752674400000,
                0
            ],
            [
                1752760800000,
                0.12112437857521904
            ]
        ],
        "volumeDataUnit": "bytes",
        "requestDataUnit": "count",
        "bandwidthDataUnit": "Mbps",
        "pointStart": 1752674400000,
        "pointInterval": 86400000,
        "maxBandwidth": 0.12112437857521904,
        "totalVolume": 1371687657,
        "totalRequest": 6,
        "requestId": "1078eac6-****-****-****-8debf82391a8",
        "returnCode": "0",
        "returnMessage": "success"
    }
}