Content API
Content API
Section titled “Content API”Overview
Section titled “Overview”The Content API provides an interface to create and manage content and revisions in QuantCDN. It allows you to publish, update, and unpublish content, manage assets, create redirects, and control caching behavior.
Authentication
Section titled “Authentication”Method: Bearer Token
All API requests must include the following headers:
| Header | Description |
|---|---|
Quant-Token | Your project’s API token (found in your dashboard) |
Quant-Customer | Your customer identifier |
Quant-Project | Your project identifier |
These headers will be validated to ensure the request is authorized.
Example:
curl -H "Quant-Customer: example-customer" \ -H "Quant-Project: example-project" \ -H "Quant-Token: your-project-token" \ https://api.quantcdn.io/v1/pingBase URL
Section titled “Base URL”All API requests must be directed to:
https://api.quantcdn.io/v1/The path is prefixed with the API version. If backwards-breaking changes are introduced, the version number will be incremented. Old versions of the API will be maintained and deprecated with advance notice.
Pagination
Section titled “Pagination”Requests that return multiple items are paginated to 100 items by default. You can control pagination with these parameters:
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number to retrieve |
per_page | integer | Number of items per page (default: 100) |
Paginated API endpoints return data under a records key and include metadata with page, page_size, total_records, and total_pages.
Endpoints
Section titled “Endpoints”Send Content
Section titled “Send Content”URL: /v1
Method: POST
Description: Publish HTML content to a specific URL path.
Request Body
Section titled “Request Body”{ "content": "<html><body><h1>My static web page</h1></body></html>", "url": "/example-page", "published": true, "info": { "author_name": "Joe Static", "log": "Revision log message" }, "headers": { "content-type": "text/html" }}