EdgeNext
Documentation home

EdgeNext Documentation

Product guides, setup instructions, and technical references.

CDN

Prewarm Content

Endpoint

Request URL: cache/prefetch (POST)

API Host: cdn.api.edgenext.com

API Version: v2

Description

Prefetches large files and proactively distributes them to CDN edge nodes across all regions, preventing excessive bandwidth spikes caused by massive origin pulls.

Note: Each account is limited to 10,000 prefetch entries per day. Rate limits are specified in the response headers.

Note: Prefetch task records are retained for one month only. Please query and save prefetch status within this period.

Request Parameters

Common parameters: Tokens can be obtained from the on-call team.

POST Parameters

Parameters support form-data, x-www-form-urlencoded, JSON, and other formats.

Parameter Data Type Required Description
urls array Yes List of URLs to prefetch. Maximum 500 entries per request

Example

curl -X POST "https://cdn.api.edgenext.com/v2/cache/prefetch?token=xxx"\
    -H "Content-Type: application/json"\
    -d '{"urls":["http://aa.qingcdn.com/resources/rewq/images/logo.png","http://aa.qingcdn.com/resources/fgsa/images/username-caret.png","http://bb.qingcdn.com/resources/fdsa/images/bsc-icons.png","http://cc.qingcdn.com/resources/rewq/images/body-bg.jpg"]}'

Response Example

JSON format:

{
    "code": 0, // 0 = success; non-zero = error
    "data": {
        "task_id": "30042313", // Task ID for this prefetch submission; use it to query URL status
        "count": 4, // Number of URLs successfully submitted for prefetch
        
        // err_urls returned when:
        // 1. URL format is invalid
        // 2. Domain is not under this account
        // 3. Domain is suspended or deleted
        "err_urls":["http://xxxx.com/xx","hdsres.."] 
    }
}

Response Headers

HTTP/1.0 200 OK
Api-Id:                70945127
Content-Type:          application/json; charset=utf-8
X-Push-Remaining:      96     // Remaining daily quota
X-Ratelimit-Grad:      minute  // Rate limit granularity (minute/hour/day)
X-Ratelimit-Limit:     150  // Requests per minute limit
X-Ratelimit-Remaining: 99   // Remaining requests this minute
X-Retry-After:         54  // Seconds until the current rate limit window resets

HTTP Status Codes

Status Code Description
404 The requested URL is invalid
401 Authentication error — invalid token or API access not enabled
400 Invalid request parameters
200 Request succeeded, data returned
5xx Please contact the on-call team

Need help? Contact our support team at support@edgenext.com.

Back to documentation home