Development Document

Purging quota query Download PDF Document

Endpoint

Request URL: cache/refreshQuota (GET)

Endpoint Domain Name: cdn.api.baishan.com
Endpoint Version: v2

Endpoint Description

Query the cache purging quota limit and remaining quota of the day

API Parameters

Notice: Please request the API token from your account team.

Sample Request:

curl -v -X GET 'http://cdn.api.baishan.com/v2/cache/refreshQuota?token=xxx'

Request Parameters (GET)

Add request parameters to the URL query strings, i.e. ?key1=value1&key2=value2.

ParameterData TypeRequirementDescription
url_quotaintRequiredToday's URL purge quota limit
url_remainintRequiredToday's URL purge quota remaining
dir_quotaintRequiredToday's directory purge quota limit
dir_remainintRequiredToday's directory purge quota remaining

Sample Response

Json format.

{
    "code": 0,
    "data": {
        "url_quota": 10000,
        "url_remain": 9977,
        "dir_quota": 1000,
        "dir_remain": 1000
    }
}

Response Header

HTTP/1.0 200 OK
Api-Id:                8335139
Content-Type:          application/json; charset=utf-8
X-Ratelimit-Grad:      minute  //Unit of the request number limit
X-Ratelimit-Limit:     100  // 100 requests (calls) per minutes maximum
X-Ratelimit-Remaining: 99   //99 calls left for the current minute
X-Retry-After:         16  //the rate limit resets in 16 seconds

HTTP Status Codes

Error CodeDescription
404Bad request URLs.
401Authorization Error: Invalid token or lack of access.
400Bad request parameters.
200Success.
5xxPlease contact your account team.
CopyRight © 2015-2022 BaishanCloud . All Rights Reserved.