hosting

POST /v1/offsite-destinations

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

Све hosting крајње тачке

Сва документација за програмере →

Аутентификација

Пошаљите API кључ као bearer токен. Кључ мора имати дозволу hosting.backup.manage; кључ без ње се одбија уз 403, а не 404.

Где се уноси ID ваше организације

Ова крајња тачка узима org_id као поље у JSON телу.

Идентификатор ваше организације се налази на екрану са 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-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у 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