RustMinerSystem

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 without logging into the administration UI. 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 custom API header for both management calls and do not log in. The frontend consumes:

{
  "ob": 1,
  "token": "<Observer token>"
}

Observer authentication

The public page does not send backend Authorization. It sends:

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 backend worker-list shape and contains workers, total, and stat.

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-TOKEN through the reverse proxy, but redact it from access logs.
  • An Observer token is not a backend token and cannot modify ports or wallets.