
wr6z2 (wr6z2) asked a question.
How do I get Okta to return a sorted API response?
I need Okta to return the result set of `/api/v1/apps/{{appId}}/users` ordered by the created field. I see that I can filter: https://developer.okta.com/docs/reference/api/events/*filters. But how do I sort?

Hello Rayhan,
The sortBy query will work for search queries only when listing users.
For example:
curl -v -X GET \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: SSWS xxx" \
"https://yourorghere.okta.com/api/v1/users?sortBy=created"
If you encounter any issues with the above query I would recommend raising a ticket with support so we may troubleshoot further.
More information can be found here
Thanks!