You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -348,6 +348,20 @@ This script does the following:
348
348
349
349
A development environment for CADT assumes a synced Chia wallet running locally. [Node version manager (nvm)](https://github.com/nvm-sh/nvm) is used to switch node environments quickly. The repo contains a `.nvmrc` file that specifies the node version the CADT is expected to use and developers can do `nvm use` to switch to the version in the `.nvmrc`.
350
350
351
+
### Diagnostics
352
+
353
+
When debugging a local CADT install (wallet not reachable, DataLayer not syncing, network mismatch, low disk space), use the system-wide diagnostics endpoint. It is mounted at the server root, not under `/v1` or `/v2`:
Omit the `x-api-key` header only when `CADT_API_KEY` is not configured. The endpoint returns **403** on read-only observer nodes (`READ_ONLY=true`). It is designed to stay usable while other API routes are blocked by sync checks.
360
+
361
+
Lighter-weight health checks are also available: `GET /health`, `GET /v1/health`, `GET /v2/health`, and `GET /v1/health/wallet` or `GET /v2/health/wallet` for wallet-specific status.
362
+
363
+
See [System endpoints in the V1 RPC guide](docs/cadt_rpc_api.md#system-endpoints) and [System endpoints in the V2 RPC guide](docs/cadt_rpc_api_v2.md#system-endpoints) for request examples and response fields.
364
+
351
365
### Contributing
352
366
353
367
All branches should be created from the `develop` branch and not from `main`. All pull requests should be made against the `develop` branch unless it is a new release. The `develop` branch will be merged into the `main` branch to create a release. Automation in the CI will create the [release](https://github.com/Chia-Network/cadt/releases) and attach the installation files to it automatically whenever code is merged to `main`. Additionally, the changelog will automatically be updated in the `main` branch. Therefore, the `main` branch should always be a representation of the latest released code.
Copy file name to clipboardExpand all lines: docs/cadt_rpc_api.md
+75Lines changed: 75 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,8 +31,83 @@ If using a `CADT_API_KEY` append `--header 'x-api-key: <your-api-key-here>'` to
31
31
32
32
For the V2 API, update and delete requests can only stage mutations for records owned by the home organization. See the V2 API guide for details on `orgUid` ownership and child-record ownership resolution.
33
33
34
+
## System endpoints
35
+
36
+
Several routes are mounted on the server root (not under `/v1` or `/v2`). They are for monitoring and troubleshooting. Unlike most API routes, they are not blocked when the wallet or DataLayer is still syncing or migrations are in progress.
37
+
38
+
| Endpoint | Purpose |
39
+
|----------|---------|
40
+
|`GET /health`| CADT process liveness; includes disk-space summary for the Chia root partition |
41
+
|`GET /v1/health`| V1 API liveness (same disk-space fields as `/health`) |
42
+
|`GET /v2/health`| V2 API liveness (documented in the [V2 RPC guide](/docs/cadt_rpc_api_v2.md#system-endpoints)) |
43
+
|`GET /v1/health/wallet`| V1 wallet sync and pending-transaction summary |
44
+
|`GET /v2/health/wallet`| V2 wallet sync and pending-transaction summary (see V2 guide) |
If `CADT_API_KEY` is set, these endpoints use the same global `x-api-key` check as the rest of the API.
48
+
49
+
<aid="diagnostics"></a>
50
+
### Diagnostics snapshot (`GET /diagnostics`)
51
+
52
+
Returns one JSON object summarizing CADT configuration, Chia wallet/full-node/DataLayer status, DataLayer subscriptions, local Chia processes, and host CPU/memory/disk. Each major subsection may include a `status` of `ok`, `warning`, or `critical`, plus an optional `message` when attention is needed. External calls use per-section timeouts and degrade gracefully when a subsystem is down.
53
+
54
+
-**Not available on read-only nodes:** returns **403** when `READ_ONLY` is `true` for V1 or V2.
55
+
-**Response time:** usually well under a second on a healthy install; individual probes can take up to about 10 seconds each, with a worst-case total near 30 seconds when something is wedged.
56
+
57
+
Request (include the header when an API key is configured):
Copy file name to clipboardExpand all lines: docs/cadt_rpc_api_v2.md
+76-26Lines changed: 76 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,78 @@ The CADT RPC API V2 is exposed by default on port 31310. This document will give
35
35
36
36
If using a `CADT_API_KEY` append `--header 'x-api-key: <your-api-key-here>'` to your `curl` request.
37
37
38
+
## System endpoints
39
+
40
+
Several routes are mounted on the server root (not under `/v1` or `/v2`). They are for monitoring and troubleshooting. Unlike most API routes, they are not blocked when the wallet or DataLayer is still syncing or migrations are in progress.
41
+
42
+
| Endpoint | Purpose |
43
+
|----------|---------|
44
+
|`GET /health`| CADT process liveness; includes disk-space summary for the Chia root partition |
45
+
|`GET /v1/health`| V1 API liveness (same disk-space fields as `/health`) |
46
+
|`GET /v2/health`| V2 API liveness (same disk-space fields as `/health`) |
47
+
|`GET /v1/health/wallet`| V1 wallet sync and pending-transaction summary |
48
+
|`GET /v2/health/wallet`| V2 wallet sync and pending-transaction summary |
If `CADT_API_KEY` is set, these endpoints use the same global `x-api-key` check as the rest of the API.
52
+
53
+
<aid="diagnostics"></a>
54
+
### Diagnostics snapshot (`GET /diagnostics`)
55
+
56
+
Returns one JSON object summarizing CADT configuration, Chia wallet/full-node/DataLayer status, DataLayer subscriptions, local Chia processes, and host CPU/memory/disk. Each major subsection may include a `status` of `ok`, `warning`, or `critical`, plus an optional `message` when attention is needed. External calls use per-section timeouts and degrade gracefully when a subsystem is down.
57
+
58
+
-**Not available on read-only nodes:** returns **403** when `READ_ONLY` is `true` for V1 or V2.
59
+
-**Response time:** usually well under a second on a healthy install; individual probes can take up to about 10 seconds each, with a worst-case total near 30 seconds when something is wedged.
60
+
61
+
Request (include the header when an API key is configured):
0 commit comments