hosting
POST /v1/offsite-destinations
Add a place to send backups to, after proving we can write, read and delete there.
認証
ベアラー トークンとして API キーを送信します。キーには hosting.backup.manage 権限が付与されている必要があります。権限のないキーは 404 ではなく 403 で拒否されます。
組織 ID を入力する場所
このエンドポイントは、JSONボディのフィールドとして org_id を受け取ります。
組織IDは、ダッシュボードのAPIキー画面にキーのすぐ横に表示されています。これは、実行するすべての呼び出しで同じIDになります。
試してみる
アングルブラケット内のすべてをご自身の値に置き換え、キーのプレースホルダーをご利用中のダッシュボードのキーに置き換えてください。
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>> }'ログインしていますか?ダッシュボード内のAPIコンソールでは、実際の組織IDやお客様ご自身のキーが自動入力され、ライブAPIに対してリクエストが実行されるため、実際のレスポンスを確認することができます。 API コンソールでこのエンドポイントを開く
詳細
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.
リクエスト本文
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
org_id | string | いいえ | — |
name | string | はい | — |
kind | string<s3, sftp> | はい | — |
prefix | string | いいえ | — |
endpoint | string | いいえ | S3: an https:// endpoint with no path. |
region | string | いいえ | S3: the bucket's region, or auto for Cloudflare R2. |
bucket | string | いいえ | — |
access_key_id | string | いいえ | — |
secret_access_key | string | いいえ | — |
host | string | いいえ | SFTP: the server's host name. |
port | integer | いいえ | — |
username | string | いいえ | — |
password | string | いいえ | — |
private_key | string | いいえ | OpenSSH format. |
返信
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
id | string | はい | — |
org_id | string | はい | — |
name | string | はい | — |
kind | string<s3, sftp> | はい | — |
endpoint | string | いいえ | — |
region | string | いいえ | — |
bucket | string | いいえ | — |
host | string | いいえ | — |
port | integer | いいえ | — |
username | string | いいえ | — |
host_key_fingerprint | string | いいえ | The pinned SFTP host key as SHA256:…, the form ssh-keygen -lf prints. |
prefix | string | はい | — |
status | string<working, failing> | はい | — |
last_checked_at | string | いいえ | — |
last_check_code | string | いいえ | — |
sites_using | integer | はい | — |
created_at | string | はい | — |
このエンドポイントが返すエラー
401 · 403 · 404 · 422