hosting

POST /v1/offsite-destinations

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

すべての hosting エンドポイント

すべての開発者向けドキュメント

認証

ベアラー トークンとして 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_idstringいいえ
namestringはい
kindstring<s3, sftp>はい
prefixstringいいえ
endpointstringいいえS3: an https:// endpoint with no path.
regionstringいいえS3: the bucket's region, or auto for Cloudflare R2.
bucketstringいいえ
access_key_idstringいいえ
secret_access_keystringいいえ
hoststringいいえSFTP: the server's host name.
portintegerいいえ
usernamestringいいえ
passwordstringいいえ
private_keystringいいえOpenSSH format.

返信

名前タイプ必須これがその内容です
idstringはい
org_idstringはい
namestringはい
kindstring<s3, sftp>はい
endpointstringいいえ
regionstringいいえ
bucketstringいいえ
hoststringいいえ
portintegerいいえ
usernamestringいいえ
host_key_fingerprintstringいいえThe pinned SFTP host key as SHA256:…, the form ssh-keygen -lf prints.
prefixstringはい
statusstring<working, failing>はい
last_checked_atstringいいえ
last_check_codestringいいえ
sites_usingintegerはい
created_atstringはい

このエンドポイントが返すエラー

401 · 403 · 404 · 422