hosting

POST /v1/offsite-destinations

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

Všechny koncové body hosting

Všechny dokumenty pro vývojáře

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ázevTypPožadovánoCo to je
org_idstringNe
namestringAno
kindstring<s3, sftp>Ano
prefixstringNe
endpointstringNeS3: an https:// endpoint with no path.
regionstringNeS3: the bucket's region, or auto for Cloudflare R2.
bucketstringNe
access_key_idstringNe
secret_access_keystringNe
hoststringNeSFTP: the server's host name.
portintegerNe
usernamestringNe
passwordstringNe
private_keystringNeOpenSSH format.

Odpověď

NázevTypPožadovánoCo to je
idstringAno
org_idstringAno
namestringAno
kindstring<s3, sftp>Ano
endpointstringNe
regionstringNe
bucketstringNe
hoststringNe
portintegerNe
usernamestringNe
host_key_fingerprintstringNeThe pinned SFTP host key as SHA256:…, the form ssh-keygen -lf prints.
prefixstringAno
statusstring<working, failing>Ano
last_checked_atstringNe
last_check_codestringNe
sites_usingintegerAno
created_atstringAno

Chyby, které může tento koncový bod vrátit

401 · 403 · 404 · 422