hosting
PUT /v1/sites/{siteId}/ssl/force
Turn HTTPS enforcement on or off for a site.
প্রমাণীকরণ
একটি বিয়ারার টোকেন হিসেবে একটি এপিআই কি পাঠান। কি-টির অবশ্যই sites.manage অনুমতি থাকতে হবে; এটি ছাড়া কোনো কি ৪০৪ নয়, বরং ৪০৩ ত্রুটি দিয়ে প্রত্যাখ্যাত হবে।
এই এন্ডপয়েন্টটি কোনো অর্গানাইজেশন আইডি নেয় না। আপনার কীটি ইতিমধ্যে এটি যে অর্গানাইজেশনের অন্তর্গত তা শনাক্ত করে এবং প্রতিক্রিয়াটি সেই অনুযায়ী নির্ধারিত হয়।
চেষ্টা করুন
কোণ বন্ধনীতে থাকা যেকোনো কিছু আপনার নিজস্ব মান দিয়ে এবং কী প্লেসহোল্ডারটি আপনার ড্যাশবোর্ডের একটি কী দিয়ে প্রতিস্থাপন করুন।
curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/ssl/force \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "enabled": <boolean> }'লগ ইন করা আছে? আপনার ড্যাশবোর্ডের এপিআই কনসোল আপনার আসল অর্গানাইজেশন আইডি এবং আপনার নিজের কি পূরণ করে দেয়, এবং লাইভ এপিআই-এর বিপরীতে অনুরোধটি চালায় যাতে আপনি প্রকৃত প্রতিক্রিয়া দেখতে পান। এই এন্ডপয়েন্টটি এপিআই কনসোলে খুলুন
বিবরণ
Sets whether every plain-HTTP request to the site is redirected to HTTPS, and returns the site's whole TLS state so the client re-renders from the server's answer rather than from what it asked for. `PUT` because the body states the desired end state: sending the same value twice is the same site. Turning enforcement **on** while no certificate is installed is refused `422` rather than accepted, because the redirect would send every visitor to a URL the browser then rejects — the site is not merely unchanged, it is unreachable. A package type that does not permit the setting is refused `422` before the vendor is called. `404` for a site with no vendor hosting package. Requires `sites.manage`.
পরামিতি
| নাম | ধরন | আবশ্যক | এটি কী |
|---|---|---|---|
siteId (path) | Uuid | হ্যাঁ | Site ID (UUIDv7). |
অনুরোধের বডি
| নাম | ধরন | আবশ্যক | এটি কী |
|---|---|---|---|
enabled | boolean | হ্যাঁ | Whether plain HTTP should be redirected to HTTPS. There is no third value: `getSiteSsl` may report `force_https` as null when the package does not publish the setting, but a cal… |
প্রতিক্রিয়া
| নাম | ধরন | আবশ্যক | এটি কী |
|---|---|---|---|
available | boolean | হ্যাঁ | Whether the package type exposes a certificate surface at all. False renders an explanation rather than an empty list, so "nothing has been issued yet" and "not part of this pla… |
certificates | SiteSslCertificate[] | হ্যাঁ | The certificates installed on the package. |
force_https | boolean | হ্যাঁ | Whether plain HTTP is redirected to HTTPS, or null when the package does not report the setting. Null is a third state the client must render as unknown: an unchecked toggle wou… |
free_ssl_permitted | boolean | হ্যাঁ | Whether this package type permits requesting the free certificate. An absent vendor capability means **refused**, never "probably on" — the refusal is ours, in our words, before… |
force_ssl_permitted | boolean | হ্যাঁ | Whether this package type permits changing HTTPS enforcement. |
external_ssl_permitted | boolean | হ্যাঁ | Whether this package type permits installing a certificate the customer obtained elsewhere (`installSiteExternalSsl`). Reported separately from `free_ssl_permitted` because they… |
এই এন্ডপয়েন্ট থেকে যেসব ত্রুটি আসতে পারে
401 · 403 · 404 · 409 · 422 · 429 · 503