hosting
PUT /v1/sites/{siteId}/php-version
Switch a site's PHP version.
প্রমাণীকরণ
একটি বিয়ারার টোকেন হিসেবে একটি এপিআই কি পাঠান। কি-টির অবশ্যই hosting.php.manage অনুমতি থাকতে হবে; এটি ছাড়া কোনো কি ৪০৪ নয়, বরং ৪০৩ ত্রুটি দিয়ে প্রত্যাখ্যাত হবে।
এই এন্ডপয়েন্টটি কোনো অর্গানাইজেশন আইডি নেয় না। আপনার কীটি ইতিমধ্যে এটি যে অর্গানাইজেশনের অন্তর্গত তা শনাক্ত করে এবং প্রতিক্রিয়াটি সেই অনুযায়ী নির্ধারিত হয়।
চেষ্টা করুন
কোণ বন্ধনীতে থাকা যেকোনো কিছু আপনার নিজস্ব মান দিয়ে এবং কী প্লেসহোল্ডারটি আপনার ড্যাশবোর্ডের একটি কী দিয়ে প্রতিস্থাপন করুন।
curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/php-version \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "version": <string> }'লগ ইন করা আছে? আপনার ড্যাশবোর্ডের এপিআই কনসোল আপনার আসল অর্গানাইজেশন আইডি এবং আপনার নিজের কি পূরণ করে দেয়, এবং লাইভ এপিআই-এর বিপরীতে অনুরোধটি চালায় যাতে আপনি প্রকৃত প্রতিক্রিয়া দেখতে পান। এই এন্ডপয়েন্টটি এপিআই কনসোলে খুলুন
বিবরণ
Sets the site's desired PHP version and returns 202 Accepted. The target must be a version currently offered for the site's product line (or the site's own current version); anything else is a 422. A retired version an existing site already runs is kept — this call never forces a migration. Requires hosting.php.manage. The machine serving the site is told before the row is written, on both lines: one ack-checked vendor call on the resold range, and one idempotent cloudlinux-selector set --current-version= on our own fleet. A version the machine refuses is a 422 and the row is left alone, so the platform never claims a runtime the box is not running. 202 therefore under-promises rather than over-promises. A site with no hosting vendor and no placed worker has nothing serving it yet: the desired version is recorded and provisioning applies it. The site's PHP extensions move with it. The PHP selector keeps extensions per version, so once the machine confirms the switch, the site's composed extension set is pushed for the new version: the platform floor, the customer's own toggles, and whatever its one-click application needs. Without this, a site landed on the new version's default set; a Drupal site answered 500 on every page with no dom (D24906). If that push fails, the switch still stands, and the hourly PHP-settings converge pushes the set on its next pass. A machine that cannot be reached at all — its account does not exist yet, SSH is down, the vendor is unavailable — is a 503, not a 422 and not a 500: the request was valid and a retry can succeed. The stored version is left exactly as it was, so a 503 here means nothing changed anywhere.
পরামিতি
| নাম | ধরন | আবশ্যক | এটি কী |
|---|---|---|---|
siteId (path) | Uuid | হ্যাঁ | Site ID (UUIDv7). |
অনুরোধের বডি
| নাম | ধরন | আবশ্যক | এটি কী |
|---|---|---|---|
version | string | হ্যাঁ | A version offered for the site's product line (or the site's current one). |
প্রতিক্রিয়া
| নাম | ধরন | আবশ্যক | এটি কী |
|---|---|---|---|
version | string | হ্যাঁ | The site's effective PHP version (its own, or its line's default). |
available | string[] | হ্যাঁ | Versions the site may switch to — those offered for its product line, plus its own current version even if that has since been retired (grandfathered). |
applied | boolean | না | Whether the machine serving this site was actually told, and the change read back off it. Present on the PUT response only. false is not a failure: it means the site has no… |
এই এন্ডপয়েন্ট থেকে যেসব ত্রুটি আসতে পারে
401 · 403 · 404 · 422 · 429 · 503