compute
POST /v1/compute/servers/{serverId}/add-on
Buy an add-on for this machine.
සත්යාපනය
බෙරර් ටෝකනයක් ලෙස API යතුරක් යවන්න. යතුරෙහි sites.view අවසරය තිබිය යුතුය; එය නොමැති යතුරක් 404 ලෙස නොව 403 ලෙස ප්රතික්ෂේප කෙරේ.
මෙම අවසාන ලක්ෂ්යය සඳහා සංවිධාන හැඳුනුම්පතක් (organisation id) අවශ්ය නොවේ. ඔබගේ යතුර මඟින් එය අයත් වන සංවිධානය දැනටමත් හඳුනා ගන්නා අතර, ප්රතිචාරය ඒ වෙත සීමා වේ.
උත්සාහ කරන්න
<අගයන්> සමඟ කෝණික වරහන් තුළ ඇති ඕනෑම දෙයක් සහ ඔබේ උපකරණ පුවරුවෙන් ලබාගත් යතුරක් සමඟ key ස්ථාන දායකය ප්රතිස්ථාපනය කරන්න.
curl -X POST https://api.zinndigital.com/v1/compute/servers/{serverId}/add-on \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "code": <string> }'පද්ධතියට පිවිස සිටිනවාද? ඔබගේ උපකරණ පුවරුවේ ඇති API කොන්සෝලය මඟින් ඔබේ සැබෑ ආයතනික හැඳුනුම්පත සහ ඔබේම යතුර පුරවා, සජීවී API වෙත ඉල්ලීම ක්රියාත්මක කරන බැවින් ඔබට සැබෑ ප්රතිචාරය දැකගත හැක. මෙම අග්රලක්ෂ්යය API කොන්සෝලය තුළ විවෘත කරන්න
විස්තර
Requires sites.view and billing.payment.manage. ⛔⛔ It was billing.entitlement.manage until 2026-08-17, which no customer role holds, so the add-on designed to be turned on later could be turned on by nobody who owns a machine. The gate moved because the property behind it did: the add-on's price now joins the machine's subscription (priced into the cart line at order, moved from the next period when taken later), so this no longer spends Zinn®'s money and bills nobody. ⚖️ billing.payment.manage is the key the owner ruled for this class of control on 2026-08-17 (docs/136 §2e) — owner and billing, and deliberately not dev: a developer creates sites, and does not commit the organisation to a recurring licence. ⛔ A machine with no subscription is refused 422 unless the caller also holds billing.entitlement.manage. Nothing would charge for the add-on there — that is the staff "on the house" path, and it stays deliberate rather than accidental. ⛔⛤ AN ADD-ON WITH applies_at OF running OR running_reboot IS INSTALLED ON THE MACHINE AS IT STANDS, AND THE DATA ON IT IS NOT TOUCHED. Until 2026-08-31 this endpoint refused every one of them with a sentence about rebuilding the disk. That sentence described a limitation of cloud-init, which runs only at create, and not of Plesk or CloudLinux — both of which ship installers whose documented purpose is converting a server that is already running. docs/314 carries the vendor evidence. Such a request starts a Temporal workflow and answers 201 with state of installing (or queued, when a pooled licence is out of stock). The client polls GET for install_step. Plesk takes around fifteen minutes; CloudLinux restarts the machine once. ⛔⛔ It requires access — one-time root credentials — and it is refused 422 without them. This range hands SSH keys to the customer at build and the platform holds no key to any machine on it, so there is no standing credential to reach a running box with, and docs/127 D4 chose deliberately never to create one. The credential is written to Vault under a path scoped to this one assignment, read only inside the install activities, kept out of the workflow history, and deleted on every terminal outcome — success, failure or refusal. ⛔ A genuinely build-only add-on is still refused 422 with a sentence naming the remedy. Nothing in the catalogue is build-only today; the refusal is kept for the day something is. ⛔ 503, not 422, when a pooled licence is out of stock at order time: the customer's next action is to try again, not to change their order. ⚖️ On a machine that is already running the same condition queues instead, by the owner's ruling of 2026-08-31 — the two paths differ because the moment differs, and at order time a refusal still reaches the customer before they have committed.
පරාමිතීන්
| නම | වර්ගය | අත්යවශ්යයි | එය කුමක්ද |
|---|---|---|---|
serverId (path) | Uuid | ඔව් | The server's id, as listComputeServers reports it. Ours (UUIDv7), minted when the order row was written — never the provider's own identifier for the machine. |
ඉල්ලුම් පත්ර ශරීරය
| නම | වර්ගය | අත්යවශ්යයි | එය කුමක්ද |
|---|---|---|---|
code | string | ඔව් | The add-on's catalogue code. bare records nothing. |
currency | string | නැත | The currency to charge in. ⛔ Frozen onto the assignment at purchase, so a later admin repricing does not move an existing customer's bill. |
access | object | නැත | One-time root access to the machine, required for any add-on whose applies_at is running or running_reboot and ignored for the rest. ⛔⛔… |
පsspil
| නම | වර්ගය | අත්යවශ්යයි | එය කුමක්ද |
|---|---|---|---|
data | object | ඔව් | — |
මෙම අවසාන ලක්ෂ්යය ආපසු ලබා දිය හැකි දෝෂ
401 · 403 · 404 · 422 · 429 · 503