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
| Name | In | Type | Required | Notes |
|---|
org | path | string | yes | for example "org_01h455vb4pex5vsknk084sn02q" |
zone | path | string | yes | for example "zone_01h455vb4pex5vsknk084sn02q" |
origin | path | string | yes | for example "origin_01h455vb4pex5vsknk084sn02q" |
Idempotency-Key | header | string | no | One 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-assignment | header | string | no | Select 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
| Field | Type | Required | Notes |
|---|
id | string | no | for example "dep_01h455vb4pex5vsknk084sn02q" |
files | array of object | yes | 1 to ∞ items |
files[].path | string | yes | |
files[].sha256 | string | yes | |
files[].size | integer | yes | 0 to ∞ |
spa | boolean | no | default false |
Response 201
| Field | Type | Required | Notes |
|---|
deployment | object | yes | |
deployment.id | string | yes | for example "dep_01h455vb4pex5vsknk084sn02q" |
deployment.zoneId | string | yes | for example "zone_01h455vb4pex5vsknk084sn02q" |
deployment.originId | string | yes | for example "origin_01h455vb4pex5vsknk084sn02q" |
deployment.status | string | yes | `uploading` until every file is stored, then `ready`: it may be activated. One of "uploading", "ready" |
deployment.spa | boolean | yes | |
deployment.fileCount | integer | yes | 0 to ∞ |
deployment.totalSize | integer | yes | 0 to ∞ |
deployment.active | boolean | yes | |
deployment.createdAt | string (date-time) | yes | UTC, ISO 8601. |
deployment.expiresAt | string (date-time) or null | yes | |
deployment.activatedAt | string (date-time) or null | yes | |
deployment.previewedAt | string (date-time) or null | yes | |
deployment.previews | array of string (uri) | yes | |
missing | array of string | yes | |