Docs

API reference · Static hosting

Give a deployment its preview address without serving it on the hostnames: files complete, rules read

POST/v1/orgs/{org}/zones/{zone}/origins/{origin}/deployments/{deployment}/preview
Permission
hosting.deployments.manage
Budget
60 requests in 60 s per organization, shared as hosting.changes
Audit log
hosting.deployment.preview
Operation
hosting.deployments.preview

Parameters

NameInTypeRequiredNotes
orgpathstringyesfor example "org_01h455vb4pex5vsknk084sn02q"
zonepathstringyesfor example "zone_01h455vb4pex5vsknk084sn02q"
originpathstringyesfor example "origin_01h455vb4pex5vsknk084sn02q"
deploymentpathstringyesfor example "dep_01h455vb4pex5vsknk084sn02q"
Idempotency-KeyheaderstringnoOne key per intended mutation. A retry with the key replays the recorded response instead of executing again; the key with another request answers 422 idempotency_key_reused. For example "01h455vb4pex5vsknk084sn02q"
x-obhut-management-assignmentheaderstringnoSelect one staff assignment. Direct membership remains the default. Bound API tokens use their stored source and ignore this selector. For example "masg_01h455vb4pex5vsknk084sn02q"

Response 200

FieldTypeRequiredNotes
idstringyesfor example "dep_01h455vb4pex5vsknk084sn02q"
zoneIdstringyesfor example "zone_01h455vb4pex5vsknk084sn02q"
originIdstringyesfor example "origin_01h455vb4pex5vsknk084sn02q"
statusstringyes`uploading` until every file is stored, then `ready`: it may be activated. One of "uploading", "ready"
spabooleanyes
fileCountintegeryes0 to ∞
totalSizeintegeryes0 to ∞
activebooleanyes
createdAtstring (date-time)yesUTC, ISO 8601.
expiresAtstring (date-time) or nullyes
activatedAtstring (date-time) or nullyes
previewedAtstring (date-time) or nullyes
previewsarray of string (uri)yes