Skip to content

Overview

Browse API

OpenAPI.json

Usage Examples

List Projects

API_URL="https://canary.example.com"
API_KEY="MVxYPdl9pLTQbDp1W08qhF.."
curl -X POST -H "Authorization: Bearer ${API_KEY}" ${HOST}/project
import requests
api_url = "https://canary.example.com"
api_key = "MVxYPdl9pLTQbDp1W08qhF.."
response = requests.get(api_url + "/project", {"Authorization": f"Bearer {api_key}"}
if response.status_code == 200:
    print(response.json())

Deploy Project

TODO

API_URL="https://canary.example.com"
API_KEY="MVxYPdl9pLTQbDp1W08qhF.."
PROJECT=my-project
curl -X POST -H "Authorization: Bearer ${API_KEY}" ${HOST}/deploy/project/${PROJECT}
import requests
api_url = "https://canary.example.com"
api_key = "MVxYPdl9pLTQbDp1W08qhF.."
project = "my-project'
response = requests.get(api_url + f"/deploy/project/{project}", {"Authorization": f"Bearer {api_key}"}
if response.status_code == 200:
    print(response.json())

Upload Payload

API_URL="https://canary.example.com"
API_KEY="MVxYPdl9pLTQbDp1W08qhF.."
curl -X POST -H "Authorization: Bearer ${API_KEY}" ${HOST}/project
import requests
api_url = "https://canary.example.com"
api_key = "MVxYPdl9pLTQbDp1W08qhF.."
page = 'example.com'
with open(path, 'rb') as file:
    response = requests.post(api_url + "/upload/{page}", {"Authorization": f"Bearer {api_key}", data=file}
    if response.status_code == 200:
        print(response.json())

Webhooks

fetch deploy token

deploy project

API_URL="https://canary.example.com"
TOKEN="ilc9ZjNcv7uis241ix.."
curl -X POST ${HOST}/webhook/page/{token}

upload page payload

API_URL="https://canary.example.com"
TOKEN="ilc9ZjNcv7uis241ix.."
curl -X POST -T payload.tar ${HOST}/webhook/page/{token}
Was this page helpful?