Skip to main content
Users
CloudPortalLogin
  • Powered byPowered by
Developing with Sitecore CDP
Data privacy
Before you start sending data
Integrating with Sitecore CDP
Stream API
Batch API
REST APIs
Data lake export service
  • Sitecore CDP for developers
  • REST APIs
  • Using a collection resource
  • Sorting search results

Sorting search results

You can sort search results by specifying a sort query parameter and a corresponding sort value (ASC or DESC case sensitive) on a collection resource URL. The example cURL call returns all someCollection resources ordered by the following:

  • The someCollection resource createdAt date sorted ascending (case insensitive).

  • The someCollection resource label sorted descending (case insensitive).

Sorting search results in someCollection resources:

RequestResponse
curl -X GET '<baseURL>/v2/someCollection?sort=createdAt::ASC|label::DESC'

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2025 Sitecore