hosting
POST /v1/offsite-destinations
Add a place to send backups to, after proving we can write, read and delete there.
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
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
org_id | string | Non | — |
name | string | Oui | — |
kind | string<s3, sftp> | Oui | — |
prefix | string | Non | — |
endpoint | string | Non | S3: an https:// endpoint with no path. |
region | string | Non | S3: the bucket's region, or auto for Cloudflare R2. |
bucket | string | Non | — |
access_key_id | string | Non | — |
secret_access_key | string | Non | — |
host | string | Non | SFTP: the server's host name. |
port | integer | Non | — |
username | string | Non | — |
password | string | Non | — |
private_key | string | Non | OpenSSH format. |
Réponse
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
id | string | Oui | — |
org_id | string | Oui | — |
name | string | Oui | — |
kind | string<s3, sftp> | Oui | — |
endpoint | string | Non | — |
region | string | Non | — |
bucket | string | Non | — |
host | string | Non | — |
port | integer | Non | — |
username | string | Non | — |
host_key_fingerprint | string | Non | The pinned SFTP host key as SHA256:…, the form ssh-keygen -lf prints. |
prefix | string | Oui | — |
status | string<working, failing> | Oui | — |
last_checked_at | string | Non | — |
last_check_code | string | Non | — |
sites_using | integer | Oui | — |
created_at | string | Oui | — |
Erreurs que cet point de terminaison peut renvoyer
401 · 403 · 404 · 422