hosting

POST /v1/storage/buckets

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

จุดสิ้นสุด hosting ทั้งหมด

การยืนยันตัวตน

ส่ง API key ในรูปแบบ bearer token คีย์ดังกล่าวต้องมีสิทธิ์ storage.manage หากไม่มีสิทธิ์ ระบบจะปฏิเสธด้วยรหัส 403 แทนที่จะเป็น 404

ปลายทางนี้ไม่ต้องใช้รหัสองค์กร คีย์ของคุณระบุองค์กรที่เป็นเจ้าของอยู่แล้ว และการตอบกลับจะถูกจำกัดขอบเขตไว้เฉพาะองค์กรนั้น

ทดลองใช้เลย

แทนที่สิ่งใดๆ ที่อยู่ภายในวงเล็บแหลมด้วยค่าของคุณเอง และตัวยึดตำแหน่งคีย์ด้วยคีย์จากแดชบอร์ดของคุณ

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

เข้าสู่ระบบแล้วใช่ไหม คอนโซล API ในแดชบอร์ดของคุณจะเติมรหัสองค์กรจริงและคีย์ของคุณเองโดยอัตโนมัติ และทำการส่งคำขอไปยัง API จริง เพื่อให้คุณเห็นผลลัพธ์ที่เป็นข้อมูลจริง เปิดจุดสิ้นสุดนี้ในคอนโซล API

รายละเอียด

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

เนื้อหาคำขอ

ชื่อประเภทจำเป็นต้องมีลักษณะของสิ่งนี้
namestringใช่
ownershipstring<zinn, customer>ไม่ใช่
vendorstring<r2, s3, b2, bunny, gcore, minio>ไม่ใช่
bucket_namestringไม่ใช่
endpointstringไม่ใช่
regionstringไม่ใช่
public_base_urlstringไม่ใช่
access_key_idstringไม่ใช่Required for `ownership: customer`. Written to Vault, never to a column.
secret_access_keystringไม่ใช่Required for `ownership: customer`. Written to Vault, never to a column.

การตอบกลับ

ชื่อประเภทจำเป็นต้องมีลักษณะของสิ่งนี้
idstringใช่
namestringใช่The 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ใช่
endpointstringไม่ใช่
regionstringไม่ใช่
public_base_urlstringไม่ใช่Where a public object is readable. Empty means the bucket is private and its objects are reachable only through a presigned URL.
bytes_storedintegerไม่ใช่
objects_storedintegerไม่ใช่
usage_measured_atstringไม่ใช่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_credentialbooleanใช่Whether a stored key exists. The key and the Vault path it lives at are deliberately absent from this payload.
meteredbooleanใช่Whether this bucket's bytes count against `object_storage_gb`.
created_atstringไม่ใช่

ข้อผิดพลาดที่เอนด์พอยต์นี้สามารถส่งกลับได้

401 · 403 · 422 · 429