hosting

POST /v1/storage/buckets

Provision Zinn® storage, or attach a bucket of your own.

Tous les points de terminaison hosting

Authentification

Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation storage.manage ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.

Cet endpoint ne prend aucun identifiant d'organisation. Votre clé identifie déjà l'organisation à laquelle elle appartient, et la réponse y est limitée.

Essayer

Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.

curl -X POST https://api.zinndigital.com/v1/storage/buckets \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "name": <string> }'

Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API

Détails

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`.

Corps de la requête

NomTypeObligatoireQu'est-ce que c'est
namestringOui
ownershipstring<zinn, customer>Non
vendorstring<r2, s3, b2, bunny, gcore, minio>Non
bucket_namestringNon
endpointstringNon
regionstringNon
public_base_urlstringNon
access_key_idstringNonRequired for `ownership: customer`. Written to Vault, never to a column.
secret_access_keystringNonRequired for `ownership: customer`. Written to Vault, never to a column.

Réponse

NomTypeObligatoireQu'est-ce que c'est
idstringOui
namestringOuiThe customer's own label, not the bucket's name at the vendor.
ownershipstring<zinn, customer>Oui`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.
vendorstring<r2, s3, b2, bunny, gcore, minio>Oui
statusstring<pending, active, suspended, failed>Oui
bucket_namestringOui
endpointstringNon
regionstringNon
public_base_urlstringNonWhere a public object is readable. Empty means the bucket is private and its objects are reachable only through a presigned URL.
bytes_storedintegerNon
objects_storedintegerNon
usage_measured_atstringNonWhen 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_credentialbooleanOuiWhether a stored key exists. The key and the Vault path it lives at are deliberately absent from this payload.
meteredbooleanOuiWhether this bucket's bytes count against `object_storage_gb`.
created_atstringNon

Erreurs que cet point de terminaison peut renvoyer

401 · 403 · 422 · 429