hosting

POST /v1/offsite-destinations

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

Bütün hosting nöqtələri

Bütün tərtibatçı sənədləri

Doğrulama

API açarını bearer token kimi göndərin. Açar hosting.backup.manage icazəsinə malik olmalıdır; bu icazəsi olmayan açar 404 deyil, 403 xətası ilə rədd edilir.

Təşkilatınızın identifikatorunun yerləşdiyi yer

Bu son nöqtə JSON gövdəsində sahə kimi org_id qəbul edir.

Təşkilatınızın identifikatoru idarə panelinizdəki API açarları ekranında, açarın özünün yanında yerləşir. Bu, etdiyiniz hər bir sorğuda eyni identifikatordur.

Sınaqdan keçir

Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.

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>> }'

Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın

Təfərrüatlar

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.

Sorğu gövdəsi

AdTipTələb olunurNədir
org_idstringXeyr
namestringBəli
kindstring<s3, sftp>Bəli
prefixstringXeyr
endpointstringXeyrS3: an https:// endpoint with no path.
regionstringXeyrS3: the bucket's region, or auto for Cloudflare R2.
bucketstringXeyr
access_key_idstringXeyr
secret_access_keystringXeyr
hoststringXeyrSFTP: the server's host name.
portintegerXeyr
usernamestringXeyr
passwordstringXeyr
private_keystringXeyrOpenSSH format.

Cavab

AdTipTələb olunurNədir
idstringBəli
org_idstringBəli
namestringBəli
kindstring<s3, sftp>Bəli
endpointstringXeyr
regionstringXeyr
bucketstringXeyr
hoststringXeyr
portintegerXeyr
usernamestringXeyr
host_key_fingerprintstringXeyrThe pinned SFTP host key as SHA256:…, the form ssh-keygen -lf prints.
prefixstringBəli
statusstring<working, failing>Bəli
last_checked_atstringXeyr
last_check_codestringXeyr
sites_usingintegerBəli
created_atstringBəli

Bu son nöqtənin qaytara biləcəyi xətalar

401 · 403 · 404 · 422