Get your free beta license ↗
API operation · services group
PATCH

/services/{name}

First published 14 Oct 20260.2.0Unchanged since publication

Configure monitoring and startup at boot for a daemon

Who may call it
AdministratorResellerCustomer
Token scope, any of
settingsall
Answers200 OK

Supply at least one setting for an installed daemon. UrbeStack applies the supplied settings together. The watched field controls whether the monitor watches the daemon. UrbeStack always watches its own daemons.

The rounds field sets how many consecutive rounds without an answer trigger a restart, from 1 to 10. The timeout field sets the health check timeout, from 1 to 30 seconds. Set depth to answer for a service-specific health check or process to check only whether the process is running.

Set at_boot to true to enable startup at boot without starting the daemon now. If the daemon already starts at boot, UrbeStack rejects the request and discards any monitoring settings supplied with it. A false value for at_boot has no effect.

Invalid name syntax, invalid rounds, timeout, or depth values, and requests without an applicable setting return HTTP 400.

As a command

Run as root on the server

Parameters

namepath ·string, matching ^[a-z][a-z0-9.-]{0,39}$Required
UrbeStack daemon name returned by GET /services, such as postfix, php-8.3, panel-web, or mariadb.

Request body

JSON ·ServiceSettings· 5 fields
at_bootboolean
depthstring, one of answer, process
roundsinteger, 1 to 10
timeoutinteger, 1 to 30
watchedboolean

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X PATCH "$API/services/alice" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "at_boot": true,
    "depth": "answer",
    "rounds": 1,
    "timeout": 1,
    "watched": true
  }'
Response · 200 OK
{
  "daemon": {
    "at_boot": true,
    "check": {
      "ok": true,
      "words": "text"
    },
    "checked_by": "text",
    "cuts": "text",
    "depth": "answer",
    "falls_30d": 1,
    "group": "Panel",
    "guard": 1,
    "has_log": true,
    "installed": true,
    "last_check_at": "text",
    "last_check_words": "text",
    "last_restart_at": "text",
    "may_disable": true,
    "may_stop": true,
    "name": "alice",
    "need": "text",
    "pid": 1,
    "role": "user",
    "rounds": 1,
    "since": "text",
    "state": "up",
    "stopped_at": "text",
    "stopped_by": "text",
    "stopped_from": "text",
    "systemd_restarts": 1,
    "timeout": 1,
    "unit": "text",
    "version": "0.0.1",
    "watched": true
  }
}

Errors

13 errors, each a status and a sentence
400--name is required
400--watched is on or off
400<name> already starts at boot
400<name> is not installed on this server
400A daemon is named with letters, digits, dots and hyphens
400Invalid boolean
400Nothing to set: give --watched, --rounds, --timeout, --depth or --at-boot
400The check waits
400The depth is answer (a service-specific health check) or process (process only)
400The panel's own daemons are always watched
400The rounds without an answer before a restart are
400body needs one of watched, rounds, timeout, depth, at_boot
401Authentication required
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.2.0 on 14 Oct 2026.
urbestack.com/docs/api/patch-services-name/