hosting
POST /v1/offsite-destinations
Add a place to send backups to, after proving we can write, read and delete there.
인증
Bearer 토큰으로 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