Panonun yaptığı her şey, terminalinden
Tek bir hesap anahtarı. Sitelerini listele, üzerlerine dağıt, adlarını değiştir, formlarının topladıklarını oku, sil — düz HTTP ile, bir betikten, bir CI işinden ya da bir ajandan.
Üç komut
Panonda bir anahtar oluştur, çalıştığını doğrula ve bir klasörü yayına al. Anahtar her çağrıda Authorization başlığına konur.
curl -H "Authorization: Bearer hvs_…" https://harvis.dev/api/v1
curl -H "Authorization: Bearer hvs_…" https://harvis.dev/api/v1/sites
curl -X POST https://harvis.dev/api/v1/sites \ -H "Authorization: Bearer hvs_…" \ -F "files=@index.html" -F "paths=index.html"
Web uygulaması ile API birbirinden ayrı düşemez
Her yetenek bir kez, tek bir dosyada tanımlanır; hem pano hem bu API ondan üretilir. openapi.json o tanımdan üretilir ve ikisi anlaşmazsa derleme başarısız olur. Yani bu, ürünü anlatan bir belge değil — ürünün yapıldığı şeyin ta kendisi.
- Yetenek başına tek uygulama; web uygulaması da senin betiğin de aynısını çağırır.
- openapi.json üretilir, elle yazılmaz ve /openapi.json adresinden sunulur.
- Bir rota, sözleşme ve belge birbirini tutmaz olduğu anda derleme başarısız olur.
Anahtar varsa site hemen senindir
Hesapsız dağıtım hâlâ çalışıyor ve hep çalışacak — sonradan açacağın özel bir sahiplenme bağlantısı alırsın. Aynı çağrıda bir anahtar gönder, sahiplenilecek bir şey kalmaz: site ilk bayttan itibaren hesabındadır ve süresi hiç dolmaz.
zip -r site.zip . && curl -X POST https://harvis.dev/api/upload \ -H "Authorization: Bearer hvs_…" \ -H "Content-Type: application/zip" --data-binary @site.zip
Yüzeyin tamamı
İstek ve yanıtların tam biçimleri OpenAPI belgesindedir.
| yöntem | yol | ne yapar |
|---|---|---|
| GET | /api/v1 | Check that a credential works. |
| GET | /api/v1/keys | The account's API keys. Revoked keys are not listed. |
| POST | /api/v1/keys | Create an API key. |
| DELETE | /api/v1/keys/{keyId} | Revoke an API key. Anything using it stops working immediately. |
| GET | /api/v1/me | The account a credential belongs to. |
| GET | /api/v1/sites | List the account's sites, newest first. |
| POST | /api/v1/sites | Create a site from a folder of files. |
| DELETE | /api/v1/sites/{id} | Delete a site, its files and its form submissions. |
| GET | /api/v1/sites/{id} | One site. |
| PATCH | /api/v1/sites/{id} | Rename a site, change its web address, or both. |
| POST | /api/v1/sites/{id}/deploy | Replace every file of a site with the uploaded set. |
| POST | /api/v1/sites/{id}/deploy-token | Issue a new deploy token for a site. The old one stops working immediately. |
| POST | /api/v1/sites/{id}/deploy/zip | Replace every file of a site from a zip archive sent as the raw request body. |
| GET | /api/v1/sites/{id}/files | Every file a site is serving. |
| POST | /api/v1/sites/{id}/files | Add or overwrite individual files, leaving the rest of the site alone. |
| DELETE | /api/v1/sites/{id}/submissions | Delete every submission for a site, or every one of a single form. |
| GET | /api/v1/sites/{id}/submissions | One page of a site's form submissions, newest first. |
| DELETE | /api/v1/sites/{id}/submissions/{submissionId} | Delete one submission. |
| GET | /api/v1/sites/{id}/submissions/{submissionId} | One submission. |
| GET | /api/v1/sites/{id}/submissions/csv | Export a site's form submissions as CSV. |
| POST | /api/v1/sites/{id}/submissions/read | Mark every unread submission as read. |
| GET | /api/v1/sites/{id}/submissions/summary | How many submissions a site holds, how many are unread, and which forms exist. |
Her hata aynı biçimde gelir
Koda göre dallan, asla mesaja göre değil. Kodlar sabittir; metin, log'u okuyan insan içindir.
{
"error": {
"code": "subdomainTaken",
"message": "That address is already taken. Try another."
}
}