Set a service's crash policy
Restart on or off after a crash, and with restart on, whether to stop after N crashes in a row (0 = never). The wait between restarts is a fixed 5 seconds. Applies to running containers right away.
Needs services.update on the service (a grant on its project covers it). Available to MCP clients and the assistant.
seylo_session<token>application/json- body
serviceId*stringPanel-issued id.
^[a-z0-9]{16}$restart*booleanOff = stay stopped after the first crash.
stopAfterCrashes*integer0 <= value <= 1000Success.
application/json- response
crashPolicy*restartDelaySeconds*integer0 <= valuecurl -X POST 'https://example.com/api/v1/services.setCrashPolicy' \ -H 'Content-Type: application/json' \ -d '{ "serviceId": "string", "restart": true, "stopAfterCrashes": 0}'{ "crashPolicy": { "restart": true, "stopAfterCrashes": 0 }, "restartDelaySeconds": 0}Restart a service POST
Restarts the running containers of a service without deploying: same version, same settings. Use deployments.deploy to apply changed settings. Needs `services.control` on the service (a grant on its project covers it). Available to MCP clients and the assistant.
Set a service's health check and deploy strategy POST
Sets the custom health check (null = TCP on the first port) and how deploys roll out: rolling (zero downtime, health gated) or recreate, and how long a new version may take to become healthy. Applies on the next deploy. Needs `services.update` on the service (a grant on its project covers it). Available to MCP clients and the assistant.