getCdnPlusUsageData

Prev Next

概要

CDN+の使用量データを照会します。

リクエスト

リクエストパラメータ

パラメータ名 必須 タイプ 制約事項 説明
cdnInstanceNoList.N Yes List<String> CDNのインスタンス番号リスト
cdnInstanceNoList.1=2323
startDate Yes String 形式はyyyyMMdd 照会開始日時
endDate Yes String 形式はyyyyMMdd 照会終了日時
regionNo No String リージョン番号:作成しない場合、デフォルトはKRリージョン
responseFormatType No String JSONまたはXML レスポンスタイプ

レスポンス

すべてのレスポンスは、HTTPステータスコードで成功または失敗を返します。

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日超過-1週間以内:30分
1週間超過-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.ntruss.com/cdn/v2/getCdnPlusUsageData?cdnInstanceNoList.1=1234&endDate=20220325&startDate=20220320&responseFormatType=XML

レスポンス例

<?xml version="1.0" encoding="UTF-8"?>
<getCdnPlusUsageDataResponse>
<requestId>bfe70938-807b-4fa2-8f20-16085fd2743b</requestId>
<returnCode>0</returnCode>
<returnMessage>success</returnMessage>
<startDate>20220320</startDate>
<endDate>20220325</endDate>
<startDateEpoch>1647702000000</startDateEpoch>
<endDateEpoch>1648134000000</endDateEpoch>
<interval>86400000</interval>
<bandwidthDataUnit>bps</bandwidthDataUnit>
<bandwidthDataRecordList>
<list>
<long>1647702000000</long>
<int>0</int>
</list>
<list>
<long>1647788400000</long>
<int>0</int>
</list>
<list>
<long>1647874800000</long>
<int>0</int>
</list>
<list>
<long>1647961200000</long>
<int>0</int>
</list>
<list>
<long>1648047600000</long>
<int>0</int>
</list>
<list>
<long>1648134000000</long>
<int>0</int>
</list>
</bandwidthDataRecordList>
<volumeDataUnit>byte</volumeDataUnit>
<volumeDataRecordList>
<list>
<long>1647702000000</long>
<int>0</int>
</list>
<list>
<long>1647788400000</long>
<int>0</int>
</list>
<list>
<long>1647874800000</long>
<int>0</int>
</list>
<list>
<long>1647961200000</long>
<int>0</int>
</list>
<list>
<long>1648047600000</long>
<int>0</int>
</list>
<list>
<long>1648134000000</long>
<int>0</int>
</list>
</volumeDataRecordList>
<requestDataUnit>count</requestDataUnit>
<requestDataRecordList>
<list>
<long>1647702000000</long>
<int>0</int>
</list>
<list>
<long>1647788400000</long>
<int>0</int>
</list>
<list>
<long>1647874800000</long>
<int>0</int>
</list>
<list>
<long>1647961200000</long>
<int>0</int>
</list>
<list>
<long>1648047600000</long>
<int>0</int>
</list>
<list>
<long>1648134000000</long>
<int>0</int>
</list>
</requestDataRecordList>
<maxBandwidth>0.0</maxBandwidth>
<totalVolume>0</totalVolume>
<totalRequest>0</totalRequest>
</getCdnPlusUsageDataResponse>

エラーコード

エラーコード 説明
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.