hosting

POST /v1/offsite-destinations

Add a place to send backups to, after proving we can write, read and delete there.

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

เอกสารสำหรับนักพัฒนาทั้งหมด

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

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

ตำแหน่งสำหรับใส่รหัสองค์กรของคุณ

Endpoint นี้รับ org_id เป็นฟิลด์ใน JSON body

รหัสองค์กรของคุณจะแสดงอยู่บนหน้าคีย์ API ในแดชบอร์ดของคุณ โดยอยู่ถัดจากคีย์นั้นๆ รหัสนี้จะเป็นรหัสเดิมในการเรียกใช้งานทุกครั้งของคุณ

ทดลองใช้เลย

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

curl -X POST https://api.zinndigital.com/v1/offsite-destinations \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "name": <string>, "kind": <string<s3, sftp>> }'

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

รายละเอียด

The destination is saved only after a real round trip: a small test file is written, read back byte for byte and deleted. For SFTP the server's host key is read without authenticating and pinned; every later connection must present it. Addresses must be on the public internet and S3 endpoints must be https://. Credentials are write-only and go straight to our secret store with a fresh encryption key; every archive is encrypted (AES-256-CTR with HMAC-SHA256) before it leaves us. Refusals are 422 with a machine code in details[0].code. Requires hosting.backup.manage.

เนื้อหาคำขอ

ชื่อประเภทจำเป็นต้องมีลักษณะของสิ่งนี้
org_idstringไม่ใช่
namestringใช่
kindstring<s3, sftp>ใช่
prefixstringไม่ใช่
endpointstringไม่ใช่S3: an https:// endpoint with no path.
regionstringไม่ใช่S3: the bucket's region, or auto for Cloudflare R2.
bucketstringไม่ใช่
access_key_idstringไม่ใช่
secret_access_keystringไม่ใช่
hoststringไม่ใช่SFTP: the server's host name.
portintegerไม่ใช่
usernamestringไม่ใช่
passwordstringไม่ใช่
private_keystringไม่ใช่OpenSSH format.

การตอบกลับ

ชื่อประเภทจำเป็นต้องมีลักษณะของสิ่งนี้
idstringใช่
org_idstringใช่
namestringใช่
kindstring<s3, sftp>ใช่
endpointstringไม่ใช่
regionstringไม่ใช่
bucketstringไม่ใช่
hoststringไม่ใช่
portintegerไม่ใช่
usernamestringไม่ใช่
host_key_fingerprintstringไม่ใช่The pinned SFTP host key as SHA256:…, the form ssh-keygen -lf prints.
prefixstringใช่
statusstring<working, failing>ใช่
last_checked_atstringไม่ใช่
last_check_codestringไม่ใช่
sites_usingintegerใช่
created_atstringใช่

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

401 · 403 · 404 · 422