Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
PersonalizeCloud Portal
Sitecore Personalize developer documentation
  • Developing with Sitecore Personalize
    • Base URL
        • Searching in a collection
        • Sorting search results
        • Paginating responses
    • Response codes
  1. Using a collection resource
  1. Sitecore Personalize developer documentation
  2. REST APIs

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:

curl -X GET '<baseURL>/v2/someCollection?sort=createdAt::ASC|label::DESC'
If you have suggestions for improving this article, let us know!

© Copyright , Sitecore A/S or a Sitecore affiliated company.
All rights reserved.

Privacy policySitecore Trust CenterTerms of use
PersonalizeCloud Portal