PurgeUrlsMatchingRegex

갱신 시간: 2026-07-28 19:04:42

Clear the cached file content on CDN nodes according to the regular URL method.

  • 한도 설명: Data format: Both requests and responses only support JSON. Usage advice: If it's the same regular URL, submission is only allowed after the previous cache - clearing is completed. Excessively high refresh frequencies can affect the performance of the content management system. Daily usage (in the time zone of UTC+8): The default is 500.
  • 단일 사용자 통화 빈도: 10/5min
  • 해당 상품(제품): Content MGMT
API 인증에 관한 자세한 내용은 다음을 참조하십시오:API 인증 개요

요청 파라미터

Body 파라미터

파라미터 이름설명
urlRegularsList

The set of regular URLs for which the cache needs to be cleared. Requirements for the format of regular URLs:The URL should conform to a regular expression. Example input: http://www.a.com/(.).png. If you want to push the regular expression http://www.abc.com/test/.*\.txt, when using the interface, you need to escape the backslash, that is, http://www.abc.com/test/.*\\.txt.The domain name of each regular URL must be a domain name accelerated by our company.The maximum length of each regular URL is 2000 characters.If special characters are included in the regular URL, they need to be escaped in UTF - 8 format.For the same regular URL, the system will remove duplicates before submission.The default limit is 500 per day.

actionString
선택 가능한 값:expiredelete

when the first access occurs, check whether the file has been updated from the source site, if updated, re-pull the new version from the source site and return to the customer, if not updated, the source site responds with 304, providing the node cache file to the customer. 3) When the customer specifies a value, it will be handled according to expire.

응답 파라미터

Body 파라미터

파라미터 이름설명
CodeString

Status code indicating the result of the task creation

MessageString

Indicates the response message of the system after the task is submitted.

itemIdString

After the interface is called once and the task is successfully submitted, it will return an itemamId, which is the unique identifier of the task submitted at that time. The itemId can be used to query the status (success/failure) of the task in batches.

에러 코드

에러 코드(code)설명(message)HTTP 상태 코드설명
Success

Task submitted successfully

200Task submitted successfully
UserNameInvalid

Username is empty or user is not enabled

400Username is empty or user is not enabled
ParseParameterError

parse parameter json error

400parse parameter json error
UrlRegularEmpty

url regular must not be empty

400url regular must not be empty
OnceSubmitLessThan500

you can't submit more than 500 url regulars at a time

400you can't submit more than 500 url regulars at a time
NumberOutOfLimit

the number of url regular out of today limit(500)

400the number of url regular out of today limit(500)
NumberOutOfLimit

If the incoming header has a X-Time-Zone, the prompt includes a time interval corresponding to the time zone, such as the number of url regular out of 2018-10-17 01:00:00 GMT+09:00~2018-10-18 00:59: 59GMT+09:00 limit(500)

400If the incoming header has a X-Time-Zone, the prompt includes a time interval corresponding to the time zone, such as the number of url regular out of 2018-10-17 01:00:00 GMT+09:00~2018-10-18 00:59: 59GMT+09:00 limit(500)
NumberPartlyOutOfLimit

The regular part of the submitted url exceeds the upper limit. If it is not exceeded, it can be executed normally.

400The regular part of the submitted url exceeds the upper limit. If it is not exceeded, it can be executed normally.
RepeatUrlRegular

running url regular[xxx], please try again after one minute.

400running url regular[xxx], please try again after one minute.
UserNotAllowedPush

user not allowed push

400user not allowed push
ErrorChannel

error channel [xxx,xxx].

400error channel [xxx,xxx].
InvalidUrlRegular

invalid url regular [url1,url2].

400invalid url regular [url1,url2].
ActionIllegal

action is illegal, it should be one of these values: delete, expire.

400action is illegal, it should be one of these values: delete, expire.
SystemException

system exception

500system exception

예제

JSON
JSON
요청 예제
복사 복사 완료
#!/bin/bash
username="username_exmaple"
apiKey='apiKey_exmaple'
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://api.cdnetworks.com/api/content/regular-url/purge" \
-X "POST" \
-u "$username:$password" \
-H "Date:$date" \
-H "Content-Type: application/json" \
-d'{
      "urlRegulars":[
          "http://www.abc.com/test/.*\\.txt",
          "http://www.abc.com/test/.*\\.png"
       ],
       "action": "expire"   
}'
응답 예제
복사 복사 완료
{
   "Code":Success,
   "Message":"handle success",
   "itemId":"64ec364dd81d4052a3534c1e86167950"
}
이 문서의 내용이 도움이 되었습니까?
아니오
정상적으로 제출되었습니다.피드백을 주셔서 감사합니다.앞으로도 개선을 위해 노력하겠습니다.