hosting
POST /v1/offsite-destinations
Add a place to send backups to, after proving we can write, read and delete there.
Autentizace
Zašlete API klíč jako nosný token (bearer token). Klíč musí mít oprávnění hosting.backup.manage; klíč bez něj je odmítnut s kódem 403, nikoli 404.
Sem patří ID vaší organizace
Tento koncový bod přijímá org_id jako pole v těle JSON.
ID vaší organizace najdete na obrazovce API klíčů ve vašem přehledu, hned vedle samotného klíče. Je to stále stejné ID v každém volání, které provedete.
Vyzvednout
Nahraďte cokoli v závorkách vlastními hodnotami a zástupný symbol klíče klíčem z vašeho řídicího panelu.
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>> }'Přihlášeni? Konzole API ve vašem dashboardu automaticky doplní vaše skutečné ID organizace i váš vlastní klíč a odešle požadavek na živé API, abyste viděli reálnou odpověď. Otevřete tento koncový bod v konzoli API
Podrobnosti
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.
Tělo požadavku
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
org_id | string | Ne | — |
name | string | Ano | — |
kind | string<s3, sftp> | Ano | — |
prefix | string | Ne | — |
endpoint | string | Ne | S3: an https:// endpoint with no path. |
region | string | Ne | S3: the bucket's region, or auto for Cloudflare R2. |
bucket | string | Ne | — |
access_key_id | string | Ne | — |
secret_access_key | string | Ne | — |
host | string | Ne | SFTP: the server's host name. |
port | integer | Ne | — |
username | string | Ne | — |
password | string | Ne | — |
private_key | string | Ne | OpenSSH format. |
Odpověď
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
id | string | Ano | — |
org_id | string | Ano | — |
name | string | Ano | — |
kind | string<s3, sftp> | Ano | — |
endpoint | string | Ne | — |
region | string | Ne | — |
bucket | string | Ne | — |
host | string | Ne | — |
port | integer | Ne | — |
username | string | Ne | — |
host_key_fingerprint | string | Ne | The pinned SFTP host key as SHA256:…, the form ssh-keygen -lf prints. |
prefix | string | Ano | — |
status | string<working, failing> | Ano | — |
last_checked_at | string | Ne | — |
last_check_code | string | Ne | — |
sites_using | integer | Ano | — |
created_at | string | Ano | — |
Chyby, které může tento koncový bod vrátit
401 · 403 · 404 · 422