hosting

POST /v1/offsite-destinations

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

Wszystkie punkty końcowe hosting

Wszystkie dokumentacje dla programistów

Uwierzytelnianie

Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie hosting.backup.manage; klucz bez niego jest odrzucany z kodem 403, a nie 404.

Miejsce na identyfikator organizacji

Ten punkt końcowy przyjmuje org_id jako pole w treści JSON.

Identyfikator Twojej organizacji znajduje się na ekranie kluczy API w Twoim panelu, obok samego klucza. Jest to ten sam identyfikator w każdym wywołaniu, które wykonujesz.

Wypróbuj

Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.

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

Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API

Szczegóły

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.

Treść żądania

NazwaTypWymaganeCo to jest
org_idstringNie
namestringTak
kindstring<s3, sftp>Tak
prefixstringNie
endpointstringNieS3: an https:// endpoint with no path.
regionstringNieS3: the bucket's region, or auto for Cloudflare R2.
bucketstringNie
access_key_idstringNie
secret_access_keystringNie
hoststringNieSFTP: the server's host name.
portintegerNie
usernamestringNie
passwordstringNie
private_keystringNieOpenSSH format.

Odpowiedź

NazwaTypWymaganeCo to jest
idstringTak
org_idstringTak
namestringTak
kindstring<s3, sftp>Tak
endpointstringNie
regionstringNie
bucketstringNie
hoststringNie
portintegerNie
usernamestringNie
host_key_fingerprintstringNieThe pinned SFTP host key as SHA256:…, the form ssh-keygen -lf prints.
prefixstringTak
statusstring<working, failing>Tak
last_checked_atstringNie
last_check_codestringNie
sites_usingintegerTak
created_atstringTak

Błędy, które ten punkt końcowy może zwrócić

401 · 403 · 404 · 422