rankBy

Sorts the records of a latest request by a field and returns the top results.

Applies to: latest (API version 2 only)

Value: the name of a numeric or date field on the entity that you are entitled to. Array and nested object fields are not supported.

rankBy replaces sortBy, which was provided in API version 1. It is only allowed in API version 2.

https://api-qa.ihsmarkit.com/v2/namespace/Entity/latest?rankBy=price&limit=10
https://api-qa.ihsmarkit.com/v2/namespace/Entity/latest?rankBy=price&descending=true&limit=10

Ordering and limits

  • Results are sorted in ascending order by default. Combine rankBy with descending=true to return the highest values first.
  • The number of returned records is controlled by limit. When limit is omitted, the default is 10. The maximum is 1,000, or the maximum of your account if lower.

Paging

Pagination with after is not supported with rankBy, and responses do not include an after value. This avoids the high cost of sorting across pages.

Restrictions

  • rankBy cannot be combined with after, groupBy, modulus, part or sortBy.
  • The parameter requires aggregation to be enabled on your account; otherwise the request is refused with the error NOT_ENTITLED.