feat: add device listing API v2 endpoints#25
Open
mukama wants to merge 3 commits intotetherto:developfrom
Open
feat: add device listing API v2 endpoints#25mukama wants to merge 3 commits intotetherto:developfrom
mukama wants to merge 3 commits intotetherto:developfrom
Conversation
Resolve conflicts in constants.js and server/index.js to include both device listing and alerts endpoints.
tekwani
reviewed
Mar 4, 2026
…points Address PR review: use requestRpcMapAllPages to fetch all items beyond the default 100-item RPC limit, and pass DEVICE_LIST_FIELDS projection to reduce response size when status=1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GET /auth/miners|containers|cabinetsAPI v2 endpoints replacing frontendlist-thingsqueries with dedicated REST APIslist-thingsqueries with server-side filtering, search, pagination, and field projectionEndpoints
GET /auth/miners — list miners via
listThingsRPC witht-minertagGET /auth/miners?filter={"type":"miner-am-s19xp"}&search=7EB&sort={"id":-1}&fields={"id":1,"type":1}&offset=0&limit=10&overwriteCache=trueOptional: filter, sort, fields, search, offset, limit, overwriteCache
Response:
{ miners: [...], total }GET /auth/containers — list containers via
listThingsRPC witht-containertagGET /auth/containers?filter={"type":"container-bd-d40-s19xp"}&search=2618&sort={"id":-1}&fields={"id":1,"type":1}&offset=0&limit=10&overwriteCache=trueOptional: filter, sort, fields, search, offset, limit, overwriteCache
Response:
{ containers: [...], total }GET /auth/cabinets — list cabinets (grouped powermeters + temp sensors) via
listThingsRPCGET /auth/cabinets?filter={"id":"lv3_pm6"}&sort={"id":-1}&offset=0&limit=10&overwriteCache=trueOptional: filter, sort, offset, limit, overwriteCache
Response:
{ cabinets: [{ id, devices: [...], type }], total }GET /auth/cabinets/:id — single cabinet by ID
GET /auth/cabinets/lv3_pm6Response:
{ cabinet: { id, devices: [...], type } }or 404