palbaseDocs

Palbase Machines · API

PUT/sites/{name}/releases/{release}/files/{digest}

Send a release's file

Sends one file a release lists, as it is: its bytes must be the SHA-256 the path names, or nothing is kept. A file the project keeps already is not read 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.
releasestring (uuid) · requiredThe release's id.
digeststring · requiredThe file's SHA-256: 64 lowercase hex digits.
curl
curl -X PUT "https://<your-ref>.palbase.studio/sites/<name>/releases/<release>/files/<digest>" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/octet-stream" \
  --data-binary @file

Responses

204Kept

400Validation failed or a required field is missing

401Missing or invalid API key

403Not the project's secret key; or the request requires elevated owner authentication (`owner_only`, `insufficient_user_authentication`).

404The project has no site of this name, or the site no release of this id

409The release is finished: it takes no more files; or the project's sites — every environment's together — keep as many files as they may (10 GiB on Free, 100 GiB on Pay as you go)

413A file is larger than 25 MiB, or a release's files together larger than 1 GiB

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 UploadSiteFile of machines's contract.