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 ခွင့်ပြုချက် ပါရှိရမည်ဖြစ်ပြီး၊ ၎င်းမပါရှိသော သော့ကို 404 အစား 403 ဖြင့် ငြင်းပယ်ပါမည်။
သင့်အဖွဲ့အစည်း၏ id ထည့်သွင်းရမည့်နေရာ
ဤအစွန်းဆုံးနေရာသည် JSON ခန္ဓာကိုယ်အတွင်းရှိ ကွင်းတစ်ခုအနေဖြင့် org_id ကို ယူပါသည်။
သင့်အဖွဲ့အစည်း id သည် သင်၏ ဒက်ရှ်ဘုတ်ရှိ API သော့များ မျက်နှာပြင်တွင်၊ သော့၏ ဘေး၌ ရှိပါသည်။ ၎င်းသည် သင်ပြုလုပ်သည့် ခေါ်ဆိုမှုတိုင်းတွင် တူညီသော id ဖြစ်ပါသည်။
စမ်းကြည့်ရန်
ထောင့်ချိတ်များအတွင်းရှိ မည်သည့်အရာကိုမဆို သင်၏ကိုယ်ပိုင်တန်ဖိုးများဖြင့် အစားထိုးပြီး သင့်ဒက်ရှ်ဘုတ်မှ သော့ချက်တစ်ခုဖြင့် key ကို အစားထိုးပါ။
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 (live API) ကို အသုံးပြု၍ တောင်းဆိုမှုကို လုပ်ဆောင်ပေးပါသည်။ ဤအဆုံးသတ်အမှတ် (endpoint) ကို 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