/v2/meta/prefetch
Prefetches a resource from the backend, causing all active CDN servers to cache the resource.
URL Parameters
Name | Type | Description | Required | Default value |
---|---|---|---|---|
host | string | The hostname, usually a domain name. | yes | - |
path | string | The path of the resource, for example /index.html . |
yes | - |
Authentication
This endpoint requires a domain key to prefetch a resource for a particular domain, which must be sent as the value in a x-domain-auth
header. This key is available in the Hosting Management Interface for a domain you host at warpcs.org: "Internet Resources" -> "Domains (ICANN)" -> [your domain name] -> "Manage" -> "Domain Key" -> "Show Domain Key".
Response Body
JSON Object where the keys are the full names of the CDN servers and the value is another JSON object each containing status information about the prefetch of the particular CDN server, which have the following format:
Name | Type | Description |
---|---|---|
status | string | The prefetch status. See below. |
server | string | The cache server name. |
httpStatus | number | The HTTP status received by the server while prefetching. |
Prefetch statuses
- success: The resource was successfully cached by the server
- incache: The resource was already in the cache
- toolarge: The resource is too large to be cached
- bypassed: A resource was in the cache, but the cache did not return it to the prefetch client
- invalid: The server returned an error status code (HTTP status codes above 400 inclusive)
- failed: The CDN server refused to cache the resource (for example, because a
Cache-Control
header denies caching) - error: The API server encountered an error while prefetching the resource
Restrictions
Rate Limit: 5 requests per 5s