CDN 사용량 조회

Prev Next

개요

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

요청

요청 파라미터

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

응답

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

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

속성

항목 필수 여부 타입 설명
startDate No String 조회시작일시 'yyyyMMdd'
endDate No String 조회종료일시 'yyyyMMdd'
startDateEpoch No Long 조회시작일시 EpochTime
endDateEpoch No Long 조회종료일시 EpochTime
interval No Long 응답 데이터의 Aggregation 시간 정보
2일 이내: 5분
2일 초과 -일주일 이내: 30분
일주일 초과-1개월 이내: 2시간
1개월 초과-3개월 이내: 6시간
bandwidthDataUnit No String 트래픽 단위 (bps)
bandwidthDataRecordList No List<List<Double>> 트래픽 데이터 목록
volumeDataUnit No String 전송량 단위 (byte)
volumeDataRecordList No List<List<Long>> 전송량 데이터 목록
requestDataUnit No Long 요청 수 단위 (건수)
requestDataRecordList No List<List<Long>> 요청수 데이터 목록
maxBandwidth No Double 기간 내 최대 Edge 트래픽
totalVolume No Long 기간 내 총 전송량
totalRequest No Long 기간 내 총 요청수

예시

요청 예시

https://ncloud.apigw.gov-ntruss.com/cdn/v2/getCdnPlusUsageData?cdnInstanceNoList.1=431411&startDate=20220901&endDate=20220902&responseFormatType=XML

응답 예시

<?xml version="1.0" encoding="UTF-8"?>
  <getCdnPlusUsageDataResponse>
    <requestId>6e3ce809-7b9c-4f61-b47f-de4400c11e75</requestId>
    <returnCode>0</returnCode>
    <returnMessage>success</returnMessage>
    <startDate>20220901</startDate>
    <endDate>20220902</endDate>
    <startDateEpoch>1661958000000</startDateEpoch>
    <endDateEpoch>1662044400000</endDateEpoch>
    <interval>86400000</interval>
    <bandwidthDataUnit>bps</bandwidthDataUnit>
    <bandwidthDataRecordList>
      <list>
        <long>1661958000000</long>
        <int>0</int>
      </list>
      <list>
        <long>1662044400000</long>
        <int>0</int>
      </list>
    </bandwidthDataRecordList>
    <volumeDataUnit>byte</volumeDataUnit>
    <volumeDataRecordList>
      <list>
        <long>1661958000000</long>
        <int>0</int>
      </list>
      <list>
        <long>1662044400000</long>
        <int>0</int>
      </list>
    </volumeDataRecordList>
    <requestDataUnit>count</requestDataUnit>
    <requestDataRecordList>
      <list>
        <long>1661958000000</long>
        <int>0</int>
      </list>
      <list>
        <long>1662044400000</long>
        <int>0</int>
      </list>
    </requestDataRecordList>
    <maxBandwidth>0.0</maxBandwidth>
    <totalVolume>0</totalVolume>
    <totalRequest>0</totalRequest>
  </getCdnPlusUsageDataResponse>

오류 코드

Error 코드 설명
29200 Invalid CDN rule.
29201 Can not operate this CDN service. Please check status.
29202 Invalid CDN purge request.
29203 Invalid CDN service domain type code.
29204 Invalid CDN instance.
29205 Unable to control the CDN service because this CDN service is for Live Transcoder.
29211 An error occurred while creating CDN service.
29215 This CDN service can not request purge with partial domains.
29216 Invalid CDN service domain.
29209 The certificate can not register for CDN.
29217 Please enter target file list or directory.
29218 Please select target service domains.
29221 Unable to control the CDN service because this CDN service is for Image Optimizer.
29222 Invalid image optimizer instance number.
29223 Cache Key Hostname can not be set Origin Hostname if there is only one service domain.
29224 Cache Key Hostname can not be set Origin Hostname if use CDN domain.