wazuh-api
wazuh-api copied to clipboard
Add count as accepted parameter to all iterable responses
Hi team,
Any API call which returns a list such /rules
or /agents
or /groups
or whatever should have a new parameter named count
. It should return the total number of things from that API call.
We may want to preserve the response structure, returning such always but the items array should be empty this time. What I meant is something like this:
GET /rules?count
{
"items": [ ],
"totalItems": 1230
}
GET /rules
{
"items": [ rule1, rule2, rule3, rule4...],
"totalItems": 1230
}
Regards!