compute
GET /v1/compute/servers/{serverId}/add-on
The add-on this machine carries.
Pengesahan
Hantar kunci API sebagai token pembawa. Kunci tersebut mesti membawa kebenaran sites.view; kunci yang tidak mempunyainya akan ditolak dengan 403, bukan 404.
Titik akhir ini tidak memerlukan id organisasi. Kunci anda telah mengenal pasti organisasi kepunyaannya, dan respons dis skopkan kepadanya.
Cuba
Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka anda.
curl -X GET https://api.zinndigital.com/v1/compute/servers/{serverId}/add-on \
-H "Authorization: Bearer zdk_live_…"Sudah log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API
Butiran
⭐ **Singular, and three verbs on one path**, because a machine carries exactly one add-on at a time — a partial unique index in the database says so. A `/add-ons` collection would imply a list the customer can grow and then refuse the second one. ⛔ Answers `200` with `data: null` for a bare machine, **never** `404`. "This machine has no add-on" is an answer; a 404 here would mean "no such machine", and a client cannot tell those apart from a status code alone. Requires `sites.view`.
Parameter
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
serverId (path) | Uuid | Ya | 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. |
Respons
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
data | ComputeAddOnAssignment | Ya | — |
Ralat yang boleh dikembalikan oleh titik akhir ini
401 · 403 · 404 · 429