hosting
POST /v1/offsite-destinations
Add a place to send backups to, after proving we can write, read and delete there.
Նույնականացում
Ուղարկեք API բանալին որպես bearer token: Բանալին պետք է ունենա hosting.backup.manage թույլտվությունը. առանց դրա բանալին մերժվում է 403, և ոչ թե 404 կարգավիճակով:
Որտեղ տեղադրվում է ձեր կազմակերպության 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