hosting
POST /v1/offsite-destinations
Add a place to send backups to, after proving we can write, read and delete there.
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
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
org_id | string | Nie | — |
name | string | Tak | — |
kind | string<s3, sftp> | Tak | — |
prefix | string | Nie | — |
endpoint | string | Nie | S3: an https:// endpoint with no path. |
region | string | Nie | S3: the bucket's region, or auto for Cloudflare R2. |
bucket | string | Nie | — |
access_key_id | string | Nie | — |
secret_access_key | string | Nie | — |
host | string | Nie | SFTP: the server's host name. |
port | integer | Nie | — |
username | string | Nie | — |
password | string | Nie | — |
private_key | string | Nie | OpenSSH format. |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
id | string | Tak | — |
org_id | string | Tak | — |
name | string | Tak | — |
kind | string<s3, sftp> | Tak | — |
endpoint | string | Nie | — |
region | string | Nie | — |
bucket | string | Nie | — |
host | string | Nie | — |
port | integer | Nie | — |
username | string | Nie | — |
host_key_fingerprint | string | Nie | The pinned SFTP host key as SHA256:…, the form ssh-keygen -lf prints. |
prefix | string | Tak | — |
status | string<working, failing> | Tak | — |
last_checked_at | string | Nie | — |
last_check_code | string | Nie | — |
sites_using | integer | Tak | — |
created_at | string | Tak | — |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 404 · 422