WebApp
Web Apps

Check a web app now and report what is wrong.

Changed on

This function checks one web application now and reports what is wrong with it, the evidence for that, and what would repair it.

This is the escalation path from list. list reports what the scheduled health check last found, so it is at most one check interval old; this function runs the check live.

It is read-only. It makes no start, stop, restart or redeploy call, and it rewrites no reverse-proxy configuration, even when the action it reports recommends one.

It records what it found as the application's health, so a subsequent list reports this verdict rather than the older one. It does not add to the application's incident history: that history is the scheduled check's record of what it found, and this function can be called at will.

get/WebApp/diagnose

Request

  • Base URL
    https://cpanel-server.tld:2083/execute
  • Auth
    HTTP basic

Query parameters

namestring required
Example:my-app

The application's unique name (slug).

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "diagnose",
  "module": "WebApp",
  "result": {
    "data": {
      "action": "restart",
      "cause": "out_of_memory",
      "checked_at": "2026-09-15T14:03:22.000Z",
      "detail": {
        "limit_bytes": 536870912,
        "oom_kills": 1,
        "peak_bytes": 536870912
      },
      "domain": "my-app.example.com",
      "evidence": {
        "container": {
          "exit_code": 137,
          "host_port": 49001,
          "oom_killed": true,
          "state": "running"
        },
        "loopback": 1,
        "memory": {
          "limit_bytes": 536870912,
          "oom_kills": 1,
          "peak_bytes": 186912768
        },
        "probe": {
          "status": "unhealthy"
        },
        "proxy": {
          "published_port": 49001,
          "wired_port": 49001,
          "wiring_known": 1
        },
        "public": {
          "error": "Could not resolve host: my-app.example.com",
          "ok": true,
          "responded": true,
          "status": 503
        },
        "three_way": "app",
        "unit": {
          "active": "failed",
          "exit_status": 137,
          "loaded": true,
          "restarts": 3,
          "result": "exit-code",
          "sub_state": "failed"
        }
      },
      "health": {
        "action": "restart",
        "cause": "out_of_memory",
        "checked_at": "2026-06-12T14:03:22.000Z",
        "healthy_at": "2026-06-12T13:58:04.000Z",
        "incidents": 3,
        "memory": {
          "limit_bytes": 536870912,
          "oom_kills": 1,
          "peak_bytes": 186912768
        },
        "oom_incidents": 3,
        "restarts": 3,
        "state": "recovering"
      },
      "name": "my-app",
      "state": "recovering",
      "url": "https://my-app.example.com"
    },
    "status": 1
  }
}

Changes