以下 API 皆需 API Token 相關 Header
DELETE /api/v1/user/site/{siteID}/setting/currentCache
根據站點 ID 清除此站點下的所有域名緩存
curl --request DELETE \
--header "SKC-RefreshToken: {Your Refresh Token}" \
--header "SKC-AccessToken: {Your Access Token}" \
{CDNRay API Endpoint}/api/v1/user/site/{siteID}/setting/currentCache
{ "code": 101001 }
DELETE /api/v1/user/site/{siteID}/setting/urlCache
匹配後,後面的目錄全部清除
curl --request DELETE \
--header 'Content-Type: application/json' \
--header "SKC-RefreshToken: {Your Refresh Token}" \
--header "SKC-AccessToken: {Your Access Token}" \
--data '{ "type":1, "urls":["http://example.com/"] }' \
'{CDNRay API Endpoint}/api/v1/user/site/{siteID}/setting/urlCache'
{
"type":1,
"urls":["http://example.com/"]
}
{ "code": 101001 }
DELETE /api/v1/user/site/{siteID}/setting/urlCache
匹配後,完整路徑符合者完全清除
curl --request DELETE \
--header 'Content-Type: application/json' \
--header "SKC-RefreshToken: {Your Refresh Token}" \
--header "SKC-AccessToken: {Your Access Token}" \
--data '{ "type":2, "urls":["http://example.com/123.jpg"] }' \
'{CDNRay API Endpoint}/api/v1/user/site/{siteID}/setting/urlCache'
{
"type":2,
"urls":["http://example.com/123.jpg"]
}
{ "code": 101001 }
DELETE /api/v1/user/site/{siteID}/setting/urlCache
根據語法規則清除特定的URL
curl --request DELETE \
--header 'Content-Type: application/json' \
--header "SKC-RefreshToken: {Your Refresh Token}" \
--header "SKC-AccessToken: {Your Access Token}" \
--data '{ "type":3, "urls":["*/static/*"] }' \
'{CDNRay API Endpoint}/api/v1/user/site/{siteID}/setting/urlCache'
{
"type":3,
"urls":["*/static/*"]
}
{ "code": 101001 }
curl --request DELETE \
--header 'Content-Type: application/json' \
--header "SKC-RefreshToken: {Your Refresh Token}" \
--header "SKC-AccessToken: {Your Access Token}" \
--data '{ "type":3, "urls":["www.example.com/*"] }' \
'{CDNRay API Endpoint}/api/v1/user/site/{siteID}/setting/urlCache'
{
"type":3,
"urls":["www.example.com/*"]
}
{ "code": 101001 }
curl --request DELETE \
--header 'Content-Type: application/json' \
--header "SKC-RefreshToken: {Your Refresh Token}" \
--header "SKC-AccessToken: {Your Access Token}" \
--data '{ "type":3, "urls":["www.example.com/*/static/*"] }' \
'{CDNRay API Endpoint}/api/v1/user/site/{siteID}/setting/urlCache'
{
"type":3,
"urls":["www.example.com/*/static/*"]
}
{ "code": 101001 }