Skip to content

Feat: add pool manager endpoints#10

Open
mukama wants to merge 3 commits intotetherto:developfrom
mukama:feature/pool-manager-v2
Open

Feat: add pool manager endpoints#10
mukama wants to merge 3 commits intotetherto:developfrom
mukama:feature/pool-manager-v2

Conversation

@mukama
Copy link
Contributor

@mukama mukama commented Feb 13, 2026

Summary

  • Add pool manager endpoints for stats, pools, miners, units, alerts, pool assignment, and power mode control
  • Uses getWrkExtData with minerpool type for pool stats (matching /auth/pools pattern)
  • Uses listThings for miner/unit/alert data with proper thing structure mapping
  • Routes use createCachedAuthRoute/createAuthRoute helpers, no region filtering

Endpoints

Read (GET, cached)

  • GET /auth/pool-manager/stats — aggregated pool stats (totalPools, totalWorkers, activeWorkers, totalHashrate, totalBalance, errors)
  • GET /auth/pool-manager/pools — pool configs with hashrate, worker counts, balances, yearly history
  • GET /auth/pool-manager/miners — paginated miner list with search/model filters
  • GET /auth/pool-manager/units — containers grouped with miner counts and nominal hashrate
  • GET /auth/pool-manager/alerts — pool-related alerts with severity levels

Write (POST, requires pool_manager:rw)

  • POST /auth/pool-manager/miners/assign — assign pool config to miners via applyThings
  • POST /auth/pool-manager/miners/power-mode — set power mode (low/normal/high/sleep)

Example Queries

Pool stats:

/auth/pool-manager/stats

Pool configs:

/auth/pool-manager/pools

Miners with pagination and search:

/auth/pool-manager/miners?limit=10&page=1&search=S19XP

Filter miners by model:

/auth/pool-manager/miners?model=whatsminer

Units (containers):

/auth/pool-manager/units

Alerts:

/auth/pool-manager/alerts?limit=20

@mukama mukama changed the base branch from main to develop February 13, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant