Docs

API reference · Static hosting

Propose a deployment of a static origin by its manifest; answers the hashes to upload

POST/v1/orgs/{org}/zones/{zone}/origins/{origin}/deployments
Permission
hosting.deployments.manage
Budget
60 requests in 60 s per organization, shared as hosting.changes
Request body
at most 6,120,000 bytes
Audit log
hosting.deployment.create
Operation
hosting.deployments.create

Parameters

NameInTypeRequiredNotes
orgpathstringyesfor example "org_01h455vb4pex5vsknk084sn02q"
zonepathstringyesfor example "zone_01h455vb4pex5vsknk084sn02q"
originpathstringyesfor example "origin_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"

Request body

FieldTypeRequiredNotes
idstringnofor example "dep_01h455vb4pex5vsknk084sn02q"
filesarray of objectyes1 to ∞ items
files[].pathstringyes
files[].sha256stringyes
files[].sizeintegeryes0 to ∞
spabooleannodefault false

Response 201

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