How can I sort invites to an organization using management api?

In the documentation for the Auth0 Management API, it states that the endpoint “GET /api/v2/organizations/{id}/invitations” should accept a sort-parameter as a string with the format “field:order”. But when I try this by sorting on any field other than “created_at” it gives me the following error:
“auth0.exceptions.Auth0Error: 400: Query validation error: ‘String does not match pattern ^((created_at)):(1|-1)$: expires_at:1’ on property sort (Field to sort by. Use field:order where order is 1 for ascending and -1 for descending Defaults to created_at:-1).”

There is definately a field called expires_at, so that’s not the issue. But it seems the API does not support sorting on other fields than created_at, despite of what the documentation says. Can anybody enlighted me on this? Thanks!

Hi @erik.olausson

Welcome to the Auth0 Community!

I’m sorry for not responding to you earlier, I’ve opened a ticket for our engineering team to check this report.

Thank you for sharing!
Dawid

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.