palbaseDocs

Palbase Machines · API

POST/sites/{name}/releases

Start a release

Starts a release of a site: it lists every path the site will answer and the SHA-256 of the file each one is (20,000 files at most, 25 MiB each, 1 GiB together). The answer names, in missing, the files the project does not keep yet: each is sent (PUT …/files/{digest}), then the release is finished. A file the project keeps from any release is not sent again.

Called by your server, with the project's secret key.

Path

namestring · requiredThe site's name: lowercase letters, digits and dashes, starting with a letter and not ending with a dash, 32 at most.

Request body

filesobject · requiredPath → the SHA-256 (hex) of its file. A path starts with /, names a file (no trailing /), holds no . or .. part, no // and no ?, # or \\.
curl
curl -X POST "https://<your-ref>.palbase.studio/sites/<name>/releases" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/json" \
  -d '{"files":{}}'

Responses

201The release, uploading, with the files to send

400Validation failed or a required field is missing

401Missing or invalid API key

403Not the project's secret key, or the site has been suspended (`site_taken_down`): it takes no release until it is restored.

404The project has no site of this name

429Over the project's request limit, or its machine time for this period is used up

503Temporarily unavailable; retrying is safe after Retry-After

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation CreateSiteRelease of machines's contract.