Deploys
One publish, from asking for upload addresses to putting a version live. Versions are immutable and are never written over, so promoting an earlier one is a pointer moving rather than an upload repeating.
Validates a manifest and returns one presigned upload URL per file.
path Parameters
siteIdValidates a manifest and returns one presigned upload URL per file. › Request Body
Every file the client intends to upload.
batchesWhether the client can send batch permits — several small files in one request. A client that does not set it receives one permit per file. Setting it is a request, not a guarantee: the server may still answer with single permits only.
Validates a manifest and returns one presigned upload URL per file. › Responses
OK
Batch permits, each covering several small files sent as one body. Empty unless the request asked for batches and they are enabled; a file is in exactly one of Upload and this.
deployIdULID of the new deploy; part of every R2 key it writes.
reused^-?(?:0|[1-9]\d*)$ · requiredHow many files the live deploy already holds byte-identical. These are absent from Upload and are copied server-side when the deploy completes.
total^-?(?:0|[1-9]\d*)$ · requiredFiles in the whole deploy: Reused plus what must be uploaded.
One upload permit per file sent on its own.
uploadUrlThe single endpoint every permit is presented to. Sent with the response rather than compiled into the client, because it is a different host in development, in tests and in production — and because a client that knew the address without being told would still know it after we moved.
batchConcurrency^-?(?:0|[1-9]\d*)$How many of Batches to send at once; null when there are none. The upload Worker can hold only six R2 writes open per request, so this is what decides how fast many small files go, and it is set here so it can be tuned without a client release. Single permits are not affected.
unchangedTrue when the manifest describes exactly what is already live, so no deploy was created. The caller
has nothing to upload and must not call complete: DeployId is the deploy
already serving, and completing it again would only rewrite the mapping to where it already points.
urlPublic URL of the site, sent only when Unchanged is true. That answer is the end of the deploy, and without it the caller would have to ask a second endpoint just to show the link.
warningsThings about this deploy the caller should be told although it was accepted, or null when there are none —
today only that _functions/ will not run on this site (docs/briefs/FUNCTIONS-BRIEF.md D23).
Reads the state of one deploy.
path Parameters
siteIddeployIdReads the state of one deploy. › Responses
OK
completedAtWhen it reached a terminal state, or null while in flight.
createdAtWhen it was prepared.
deployIdULID of the deploy.
errorWhy it failed, when it did.
fileCount^-?(?:0|[1-9]\d*)$ · requiredFiles it holds.
isLiveWhether this is the deploy currently being served.
siteIdULID of its site.
statusLowercase status name.
totalBytes^-?(?:0|[1-9]\d*)$ · requiredIts size.
urlThe site's URL, present only when this deploy is live.
Verifies the uploaded files and takes the deploy live.
path Parameters
siteIddeployIdVerifies the uploaded files and takes the deploy live. › Request Body
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = null | |
| type = object |
Verifies the uploaded files and takes the deploy live. › Responses
OK
deployIdULID of the deploy that is now live.
docsModeWhether the site is read through the documents viewer rather than served as files.
Reported for the same reason as Name: the server decides it, from the files this
deploy actually holds (SiteModeDetection), and a client that guessed from what it uploaded
would be wrong exactly when it matters — the web app that went live inside the reader because its
index.html sat one folder too deep, with nothing on the finished card saying so.
edgelive when the edge has the deploy, pending when the deploy is live but the edge write did
not land yet — Cloudflare refused it or its API budget is spent. A pending deploy is not a failure: it
reaches the edge on its own, usually within the Retry-After the response carries, and calling
complete again is safe but not needed.
fileCount^-?(?:0|[1-9]\d*)$ · requiredNumber of verified files.
modeIsManualWhether the owner chose the mode by hand, in which case no deploy changes it.
nameWhat the site is called now, or null when it has none and its subdomain should be shown instead.
Reported rather than left for the client to infer, because only the server knows the answer: it cleans the name it is sent, and it refuses to overwrite a name the site already had. A client that assumed the title it sent is the name now stored would be wrong on every redeploy.
What the anonymous flow needs. A site is remembered in the browser before its first deploy starts — the claim token is returned once and storing it cannot wait — so the name is not known at that point and arrives here instead.
spaModeWhether unmatched paths are answered with the site's index.html.
statusAlways live on success.
totalBytes^-?(?:0|[1-9]\d*)$ · requiredTotal verified size in bytes.
urlPublic URL the site answers on. Content may take up to a minute to reach every edge.
Reads one text file out of one deploy, for the in-browser editor.
path Parameters
siteIddeployIdquery Parameters
pathReads one text file out of one deploy, for the in-browser editor. › Responses
OK
pathThe path, normalized — which is the spelling the manifest holds.
sha256Digest of the content as stored.
Sent so the editor can publish a change without re-reading anything: the new manifest is the old one
with this entry's digest replaced, and every other file is reused by prepare.
size^-?(?:0|[1-9]\d*)$ · requiredSize in bytes, as the manifest records it.
textThe file's text, or null when the bytes are not valid UTF-8.
Null rather than a lossy decode, so the dashboard can say the file cannot be edited here instead of offering an editor whose contents would overwrite the original with replacement characters.
Lists the files one deploy contains, a page at a time or all at once.
path Parameters
siteIddeployIdquery Parameters
searchcursorlimit^-?(?:0|[1-9]\d*)$allLists the files one deploy contains, a page at a time or all at once. › Responses
OK
deployIdULID of the deploy the files belong to.
fileCount^-?(?:0|[1-9]\d*)$ · requiredFiles in the whole deploy, whatever the filter matched.
This page of matches, ordered by path.
filesKeptWhether the deploy is inside the retention window with its objects still on storage, the same answer
as filesKept on the site's version list. The list is answerable either way — it is read from
the row — so this is what separates "these files are here" from "these files were here".
matchingBytes^-?(?:0|[1-9]\d*)$ · requiredTheir total size, on the same terms.
matchingFiles^-?(?:0|[1-9]\d*)$ · requiredFiles the filter matched, equal to FileCount without one.
nextCursorPath to pass back as cursor for the following page, or null when this page was the last.
statusLowercase status name of that deploy.
totalBytes^-?(?:0|[1-9]\d*)$ · requiredSize of the whole deploy, whatever the filter matched.
Lets the in-browser editor's preview frame load a gated version's own files.
path Parameters
siteIddeployIdLets the in-browser editor's preview frame load a gated version's own files. › Responses
OK
actionThe URL to post the ticket to, as the form field ticket, targeting the preview frame.
expiresAtWhen the frame's access runs out and a new ticket is needed.
ticketThe signed ticket. Accepted for one minute.
Rolls the site back to an earlier deploy that still has its files.
path Parameters
siteIddeployIdRolls the site back to an earlier deploy that still has its files. › Responses
OK
deployIdULID of the deploy that is now live.
edgelive when the edge has the deploy, pending when the rollback is committed but the edge
write did not land yet; it gets there on its own, as on complete.
fileCount^-?(?:0|[1-9]\d*)$ · requiredFiles in the promoted deploy.
statusAlways live on success.
totalBytes^-?(?:0|[1-9]\d*)$ · requiredIts total size in bytes.
urlPublic URL the site answers on. Content may take up to a minute to reach every edge.