Replies: 1 comment
-
|
this feature already exists in the source code, the reason it gets ignored it because you have to enable it within the config.json you set the BUT we plan to redo the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Feature Request: Server-side pagination for
nodesaction via WebSocketSummary
When fetching devices programmatically via the WebSocket API using
action: 'nodes', the server always returns all devices at once. Theskipandlimitfields sent in the payload are silently ignored, andmsg.skip,msg.limit, andmsg.totalcountin the response are alwaysundefined.This makes it impractical to build integrations for large MeshCentral deployments (thousands of nodes), since every request loads the full dataset into memory on both the server and the client.
Current Behavior
Sending the following payload:
{ "action": "nodes", "skip": 100, "limit": 50, "responseid": "my-request-id" }Always returns all nodes regardless of
skipandlimit. The response never includestotalcount,skip, orlimitfields.Expected Behavior
The server should honor
skipandlimitin thenodesaction payload and return a paginated response:{ "action": "nodes", "skip": 100, "limit": 50, "totalcount": 1500, "nodes": { ... } }This would allow external scripts and integrations to iterate through devices page by page without loading everything at once.
What I investigated
skip/limitin payload — ignored by the server.maxDeviceViewin config.json — limits the first response, but does not expose a way to request subsequent pages via script. There is no documented WebSocket action to fetch the next block programmatically.maxDeviceViewpagination appears to be designed for the web UI only, not for external API consumers.Use Case
I'm building a Node.js integration that periodically syncs MeshCentral devices with an external system. With ~1,000+ nodes, fetching everything on every sync is inefficient and puts unnecessary load on the server.
Server-side pagination via WebSocket would allow scripts to:
totalcountto know how many pages to expectProposed API (suggestion)
Extend the existing
nodesaction to optionally acceptskipandlimit:If
skip/limitare absent, the current behavior (return all) would be preserved for backward compatibility.Environment
Thank you for considering this. Happy to discuss or help test if needed!
Beta Was this translation helpful? Give feedback.
All reactions