hosting

PATCH /v1/sites/{siteId}/cdn/canonical-host

Choose www or non-www, and whether to force HTTPS.

hosting အားလုံးသော အဆုံးသတ်များ

စစ်မှန်ကြောင်း အတည်ပြုခြင်း

API သော့တစ်ခုကို bearer token အဖြစ် ပို့ပါ။ သော့တွင် hosting.cdn.manage ခွင့်ပြုချက် ပါရှိရမည်ဖြစ်ပြီး၊ ၎င်းမပါရှိသော သော့ကို 404 အစား 403 ဖြင့် ငြင်းပယ်ပါမည်။

ဤ အမှတ်ဆက် (endpoint) သည် အဖွဲ့အစည်း အိုင်ဒီ (organisation id) ကို မယူပါ။ သင်၏ သော့ချက် (key) သည် ၎င်းပိုင်ဆိုင်သည့် အဖွဲ့အစည်းကို အလိုအလျောက် ဖော်ထုတ်ပြီးဖြစ်ကာ တုံ့ပြန်ချက်ကိုလည်း ၎င်းနှင့်သာ ကန့်သတ်ထားမည် ဖြစ်သည်။

စမ်းကြည့်ရန်

ထောင့်ချိတ်များအတွင်းရှိ မည်သည့်အရာကိုမဆို သင်၏ကိုယ်ပိုင်တန်ဖိုးများဖြင့် အစားထိုးပြီး သင့်ဒက်ရှ်ဘုတ်မှ သော့ချက်တစ်ခုဖြင့် key ကို အစားထိုးပါ။

curl -X PATCH https://api.zinndigital.com/v1/sites/{siteId}/cdn/canonical-host \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

ဝင်ရောက်ပြီးပြီလား။ သင့်ဒက်ရှ်ဘုတ်ရှိ API ကွန်ဆိုးလ်တွင် သင့်၏ တကယ့်အဖွဲ့အစည်း ID နှင့် သင့်ကိုယ်ပိုင်သော့ချက်တို့ဖြင့် ဖြည့်သွင်းပေးပြီး တကယ့်တုံ့ပြန်ချက်ကို သင်မြင်နိုင်ရန် တိုက်ရိုက် API (live API) ကို အသုံးပြု၍ တောင်းဆိုမှုကို လုပ်ဆောင်ပေးပါသည်။ ဤအဆုံးသတ်အမှတ် (endpoint) ကို API ကွန်ဆိုးလ်တွင် ဖွင့်ပါ

အသေးစိတ်အချက်အလက်များ

A **merge**: only the fields present in the body change. An absent field is left alone rather than reset, so a client written before one of these existed cannot switch it off on every save. `force_https` defaults to `true` on every new site. The insecure choice has to be made explicitly; it is never reached by omitting a field. A site whose primary domain is a **deeper subdomain** (`shop.blog.example.com`) has no `www` counterpart, and the request is a `422` rather than a stored preference whose plan can never be built. Refusing at write time is deliberate: the alternative saves cleanly and then fails later inside provisioning, where the customer sees a stuck deploy instead of the bad input. An empty body is a `422`, not a no-op success. Requires `hosting.cdn.manage`.

ကန့်သတ်ဘောင်များ

နာမည်အမျိုးအစားလိုအပ်သည်ဘာလဲဆိုတာ
siteId (path)Uuidဟုတ်ကဲ့Site ID (UUIDv7).

တောင်းဆိုချက် ကိုယ်ထည်

နာမည်အမျိုးအစားလိုအပ်သည်ဘာလဲဆိုတာ
canonical_hoststring<apex, www>မဟုတ်ပါ
force_httpsbooleanမဟုတ်ပါ

တုံ့ပြန်ချက်

နာမည်အမျိုးအစားလိုအပ်သည်ဘာလဲဆိုတာ
canonical_hoststring<apex, www>ဟုတ်ကဲ့
force_httpsbooleanဟုတ်ကဲ့Redirect http to https at the edge. Defaults to true on every new site.
serves_onstringဟုတ်ကဲ့The hostname that actually serves.
redirects_fromstringဟုတ်ကဲ့The hostname that permanently redirects to `serves_on`.
redirect_statusintegerဟုတ်ကဲ့Always 301. A 302 tells search engines to keep indexing the alias, which leaves the duplicate-content problem unsolved while looking correct in a browser.
certificate_hostsstring[]ဟုတ်ကဲ့**Both** hostnames, always. TLS is negotiated on the name being redirected from, so a certificate covering only `serves_on` puts a security interstitial in front of the alias an…
apex_deliverystring<native, alias, a_records, unsupported>ဟုတ်ကဲ့How the zone apex is made to resolve. A bare apex cannot be a `CNAME`, so on a pull-zone CDN it resolves only through CNAME-flattening/ALIAS at the DNS provider, or through A/AA…
apex_deliverablebooleanဟုတ်ကဲ့`false` when neither mechanism is available for this CDN/DNS pairing. The combination is refused rather than accepted, because the alternative provisions cleanly, reports health…

ဤအမှတ်ဆက်မှ ပြန်ပေးနိုင်သော အမှားများ

401 · 403 · 404 · 422 · 429