Skip to content

API Reference

Authentication

All API calls require authentication, and are authenticated by including your API key as a bearer token in the request headers.

When making any API call, include a header Authorization, with the value of Bearer <api-key>

For example:

Authorization: Bearer HVUvrkiE2MfzTs8WrXAI-yYZyI9ligFK

API Request Format

The API endpoints can be invoked with a GET or POST, and take no query string arguments or POST body.

All API requests follow the following format:

https://cdn.fastql.io/purge/<your-endpoint>/<invalidate-type>/<...args...>

The <your-endpoint> refers last portion of the path for the FastQL endpoint assigned to you. For example, if your FastQL endpoint in the dashboard is https://cdn.fastql.io/v1/abcd1234, then you would make all API calls to https://cdn.fastql.io/purge/abcd1234/<...>

API Result Format

All API requests respond with a simple JSON response:

{
  "success": [boolean],
  "message": [string]
}

Invalidate by Object

This API allows you to invalidate an object based on it's ID. See the invalidation documentation for details.

URL format

https://cdn.fastql.io/purge/<your-endpoint>/object/<type-name>/<id>

Example API call

https://cdn.fastql.io/purge/bingegg/object/Event/PS2OaPViie4JTcIb

Invalidate by Alias

This API allows you to invalidate caches based on an aliased tree in the top level of the query. See the invalidation documentation for details.

URL format

https://cdn.fastql.io/purge/<your-endpoint>/alias/<alias-name>

Example API call

https://cdn.fastql.io/purge/bingegg/alias/latestVideos

Invalidate by Hash

This API allows you to invalidate a query, or part of the query based on hash returned in the X-Cache-Fql header. See the cache headers documentation for details.

URL format

https://cdn.fastql.io/purge/<your-endpoint>/hash/<hash>

Example API call

https://cdn.fastql.io/purge/bingegg/hash/6aba270a638a83ad