RegexUrlPurge

更新時間: 2022-12-13 14:14:41

The content of the file cached on the CDN node is cleared according to the regular url method, and the entire network takes effect within 1 minute.

  • リミットの詳細: Data format: request and response only support json Call frequency: 10/5min. Suggestions for use: If it is the same regular url, please wait for the previous cleanup cache to complete before allowing the commit. Excessive refresh rates can affect the performance of your content management system. Daily (time of the East Eight District) usage: default 500.
  • 単一ユーザーの使用頻度: 10/5min
  • 使用できるプロダクト: Content MGMT

リクエストパラメータ

Body パラメータ

パラメータ名説明
urlRegularsList
To clean up the cached regular url collection, the format of the regular url is: 1) The URL conforms to the regular expression. Enter the example: http://www.a.com/(.*).png. To push the http://www.abc.com/test/.*\.txt regular expression, you need to escape the backslash when using the interface, ie http://www.abc.com/test/.*\.txt. 2) The domain name of each regular url must be the domain name accelerated by our company. 3) The maximum length of each regular url is 2000 characters. 4) If the regular url contains special characters, you need to escape and use utf-8 to escape 5) The same regular URL, the system will go to heavy and submit. 6) The default is 500 strips/day, which is the upper limit shared with the directory push.

レスポンスパラメータ

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ステータスコード意味
Successhandle success200Task submitted successfully
UserNameInvalidusername is invalid400Username is empty or user is not enabled
ParseParameterErrorparse parameter json error400parse parameter json error
UrlRegularEmptyurl regular must not be empty400url regular must not be empty
OnceSubmitLessThan500you can't submit more than 500 url regulars at a time400you can't submit more than 500 url regulars at a time
NumberOutOfLimitthe number of url regular out of today limit(500)400the number of url regular out of today limit(500)
NumberOutOfLimitthe number of url regular out of today 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[userName]: url regular can only purge [{1}] count this time. Today has purge the number of url regular: [{2}]400The regular part of the submitted url exceeds the upper limit. If it is not exceeded, it can be executed normally.
RepeatUrlRegularrunning url regular[xxx], please try again after one minute.400running url regular[xxx], please try again after one minute.
UserNotAllowedPushuser not allowed push400user not allowed push
ErrorChannelerror channel [xxx,xxx].400error channel [xxx,xxx].
InvalidUrlRegularinvalid url regular [url1,url2].400invalid url regular [url1,url2].
SystemExceptionsystem exception500system 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"
       ]   
}'
レスポンス例
コピー コピー完了
{
   "Code":Success,
   "Message":"handle success",
   "itemId":"64ec364dd81d4052a3534c1e86167950"
}