In order to provide detailed descriptions of the various NAVER CLOUD PLATFORM services, and to facilitate use of various APIs, we offer [Manual] and [API reference] separately.
CDN API overview
NAVER CLOUD PLATFORM is a cloud service built with NAVER's latest computing technology and operation know-how. NAVER CLOUD PLATFORM provides a set of application programming interfaces (APIs) which allows you to use some solution products among its various product categories. NAVER CLOUD PLATFORM APIs are RESTful, using HTTP GET/POST methods.
Common
- {CDN_API_URL}
https://ncloud.apigw.ntruss.com/cdn/v1
- Request header
Header | Description |
---|---|
x-ncp-apigw-timestamp | It is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC. If the time difference with the APIGW server is more than 5 minutes, the request is considered invalid. |
x-ncp-apigw-api-key | API key issued by API Gateway |
x-ncp-iam-access-key | API key issued by NAVER CLOUD PLATFORM or access key issued by IAM |
x-ncp-apigw-signature-v1 | Signature used to encrypt the body of the example with the “secret key” that maps with the “access key.” The HMAC encryption algorithm is HMAC SHA256. |
API References
CDN+
getCdnPlusInstanceList
API name
Get CDN+ instance list
Action
getCdnPlusInstanceList
Description
Gets a list of CDN+ instances.
Request parameters
Parameter | Brief Description | Type | Limitations | Required |
---|---|---|---|---|
cdnInstanceNo | CDN instance number | String | No | |
pageNo | Page number | Integer | Min: 0, Max: 2147483647 |
No |
pageSize | Page size | Integer | Min: 0, Max: 2147483647 |
No |
- cdnInstanceNo
- CDN instance number
- pageNo
- Page number based on the page size if the number of items is large.
pageSize
- Number of items to be shown per page
Example
Request
${CDN_API_URL}/getCdnPlusInstanceList
Response
<?xml version="1.0" encoding="UTF-8"?> <getCdnPlusInstanceListResponse> <requestId>5a62e77c-b47c-4402-ac2a-d74c66eca324</requestId> <returnCode>0</returnCode> <returnMessage>success</returnMessage> <totalRows>34</totalRows> <cdnPlusInstanceList> <cdnPlusInstance> <cdnInstanceNo>397531</cdnInstanceNo> <cdnInstanceStatus> <code>RUN</code> <codeName>Server run state</codeName> </cdnInstanceStatus> <cdnInstanceOperation> <code>NULL</code> <codeName>Server NULL OP</codeName> </cdnInstanceOperation> <cdnInstanceStatusName>running</cdnInstanceStatusName> <createDate>2018-02-26T11:24:53+0900</createDate> <lastModifiedDate>2018-02-26T11:49:27+0900</lastModifiedDate> <cdnInstanceDescription></cdnInstanceDescription> <serviceName>cachekey-test-ses</serviceName> <isForLiveTranscoder>false</isForLiveTranscoder> <liveTranscoderInstanceNoList/> <isForImageOptimizer>false</isForImageOptimizer> <imageOptimizerInstanceNo/> <isAvailablePartialDomainPurge>false</isAvailablePartialDomainPurge> <cdnPlusServiceDomainList> <cdnPlusServiceDomain> <domainId>CD000000000000007254</domainId> <serviceDomainTypeCode>USER</serviceDomainTypeCode> <protocolTypeCode>HTTP</protocolTypeCode> <defaultDomainName>wdsrdpyduslh397531dev.cdn.ntruss.com</defaultDomainName> <userDomainName>cachekey-b2.com</userDomainName> </cdnPlusServiceDomain> </cdnPlusServiceDomainList> <globalCdnRule> <protocolTypeCode>HTTP</protocolTypeCode> <serviceDomainTypeCode>USER</serviceDomainTypeCode> <originUrl>alpha-nss.ntruss.com/aaaddd</originUrl> <originPath></originPath> <originHttpPort>8080</originHttpPort> <originHttpsPort>0</originHttpsPort> <forwardHostHeaderTypeCode>REQUEST_HOST_HEADER</forwardHostHeaderTypeCode> <forwardHostHeader></forwardHostHeader> <cacheKeyHostNameTypeCode>ORIGIN_HOSTNAME</cacheKeyHostNameTypeCode> <isGzipCompressionUse>true</isGzipCompressionUse> <cachingOptionTypeCode>CACHE_CONTROL_MAX_AGE</cachingOptionTypeCode> <isErrorContentsResponseUse>false</isErrorContentsResponseUse> <cachingTtlTime>604800</cachingTtlTime> <isQueryStringIgnoreUse>true</isQueryStringIgnoreUse> <isRemoveVaryHeaderUse>true</isRemoveVaryHeaderUse> <isLargeFileOptimizationUse>false</isLargeFileOptimizationUse> <gzipResponseTypeCode>ORIGIN_RESPONSE</gzipResponseTypeCode> <isReferrerDomainUse>false</isReferrerDomainUse> <referrerDomainList/> <isReferrerDomainRestrictUse>false</isReferrerDomainRestrictUse> <isSecureTokenUse>false</isSecureTokenUse> <secureTokenPassword></secureTokenPassword> <isReissueSecureTokenPassword>false</isReissueSecureTokenPassword> <certificateName></certificateName> <isAccessLogUse>false</isAccessLogUse> <accessLogFileStorageContainerName></accessLogFileStorageContainerName> </globalCdnRule> </cdnPlusInstance> </cdnPlusInstanceList> </getCdnPlusInstanceListResponse>
getCdnPlusPurgeHistoryList
API name
Get CDN+ purge history list
Action
getCdnPlusPurgeHistoryList
Description
Gets CDN+ purge history.
Request parameters
Parameter | Brief Description | Type | Limitations | Required |
---|---|---|---|---|
cdnInstanceNo | CDN instance number | String | Yes | |
purgeIdList.N | Purge ID list | String | No |
- cdnInstanceNo
- CDN instance number
- purgeIdList.N
- List of purge IDs
Example
Request
${CDN_API_URL}/getCdnPlusPurgeHistoryList ?cdnInstanceNo=397531
Response
<?xml version="1.0" encoding="UTF-8"?> <getCdnPlusPurgeHistoryListResponse> <requestId>f35e0e7f-f439-4c18-9d4b-7fd6257e8a15</requestId> <returnCode>0</returnCode> <returnMessage>success</returnMessage> <totalRows>5</totalRows> <cdnPlusPurgeHistoryList> <cdnPlusPurgeHistory> <cdnInstanceNo>397531</cdnInstanceNo> <purgeId>PT000000000000000582</purgeId> <isWholePurge>true</isWholePurge> <isWholeDomain>true</isWholeDomain> <cdnPlusServiceDomainList> <cdnPlusServiceDomain> <domainId>CD000000000000007254</domainId> <serviceDomainTypeCode>USER</serviceDomainTypeCode> <protocolTypeCode>HTTP</protocolTypeCode> <defaultDomainName>wdsrdpyduslh397531dev.cdn.ntruss.com</defaultDomainName> <userDomainName>cachekey-b2.com</userDomainName> </cdnPlusServiceDomain> </cdnPlusServiceDomainList> <targetDirectoryName></targetDirectoryName> <targetFileList/> <requestDate>2018-03-26T16:36:38+0900</requestDate> <purgeStatusName>success</purgeStatusName> </cdnPlusPurgeHistory> </cdnPlusPurgeHistoryList> </getCdnPlusPurgeHistoryListResponse>
requestCdnPlusPurge
API name
Request CDN+ purge
Action
requestCdnPlusPurge
Description
Requests CDN+ purge.
Request parameters
Parameter | Brief Description | Type | Limitations | Required |
---|---|---|---|---|
cdnInstanceNo | CDN instance number | String | Yes | |
domainIdList.N | Domain ID list | String | No | |
isWholePurge | Indicates whether to purge all | Boolean | true, false | Yes |
isWholeDomain | Indicates whether to purge all domains | Boolean | true, false | Yes |
targetFileList.N | List of files to purge | String | No | |
targetDirectoryName | Name of the directory to purge | String | No |
- cdnInstanceNo
- CDN instance number
- domainIdList.N
- List of domain IDs
- isWholePurge
- Indicates whether to purge all.
- isWholeDomain
- Indicates whether to purge all domains.
- targetFileList.N
- List of files to purge
- targetDirectoryName
- Name of the directory to purge
Example
Request
${CDN+_API_URL}/requestCdnPlusPurge ?cdnInstanceNo=397531 &isWholeDomain=true &isWholePurge=true
Response
<?xml version="1.0" encoding="UTF-8"?> <requestCdnPlusPurgeResponse> <requestId>cfc9f38c-24ff-4d2f-8bcf-fe6c02360769</requestId> <returnCode>0</returnCode> <returnMessage>success</returnMessage> <totalRows>1</totalRows> <cdnPlusPurgeHistoryList> <cdnPlusPurgeHistory> <cdnInstanceNo>397531</cdnInstanceNo> <purgeId>PT000000000000000583</purgeId> <isWholePurge>true</isWholePurge> <isWholeDomain>true</isWholeDomain> <cdnPlusServiceDomainList> <cdnPlusServiceDomain> <domainId>CD000000000000007254</domainId> <serviceDomainTypeCode>USER</serviceDomainTypeCode> <protocolTypeCode>HTTP</protocolTypeCode> <defaultDomainName>wdsrdpyduslh397531dev.cdn.ntruss.com</defaultDomainName> <userDomainName>cachekey-b2.com</userDomainName> </cdnPlusServiceDomain> </cdnPlusServiceDomainList> <targetDirectoryName></targetDirectoryName> <targetFileList/> <requestDate>2018-03-26T18:41:24+0900</requestDate> <purgeStatusName>ready</purgeStatusName> </cdnPlusPurgeHistory> </cdnPlusPurgeHistoryList> </requestCdnPlusPurgeResponse>
GLOBAL_CDN
getGlobalCdnInstanceList
API name
Get global CDN instance list
Action
getGlobalCdnInstanceList
Description
Gets a list of global CDN instances.
Request parameters
Parameter | Brief Description | Type | Limitations | Required |
---|---|---|---|---|
cdnInstanceNo | CDN instance number | String | No | |
pageNo | Page number | Integer | Min: 0, Max: 2147483647 |
No |
pageSize | Page size | Integer | Min: 0, Max: 2147483647 |
No |
- cdnInstanceNo
- CDN instance number
- pageNo
- Page number based on the page size if the number of items is large.
pageSize
- Number of items to be shown per page
Example
Request
${CDN_API_URL}/getGlobalCdnInstanceList
Response
<?xml version="1.0" encoding="UTF-8"?> <getGlobalCdnInstanceListResponse> <requestId>e3d346c1-1804-499b-bb48-a2668078d28b</requestId> <returnCode>0</returnCode> <returnMessage>success</returnMessage> <totalRows>3</totalRows> <globalCdnInstanceList> <globalCdnInstance> <cdnInstanceNo>554626</cdnInstanceNo> <cdnInstanceStatusName>running</cdnInstanceStatusName> <createDate>2018-04-11T18:35:56+0900</createDate> <lastModifiedDate>2018-04-24T14:36:19+0900</lastModifiedDate> <cdnInstanceDescription /> <serviceName>hd-beta-gcdn-03</serviceName> <isAvailablePartialDomainPurge>false</isAvailablePartialDomainPurge> <globalCdnServiceDomainList> <globalCdnServiceDomain> <serviceDomainTypeCode>DEFAULT</serviceDomainTypeCode> <protocolTypeCode>HTTP</protocolTypeCode> <defaultDomainName>jmoatxouhhmn554626.gcdn.beta.ntruss.com</defaultDomainName> <userDomainName /> </globalCdnServiceDomain> </globalCdnServiceDomainList> <globalCdnRule> <protocolTypeCode>HTTP</protocolTypeCode> <serviceDomainTypeCode>DEFAULT</serviceDomainTypeCode> <originUrl>45.119.145.197</originUrl> <originPath /> <originHttpPort>80</originHttpPort> <originHttpsPort>0</originHttpsPort> <forwardHostHeaderTypeCode>REQUEST_HOST_HEADER</forwardHostHeaderTypeCode> <forwardHostHeader /> <cacheKeyHostNameTypeCode>REQUEST_HOST_HEADER</cacheKeyHostNameTypeCode> <isGzipCompressionUse>true</isGzipCompressionUse> <cachingOptionTypeCode>CACHE_CONTROL_AND_EXPIRES</cachingOptionTypeCode> <isErrorContentsResponseUse>false</isErrorContentsResponseUse> <cachingTtlTime>604800</cachingTtlTime> <isQueryStringIgnoreUse>true</isQueryStringIgnoreUse> <isRemoveVaryHeaderUse>true</isRemoveVaryHeaderUse> <isLargeFileOptimizationUse>false</isLargeFileOptimizationUse> <gzipResponseTypeCode>ORIGIN_RESPONSE</gzipResponseTypeCode> <isReferrerDomainUse>false</isReferrerDomainUse> <referrerDomainList /> <isReferrerDomainRestrictUse>false</isReferrerDomainRestrictUse> <isSecureTokenUse>true</isSecureTokenUse> <secureTokenPassword>3def0277a0bd4c36183d</secureTokenPassword> <isReissueSecureTokenPassword>false</isReissueSecureTokenPassword> <isAccessLogUse>false</isAccessLogUse> <accessLogFileStorageContainerName /> </globalCdnRule> </globalCdnInstance> </globalCdnInstanceList> </getGlobalCdnInstanceListResponse>
getGlobalCdnPurgeHistoryList
API name
Get global CDN purge history
Action
getGlobalCdnPurgeHistoryList
Description
Gets global CDN purge history.
Request parameters
Parameter | Brief Description | Type | Limitations | Required |
---|---|---|---|---|
cdnInstanceNo | CDN instance number | String | Yes | |
purgeIdList.N | Purge ID list | String | No |
- cdnInstanceNo
- CDN instance number
- purgeIdList.N
- List of purge IDs
Example
Request
${CDN_API_URL}/getGlobalCdnPurgeHistoryList ?cdnInstanceNo=554626
Response
<?xml version="1.0" encoding="UTF-8"?> <getGlobalCdnPurgeHistoryListResponse> <requestId>aa7a9558-8650-4074-92b9-f504f5e665f2</requestId> <returnCode>0</returnCode> <returnMessage>success</returnMessage> <totalRows>5</totalRows> <globalCdnPurgeHistoryList> <globalCdnPurgeHistory> <cdnInstanceNo>554626</cdnInstanceNo> <purgeId>14e84459-4783-11e8-85b9-ef888132e2fc</purgeId> <isWholePurge>true</isWholePurge> <isWholeDomain>true</isWholeDomain> <globalCdnServiceDomainList> <globalCdnServiceDomain> <serviceDomainTypeCode>DEFAULT</serviceDomainTypeCode> <protocolTypeCode>HTTP</protocolTypeCode> <defaultDomainName>jmoatxouhhmn554626.gcdn.beta.ntruss.com</defaultDomainName> <userDomainName /> </globalCdnServiceDomain> </globalCdnServiceDomainList> <targetFileList /> <estimatedCompletionDate>2018-04-24T14:52:13+0900</estimatedCompletionDate> <isSuccess>true</isSuccess> <requestDate>2018-04-24T14:48:13+0900</requestDate> </globalCdnPurgeHistory> </globalCdnPurgeHistoryList> </getGlobalCdnPurgeHistoryListResponse>
requestGlobalCdnPurge
API name
Request global CDN purge
Action
requestGlobalCdnPurge
Description
Requests global CDN purge.
Request parameters
Parameter | Brief Description | Type | Limitations | Required |
---|---|---|---|---|
cdnInstanceNo | CDN instance number | String | Yes | |
serviceDomainNameList.N | Service domain name list | String | No | |
isWholePurge | Indicates whether to purge all | Boolean | true, false | Yes |
isWholeDomain | Indicates whether to purge all domains | Boolean | true, false | Yes |
targetFileList.N | List of files to purge | String | No |
- cdnInstanceNo
- CDN instance number
- serviceDomainNameList.N
- List of service domain names
- isWholePurge
- Indicates whether to purge all.
- isWholeDomain
- Indicates whether to purge all domains.
- targetFileList.N
- List of files to purge
Example
Request
${CDN+_API_URL}/requestGlobalCdnPurge ?cdnInstanceNo=554626 &isWholeDomain=false &isWholePurge=false &serviceDomainNameList.1=jmoatxouhhmn554626.gcdn.beta.ntruss.com &targetFileList.1=test.txt
Response
<?xml version="1.0" encoding="UTF-8"?> <requestGlobalCdnPurgeResponse> <requestId>583839af-44e1-452d-91d8-d052e6bfc75d</requestId> <returnCode>0</returnCode> <returnMessage>success</returnMessage> <totalRows>1</totalRows> <globalCdnPurgeHistoryList> <globalCdnPurgeHistory> <cdnInstanceNo>554626</cdnInstanceNo> <purgeId>27df559c-4912-11e8-b42a-bb443b13c136</purgeId> <isWholePurge>false</isWholePurge> <isWholeDomain>false</isWholeDomain> <globalCdnServiceDomainList> <globalCdnServiceDomain> <serviceDomainTypeCode>DEFAULT</serviceDomainTypeCode> <protocolTypeCode>HTTP</protocolTypeCode> <defaultDomainName>jmoatxouhhmn554626.gcdn.beta.ntruss.com</defaultDomainName> <userDomainName /> </globalCdnServiceDomain> </globalCdnServiceDomainList> <targetFileList> <string>/test.txt</string> </targetFileList> <estimatedCompletionDate>2018-04-26T14:24:59+0900</estimatedCompletionDate> <isSuccess>true</isSuccess> <requestDate>2018-04-26T14:24:54+0900</requestDate> </globalCdnPurgeHistory> </globalCdnPurgeHistoryList> </requestGlobalCdnPurgeResponse>