2isprime
2isprime•13mo ago

Search Sorting order is not working for Organizations

Hello, I am using an endpoint : https://zitadel.com/docs/apis/resources/admin/admin-service-list-orgs to get the list of organizations, although there is an issue with the sorting order. the sorting is not working for this API , on passing "asc": true and "asc": false The result are always sorted in ascending manner that is asc: true Can you please confirm if this is a bug?
ZITADEL Docs
Returns a list of organizations that match the requesting filters. All filters are applied with an AND condition.
6 Replies
2isprime
2isprimeOP•13mo ago
Is it because, we are only allowed to sort on specific fields? sortingColumn the field the result is sorted (string) Possible values: [ORG_FIELD_NAME_UNSPECIFIED, ORG_FIELD_NAME_NAME] Default value: ORG_FIELD_NAME_UNSPECIFIED Is there a way to sort of creation date?
Unknown User
Unknown User•13mo ago
Message Not Public
Sign In & Join Server To View
2isprime
2isprimeOP•13mo ago
@fabienne , Awaiting a response on this 🙂
fabienne
fabienne•13mo ago
I quickly tested it, if you do send the sorting column, and asc then it works you need to define the sorting column at the moment it is not possible to sort by creation date
2isprime
2isprimeOP•13mo ago
Thanks @fabienne . If the sortingColumn value is set to ORG_FIELD_NAME_UNSPECIFIED and sort is asc, then in that case the default\ behaviour is on the basis of creation date right? Would like to have your confirmation on this to implement the sorting on our side.
fabienne
fabienne•13mo ago
from what i can see it doesn't work if the sort is set to unspecified, at the moment it is only possible to sort by the name ORG_FIELD_NAME_NAME

Did you find this page helpful?