CDN 사용량 조회

Prev Next

개요

Global CDN 사용량 데이터를 조회합니다.

요청

요청 파라미터

파라미터명 필수 여부 타입 제약 사항 설명
cdnInstanceNoList.N Yes List<String> CDN 인스턴스 번호 리스트
cdnInstanceNoList.1=2323
startDate Yes String 형식: yyyyMMddHH 조회 시작 일시
endDate Yes String 형식: yyyyMMddHH 조회 종료 일시
responseFormatType No String JSON 또는 XML 응답 타입

응답

모든 응답은 HTTP Status Code로 성공 또는 실패를 반환합니다.

HTTP 상태 코드 코드 메시지 설명
200 Success 조회 성공
401 Unauthorized 인증 실패
500 Internal Server Error 서버 오류

속성

항목 필수 여부 타입 설명
startDate No String 조회 시작 일시 'yyyyMMddHH'
endDate No String 조회 종료 일시 'yyyyMMddHH'
aggregation No Long 응답 데이터의 Aggregation 시간 정보 (초단위)
bandwidthDataUnit No String Edge 트래픽 단위 (bps)
bandwidthDataRecordList No List<List<Double>> 트래픽 데이터 목록
volumeDataUnit No String Edge 전송량 단위 (byte)
volumeDataRecordList No List<List<Long>> 전송량 데이터 목록
requestDataUnit No Long Edge 요청 단위 (건수)
requestDataRecordList No List<List<Long>> 요청수 데이터 목록
pointStart No Long 조회시작시간
pointInterval No Long aggregation (밀리 세컨드 단위)
maxBandwidth No Double 기간 내 최대 Edge 트래픽
totalVolume No Long 기간 내 총 전송량
totalRequest No Long 기간 내 총 요청 수

예시

요청 예시

https://ncloud.apigw.gov-ntruss.com/cdn/v2/getGlobalCdnUsageData?cdnInstanceNoList.1=393396&startDate=2022090100&endDate=2022090123&responseFormatType=XML

응답 예시

<?xml version="1.0" encoding="UTF-8"?>
  <getGlobalCdnUsageDataResponse>
    <requestId>1ea845df-631a-4f62-8c2c-0b6a797c0c45</requestId>
    <returnCode>0</returnCode>
    <returnMessage>success</returnMessage>
    <startDate>2022090100</startDate>
    <endDate>2022090123</endDate>
    <aggregation>86400</aggregation>
    <volumeDataRecordList>
      <list>
        <long>1661958000000</long>
        <int>0</int>
      </list>
    </volumeDataRecordList>
    <requestDataRecordList>
      <list>
        <long>1661958000000</long>
        <int>0</int>
      </list>
    </requestDataRecordList>
    <bandwidthDataRecordList>
      <list>
        <long>1661958000000</long>
        <int>0</int>
      </list>
    </bandwidthDataRecordList>
    <volumeDataUnit>bytes</volumeDataUnit>
    <requestDataUnit>count</requestDataUnit>
    <bandwidthDataUnit>Mbps</bandwidthDataUnit>
    <pointStart>1661958000000</pointStart>
    <pointInterval>86400000</pointInterval>
    <maxBandwidth>0.0</maxBandwidth>
    <totalVolume>0</totalVolume>
    <totalRequest>0</totalRequest>
  </getGlobalCdnUsageDataResponse>

오류 코드

Error 코드 설명
29100 Invalid Global CDN rule format.
29101 Can not operate this Global CDN service. Please check status.
29102 Invalid Global CDN purge request.
29103 Invalid Global CDN service domain type code.
29104 Please enter Forward Host Header.
29105 Invalid Origin server.
29106 Invalid Origin server ports.
29107 Invalid Origin File Storage.
29108 Please enter Referrer Domain.
29109 Invalid service name.
29110 Please enter service domain.
29111 Invalid service domain.
29112 Invalid Global CDN instance.
29113 Only HTTP protocol is allowed when Origin is File Storage.
29114 This domain can not set as origin.
29115 For HTTPS protocol, only CDN domain can be set.
29116 An error occurred in purge request.
29117 Invalid origin path.
29118 Invalid referrer domain.
29119 Invalid rule for access log.
29120 Invalid Forward Host Header.
29121 Referrer Domains can be added up to 50.
29122 Can not request purge for the CDN service. Please check status.
29123 The purge function can only be used after about 3 hours after the creation request is made.
29124 There is an error in the service domain name entered during the purge request.