hosting

POST /v1/storage/buckets

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

Tất cả các điểm cuối hosting

Tất cả tài liệu dành cho nhà phát triển

Xác thực

Gửi khóa API dưới dạng mã thông báo bearer. Khóa này phải có quyền storage.manage; khóa không có quyền này sẽ bị từ chối với mã lỗi 403, không phải 404.

Endpoint này không nhận ID tổ chức. Khóa của bạn đã xác định tổ chức mà nó thuộc về và phản hồi được giới hạn trong phạm vi đó.

Dùng thử

Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.

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

Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API

Chi tiết

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.

Nội dung yêu cầu

TênLoạiBắt buộcNội dung này là gì
namestring
ownershipstring<zinn, customer>Không
vendorstring<r2, s3, b2, bunny, gcore, minio>Không
bucket_namestringKhông
endpointstringKhông
regionstringKhông
public_base_urlstringKhông
access_key_idstringKhôngRequired for ownership: customer. Written to Vault, never to a column.
secret_access_keystringKhôngRequired for ownership: customer. Written to Vault, never to a column.

Phản hồi

TênLoạiBắt buộcNội dung này là gì
idstring
namestringThe customer's own label, not the bucket's name at the vendor.
ownershipstring<zinn, customer>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>
statusstring<pending, active, suspended, failed>
bucket_namestring
endpointstringKhông
regionstringKhông
public_base_urlstringKhôngWhere a public object is readable. Empty means the bucket is private and its objects are reachable only through a presigned URL.
bytes_storedintegerKhông
objects_storedintegerKhông
usage_measured_atstringKhôngWhen 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_credentialbooleanWhether a stored key exists. The key and the Vault path it lives at are deliberately absent from this payload.
meteredbooleanWhether this bucket's bytes count against object_storage_gb.
created_atstringKhông

Các lỗi điểm cuối này có thể trả về

401 · 403 · 422 · 429