hosting

POST /v1/offsite-destinations

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

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 hosting.backup.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.

Nơi điền id tổ chức của bạn

Endpoint này nhận org_id làm một trường trong phần thân JSON.

Mã tổ chức của bạn nằm ở màn hình khóa API trong bảng điều khiển, ngay bên cạnh khóa đó. Đây là cùng một mã trong mọi lệnh gọi mà bạn thực hiện.

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/offsite-destinations \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "name": <string>, "kind": <string<s3, sftp>> }'

Đã đă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

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.

Nội dung yêu cầu

TênLoạiBắt buộcNội dung này là gì
org_idstringKhông
namestring
kindstring<s3, sftp>
prefixstringKhông
endpointstringKhôngS3: an https:// endpoint with no path.
regionstringKhôngS3: the bucket's region, or auto for Cloudflare R2.
bucketstringKhông
access_key_idstringKhông
secret_access_keystringKhông
hoststringKhôngSFTP: the server's host name.
portintegerKhông
usernamestringKhông
passwordstringKhông
private_keystringKhôngOpenSSH format.

Phản hồi

TênLoạiBắt buộcNội dung này là gì
idstring
org_idstring
namestring
kindstring<s3, sftp>
endpointstringKhông
regionstringKhông
bucketstringKhông
hoststringKhông
portintegerKhông
usernamestringKhông
host_key_fingerprintstringKhôngThe pinned SFTP host key as SHA256:…, the form ssh-keygen -lf prints.
prefixstring
statusstring<working, failing>
last_checked_atstringKhông
last_check_codestringKhông
sites_usinginteger
created_atstring

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

401 · 403 · 404 · 422