requestGlobalCdnPurge

Prev Next

Overview

Requests global CDN purge.

Request

Request parameters

Parameter Required Type Limitations Description
cdnInstanceNo Y String CDN instance number
isWholeDomain Y Boolean true or false Indicates whether to purge all domains.
Enter true for purge requests for the entire domain, false for purge requests for the specific domain.
serviceDomainNameList.N N List<String> List of service domain names
Enter for purge requests for a specific domain.
ex) serviceDomainNameList.1=sample.example.com&serviceDomainNameList.2=test.example.com
isWholePurge Y Boolean true or false Indicates whether to purge all content.
Enter true for purge requests for the entire file or false for purge requests for the specific file.
The entire purge request cannot specify the service domain.
targetFileList.N N List<String> List of files to purge
Enter for purge request of a specific file.
ex) targetFileList.1=alice.txt&targetFileList.2=bob.png
responseFormatType N String JSON or XML Response type

Response

The API returns an HTTP status code indicating success or failure.

HTTP status code Code message Description
200 Success Purge succeeded
401 Unauthorized Authentication failed
500 Internal Server Error Server error

Properties

Property Required Type Description
cdnInstanceNo N String CDN instance number
purgeId N String Purge ID
isWholePurge N Boolean Indicates whether to purge all content.
isWholeDomain N Boolean Indicates whether to purge all domains.
globalCdnServiceDomainList N List<GlobalCdnServiceDomain> List of global CDN service domains
serviceDomainTypeCode N String Service domain type code
protocolTypeCode N String Protocol type code
defaultDomainName N String Default domain name
userDomainName N String User domain name
targetFileList N List<String> List of files to purge
estimatedCompletionDate N String Estimated completion date
isSuccess N Boolean Indicates whether it is successful.
requestDate N String Request date

Examples

Request example

https://ncloud.apigw.ntruss.com/cdn/v2/requestGlobalCdnPurge?cdnInstanceNo=697750&isWholePurge=true&isWholeDomain=true&responseFormatType=XML

Response example

<?xml version="1.0" encoding="UTF-8"?>
<requestGlobalCdnPurgeResponse>
  <requestId>847f09c8-54c7-4cdf-ad20-fa7608673f1d</requestId>
  <returnCode>0</returnCode>
  <returnMessage>success</returnMessage>
  <totalRows>1</totalRows>
  <globalCdnPurgeHistoryList>
    <globalCdnPurgeHistory>
      <cdnInstanceNo>697750</cdnInstanceNo>
      <purgeId>ed2b6b63-fb0b-11e8-bd53-196c5d109cd0</purgeId>
      <isWholePurge>true</isWholePurge>
      <isWholeDomain>true</isWholeDomain>
      <globalCdnServiceDomainList>
        <globalCdnServiceDomain>
          <serviceDomainTypeCode>DEFAULT</serviceDomainTypeCode>
          <protocolTypeCode>HTTP</protocolTypeCode>
          <defaultDomainName>lwsitpepufak697750.gcdn.ntruss.com</defaultDomainName>
          <userDomainName></userDomainName>
        </globalCdnServiceDomain>
      </globalCdnServiceDomainList>
      <targetFileList/>
      <estimatedCompletionDate>2018-12-09T02:12:46+0900</estimatedCompletionDate>
      <isSuccess>true</isSuccess>
      <requestDate>2018-12-09T02:08:46+0900</requestDate>
    </globalCdnPurgeHistory>
  </globalCdnPurgeHistoryList>
</requestGlobalCdnPurgeResponse>

Error codes

Error code Description
29100 Invalid Global CDN rule format.
29101 Cannot 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 cannot 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 Cannot 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.