Skip to main content
GET
/
Fetch Cached Data
curl --request GET \
  --url https://sandbox.apicaching.io/ \
  --header 'X-ApiCaching-OriginUrl: <x-apicaching-originurl>'
{}

Headers

X-ApiCaching-Endpoint
string

Your unique project endpoint. This is only required for this example. You should be accessing your unique endpoint directly, instead of the sandbox endpoint. If your endpoint is: https://my-special-endpoint.apicaching.io, set the value of this header to 'my-special-endpoint'.

X-ApiCaching-OriginUrl
string
required

Your origin API URL where you fetch your data from

X-ApiCaching-MaxAge
integer
default:86400

Max age for cache validity in seconds

X-ApiCaching-Swr
integer
default:0

Stale-while-revalidate period in seconds

Response

Cached data fetched successfully

The response is of type object.

I