hosting
POST /v1/offsite-destinations
Add a place to send backups to, after proving we can write, read and delete there.
ການພິສູດຕົວຕົນ
ສົ່ງລະຫັດ API ເປັນ bearer token. ລະຫັດຕ້ອງມີສິດ hosting.backup.manage; ລະຫັດທີ່ບໍ່ມີສິດດັ່ງກ່າວຈະຖືກປະຕິເສດດ້ວຍລະຫັດ 403, ບໍ່ແມ່ນ 404.
ບ່ອນທີ່ລະບົບຈັດການອົງກອນຂອງທ່ານໄປ
ຈຸດສິ້ນສຸດນີ້ຮັບເອົາ org_id ເປັນຊ່ອງຂໍ້ມູນໃນ JSON body.
ລະຫັດອົງກອນຂອງທ່ານແມ່ນຢູ່ໜ້າກະແຈ API ໃນແຜງຄວບຄຸມຂອງທ່ານ, ຖັດຈາກກະແຈ itself. ມັນແມ່ນລະຫັດດຽວກັນໃນທຸກໆການໂທທີ່ທ່ານເຮັດ.
ລອງໃຊ້ເບິ່ງ
ປ່ຽນແທນທຸກຢ່າງທີ່ຢູ່ໃນວົງເລັບມຸມດ້ວຍຄ່າຂອງທ່ານເອງ, ແລະ ປ່ຽນແທນຕົວແທນບ່ອນວ່າງຄີດ້ວຍຄີຈາກແຜງຄວບຄຸມຂອງທ່ານ.
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_id | string | ບໍ່ | — |
name | string | ແມ່ນແລ້ວ | — |
kind | string<s3, sftp> | ແມ່ນແລ້ວ | — |
prefix | string | ບໍ່ | — |
endpoint | string | ບໍ່ | S3: an https:// endpoint with no path. |
region | string | ບໍ່ | S3: the bucket's region, or auto for Cloudflare R2. |
bucket | string | ບໍ່ | — |
access_key_id | string | ບໍ່ | — |
secret_access_key | string | ບໍ່ | — |
host | string | ບໍ່ | SFTP: the server's host name. |
port | integer | ບໍ່ | — |
username | string | ບໍ່ | — |
password | string | ບໍ່ | — |
private_key | string | ບໍ່ | OpenSSH format. |
ຖືກໂຈະ
| ຊື່ | ປະເພດ | ຕ້ອງການ | ສິ່ງທີ່ມັນເປັນ |
|---|---|---|---|
id | string | ແມ່ນແລ້ວ | — |
org_id | string | ແມ່ນແລ້ວ | — |
name | string | ແມ່ນແລ້ວ | — |
kind | string<s3, sftp> | ແມ່ນແລ້ວ | — |
endpoint | string | ບໍ່ | — |
region | string | ບໍ່ | — |
bucket | string | ບໍ່ | — |
host | string | ບໍ່ | — |
port | integer | ບໍ່ | — |
username | string | ບໍ່ | — |
host_key_fingerprint | string | ບໍ່ | The pinned SFTP host key as SHA256:…, the form ssh-keygen -lf prints. |
prefix | string | ແມ່ນແລ້ວ | — |
status | string<working, failing> | ແມ່ນແລ້ວ | — |
last_checked_at | string | ບໍ່ | — |
last_check_code | string | ບໍ່ | — |
sites_using | integer | ແມ່ນແລ້ວ | — |
created_at | string | ແມ່ນແລ້ວ | — |
ຂໍ້ຜິດພາດທີ່ຈຸດເຊື່ອມຕໍ່ນີ້ສາມາດສົ່ງຄືນໄດ້
401 · 403 · 404 · 422