Documentation
Observer Read-Only API
RustMinerSystem Observer enable/disable, token, currency, worker, chart, and log read-only endpoints.
Observer Read-Only API
Observer mode lets users query worker data by wallet or subaccount. It uses a separate token and exposes only the read operations implemented by the Observer frontend.
Manage Observer mode
| Method | Path | Purpose |
|---|---|---|
| GET | /api/ob |
Read Observer state and token. |
| POST | /api/ob/{flag} |
Enable or disable Observer; flag is 1 or 0. |
External callers use the general X-ACCESS-TOKEN header for both management calls. The frontend consumes:
{
"ob": 1,
"token": "<Observer token>"
}
Observer authentication
The public page sends the dedicated Observer header:
X-OB-TOKEN: <Observer token>
The UI can import the token from a token or ob URL query and store it in browser local storage. Third-party clients should inject the header from protected configuration instead of keeping the credential in a URL.
Available calls
| Method | Path | Purpose |
|---|---|---|
| GET | /api/currency/config |
Read available currencies. |
| GET | /api/d/{coin}/g/workers |
Query workers by coin and wallet/subaccount. |
| GET | /api/stat/worker/{id} |
Read a worker’s hashrate chart. |
| GET | /api/group/{gid}/log |
Read worker connection logs. |
| GET | /api/worker/{id}/error/log |
Read the worker failure stream. |
Query workers
GET /api/d/BTC/g/workers?device=0&size=50&page=1&col=s_thh&desc=1&wallet=wallet-name
X-OB-TOKEN: <Observer token>
| Parameter | Meaning |
|---|---|
coin |
URL-encoded backend currency code. |
wallet |
Wallet/subaccount; separate multiple values with commas. |
device |
Worker-state filter. |
size / page |
Pagination. |
col / desc |
Sort field and direction. |
The response matches the management worker-list shape and contains workers, stat, pages, total, page, and size. Complete workers[], stat, sid, and gid fields are documented in the worker-list response model.
| Input | Source |
|---|---|
{coin} |
A key or name from GET /api/currency/config. |
wallet |
User wallet/subaccount; join multiple values with commas and URL-encode them. |
Chart {id} |
`workers[].sid |
Log {gid} |
workers[].gid. |
Failure {id} |
`workers[].id |
The worker chart returns ChartPoint[], the group log returns { t, f, d? }[], and the failure endpoint preserves its raw response.
Security boundary
- If the token leaks, disable and re-enable Observer mode to rotate it.
- Share Observer links only with trusted users.
- Allow
X-OB-TOKENthrough the reverse proxy, but redact it from access logs. - An Observer token is not a backend token and cannot modify ports or wallets.
