hosting
POST /v1/storage/buckets
Provision Zinn® storage, or attach a bucket of your own.
Ìfàṣẹ́pọ̀
Fi bọ́ọ̀lù (bearer token) ranṣẹ gẹ́gẹ́ bí kọ́kọ́rọ́ API. Kọ́kọ́rọ́ náà gbọ́dọ̀ ní ìyọ̀ǹda storage.manage; a ó kọ̀ ọ́ silẹ pẹlu 403, kii ṣe 404, ti kọ́kọ́rọ́ náà kò bá ní i.
Ojú abánisọ̀rọ̀ yìí kò gba id ajọ kankan. Kọ́kọ́rọ́ rẹ ti mọ ajọ ti o jẹ ti e, a o si fèsì nipa rẹ̀.
Gbiyanju rẹ
Rọ́pọ̀ èyíkéyìí nínú àwọn àmì ìtọ́ka < > pẹ̀lú iye tirẹ̀, àti àmì ìdánimọ̀ bọ́tìnnì náà pẹ̀lú bọ́tìnnì kan láti inú dásibọ̀ọ̀dù rẹ.
curl -X POST https://api.zinndigital.com/v1/storage/buckets \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string> }'Ṣé o ti wọlé? Iwọ̀n api ní nú ìgbékalẹ̀ rẹ kún id àjọ gidi rẹ ati bọtini tirẹ, o si nṣiṣẹ ibeere na lòdì si api gidi ki o le rii esi gidi na. Ṣí ojú abáná yìí sílẹ̀ nínú kọnsólù API
Àwọn kúlẹ̀kúlẹ̀
With `ownership: zinn` this provisions storage on our own backend and needs nothing else. With `ownership: customer` it attaches an existing S3-compatible bucket and requires `bucket_name`, `endpoint`, `access_key_id` and `secret_access_key`. The key pair is written to Vault and never to a column; the bucket is created `pending` and only becomes `active` once the write has returned, so a failure part way leaves a visibly unfinished bucket rather than one that reads as configured and cannot sign. Requires `storage.manage`.
Akoonu ibeere naa
| Orúkọ | Iru | Tí a nílò | Kini o jẹ |
|---|---|---|---|
name | string | Bẹẹni | — |
ownership | string<zinn, customer> | Bẹẹkọ | — |
vendor | string<r2, s3, b2, bunny, gcore, minio> | Bẹẹkọ | — |
bucket_name | string | Bẹẹkọ | — |
endpoint | string | Bẹẹkọ | — |
region | string | Bẹẹkọ | — |
public_base_url | string | Bẹẹkọ | — |
access_key_id | string | Bẹẹkọ | Required for `ownership: customer`. Written to Vault, never to a column. |
secret_access_key | string | Bẹẹkọ | Required for `ownership: customer`. Written to Vault, never to a column. |
Idahun
| Orúkọ | Iru | Tí a nílò | Kini o jẹ |
|---|---|---|---|
id | string | Bẹẹni | — |
name | string | Bẹẹni | The customer's own label, not the bucket's name at the vendor. |
ownership | string<zinn, customer> | Bẹẹni | `zinn` is storage we operate and bill for; `customer` is the organisation's own bucket, which costs us nothing and is not metered against their allowance. |
vendor | string<r2, s3, b2, bunny, gcore, minio> | Bẹẹni | — |
status | string<pending, active, suspended, failed> | Bẹẹni | — |
bucket_name | string | Bẹẹni | — |
endpoint | string | Bẹẹkọ | — |
region | string | Bẹẹkọ | — |
public_base_url | string | Bẹẹkọ | Where a public object is readable. Empty means the bucket is private and its objects are reachable only through a presigned URL. |
bytes_stored | integer | Bẹẹkọ | — |
objects_stored | integer | Bẹẹkọ | — |
usage_measured_at | string | Bẹẹkọ | When the size above was last measured against the vendor. `null` means it has not been measured yet — which is not the same as empty. |
has_credential | boolean | Bẹẹni | Whether a stored key exists. The key and the Vault path it lives at are deliberately absent from this payload. |
metered | boolean | Bẹẹni | Whether this bucket's bytes count against `object_storage_gb`. |
created_at | string | Bẹẹkọ | — |
Awọn aṣiṣe ti ibudo ipari yii le da pada
401 · 403 · 422 · 429