Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add count as accepted parameter to all iterable responses #222

Open
jesusgn90 opened this issue Oct 25, 2018 · 0 comments
Open

Add count as accepted parameter to all iterable responses #222

jesusgn90 opened this issue Oct 25, 2018 · 0 comments

Comments

@jesusgn90
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant