Hello! I found the bug described below on endpoint /api/v2/organizations/{id}/invitations of Management API.
The bug: totals is not returned in the response when requested via https://xxx.auth0.com/api/v2/organizations/{id}/invitations?include_totals=true
Thanks!
Hi @henrique,
Welcome to the Auth0 Community!
When I make the request with include_totals=true I see:
{
"invitations": [
{...},
{...}
],
"start": 0,
"limit": 2
}
With include_totals=false:
[
{...},
{...}
]
Is that not what you are expecting?
Thank you, Dan! Nice to meet you. About the bug, actually the expected return would be something like:
{
"invitations": [
{...},
{...}
],
"start": 0,
"limit": 2,
"total": 2
}
start and limit are related with params page and per_page respectively. total is a different information. For example, if I set page to 0, per_page to 3 and I have 5 invitations the expected result would be
{
"invitations": [
{...},
{...},
{...}
],
"start": 0,
"limit": 3,
"total": 5
}
As I understand it, the return of this call would be something similar to calls https://xxx.auth0.com/api/v2/users?include_totals=true or https://xxx.auth0.com/api/v2/organizations?include_totals=true.
Thanks for providing the extra context.
I see what you mean, there is certainly some inconsistency there. I’ll submit the bug report and update here when it is resolved. Thanks for helping us improve 