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 اجازه ولري؛ له دې اجازې پرته کی د 404 پرځای د 403 په واسطه رد کیږي.
چیرته چې ستاسو د سازمان آی ډي ځي
دا پای ټکی د JSON په متن کې د یوې ساحې په توګه org_id اخلي.
ستاسو د سازمان آی ډي ستاسو په ډشبورډ کې د 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 کنسول ستاسو د اصلي سازمان ID او ستاسو خپله کیلي ډکوي، او غوښتنه د ژوندی API په وړاندې پرمخ وړي ترڅو تاسو وکولی شئ اصلي ځواب وګورئ. دا پای ټکی (endpoint) د 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