compute
POST /v1/compute/servers/{serverId}/services/action
Start, stop or restart one service inside a server.
அங்கீகாரம்
பியரர் டோக்கனாக (bearer token) ஒரு API விசையை அனுப்பவும். அந்த விசை sites.view அனுமதியைக் கொண்டிருக்க வேண்டும்; அது இல்லாத விசை 404 அல்ல, 403 குறியீட்டுடன் மறுக்கப்படும்.
இந்த எண்ட்பாயிண்டிற்கு எந்த அமைப்பு ஐடியும் (organisation id) தேவையில்லை. உங்கள் விசை (key) அது எந்த அமைப்புக்குரியது என்பதை ஏற்கனவே அடையாளம் காட்டுகிறது, மேலும் பதிலானது அதற்கேற்ப வரம்பிடப்பட்டுள்ளது.
முயன்று பார்
கோண அடைப்புக்குறிகளில் உள்ள எதையும் உங்கள் சொந்த மதிப்புகளுடன் மாற்றவும், மேலும் விசை பிளேஸ்ஹோல்டரை உங்கள் டாஷ்போர்டில் உள்ள விசையுடன் மாற்றவும்.
curl -X POST https://api.zinndigital.com/v1/compute/servers/{serverId}/services/action \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "unit": <string>, "action": <string<start, stop, restart>> }'உள்நுழைந்துள்ளீர்களா? உங்கள் டேஷ்போர்டில் உள்ள ஏபிஐ கன்சோல் உங்கள் உண்மையான நிறுவன ஐடி மற்றும் உங்கள் சொந்த சாவியை நிரப்புகிறது, மேலும் நேரலை ஏபிஐக்கு எதிராக கோரிக்கையை இயக்குகிறது, இதனால் நீங்கள் உண்மையான பதிலைக் காண முடியும். இந்த எண்ட்மார்க்கை ஏபிஐ கன்சோலில் திறக்கவும்
விவரங்கள்
Acts on a single service unit inside the machine - Apache, MariaDB, ProFTPD - while the machine itself stays up. This is the difference between a customer whose site is down fixing it themselves in ten seconds and a customer opening a ticket. ⛔ Not the same blast radius as setComputeServerPower. That one moves the whole machine; this moves one unit inside a machine that keeps running. Stopping a web server or a database still takes every website on that box off the air, so the operation is audit-logged with the real actor. ⛔ unit must be a service the machine is currently running. The engine checks the name against the machine's own live service list before sending anything, so an arbitrary systemd unit - sshd.service, a firewall, the enrolment agent - is refused with a 422 that names what is available instead. The list this endpoint's sibling listComputeServerServices returns is exactly the set that may be named here. The response carries the provider's own confirmation sentence, which is worth showing to the customer verbatim. 404 for a server that is not the caller's; 422 for a machine that is not active, a unit it does not run, or a verb outside start/stop/restart. Requires sites.view and sites.restart.
அளவுருக்கள்
| பெயர் | வகை | தேவைப்படுகிறது | அது என்ன |
|---|---|---|---|
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. |
கோரிக்கை உடல்
| பெயர் | வகை | தேவைப்படுகிறது | அது என்ன |
|---|---|---|---|
unit | string | ஆம் | The service unit to act on, exactly as listComputeServerServices reports it (httpd.service, mariadb.service, proftpd.service). ⛔ Must be a unit the machine is… |
action | string<start, stop, restart> | ஆம் | ⛔ A closed vocabulary. reload, enable and disable are deliberately absent: they have never been proven against a provider, and a verb we have not proven is a button that may… |
பதில்
| பெயர் | வகை | தேவைப்படுகிறது | அது என்ன |
|---|---|---|---|
message | string | ஆம் | The provider's own confirmation sentence — "Service proftpd.service was stopped successfully." — passed through verbatim, because it is more specific than anything we would… |
இந்த எண்ட்ஸ்பாயிண்ட் திரும்ப அனுப்பக்கூடிய பிழைகள்
401 · 403 · 404 · 422 · 429 · 503