Request purge

Prev Next

Overview

Request a purge job.

Note

The purge time required for each purge type at the edge with a global service area is as follows.

  • ALL, DIRECTORY, PATTERN: about 40 minutes of fuzzy time required
  • URL: fast fuzzy supported

Request

Request URL

POST
https://edge.apigw.ntruss.com/api/v1/purge

Request body

Category Required Type Restrictions Description
edgeId Yes Long Edge number
purgeType Yes PurgeType Purge type
purgeTarget Conditional List<String> See PurgeType description Purge target list

PurgeType

Value Description purgeTarget restrictions Examples
ALL Purge all content Must be omitted null
DIRECTORY Per-directory purge Start with the "/" character
End with "/*" string
/*
/src/*
/src/images/*
PATTERN Purge content by extension Start with the "/" character
End with "*.abc" extension notation
/*.jpg
/static/*.png
/static/images/*.css
URL Purge content specified by URL Start with the "/" character
"*" wildcard unavailable
/src/css/main.css?version=20221124

Response

All responses return success or failure as an HTTP status code.

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

Response body

Type Description
List<Long> Purge request number list

Examples

Request example

https://edge.apigw.ntruss.com/api/v1/purge
{
  "edgeId": 222,
  "purgeType": "DIRECTORY",
  "purgeTarget": [
    "/src/images/*",
    "/static/thumbs/*"
  ]
}

Response example

{
   "code":"0000",
   "message":"Success",
   "result":[
     9999
   ]
}

Errors

Error code Description
0032 Unauthorized request
0400 Request data format mismatch
9999 Server error occurred