hosting

POST /v1/offsite-destinations

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

Tous les points de terminaison hosting

Toute la documentation pour développeurs

Authentification

Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation hosting.backup.manage ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.

Où insérer l'ID de votre organisation

Cet endpoint prend org_id comme champ dans le corps JSON.

L'identifiant de votre organisation se trouve sur l'écran des clés API de votre tableau de bord, à côté de la clé elle-même. Il s'agit du même identifiant pour chaque appel que vous effectuez.

Essayer

Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.

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

Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API

Détails

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.

Corps de la requête

NomTypeObligatoireQu'est-ce que c'est
org_idstringNon
namestringOui
kindstring<s3, sftp>Oui
prefixstringNon
endpointstringNonS3: an https:// endpoint with no path.
regionstringNonS3: the bucket's region, or auto for Cloudflare R2.
bucketstringNon
access_key_idstringNon
secret_access_keystringNon
hoststringNonSFTP: the server's host name.
portintegerNon
usernamestringNon
passwordstringNon
private_keystringNonOpenSSH format.

Réponse

NomTypeObligatoireQu'est-ce que c'est
idstringOui
org_idstringOui
namestringOui
kindstring<s3, sftp>Oui
endpointstringNon
regionstringNon
bucketstringNon
hoststringNon
portintegerNon
usernamestringNon
host_key_fingerprintstringNonThe pinned SFTP host key as SHA256:…, the form ssh-keygen -lf prints.
prefixstringOui
statusstring<working, failing>Oui
last_checked_atstringNon
last_check_codestringNon
sites_usingintegerOui
created_atstringOui

Erreurs que cet point de terminaison peut renvoyer

401 · 403 · 404 · 422