New features of RESTO API on CREODIAS

../_images/button_orange_cf24.png

Exact count

A new parameter, exactCount, allows to get exact count of products returned by a query. It can be enabled in any RESTO API query by adding “&exactCount=1” at the end of a query.

This parameter takes only two values: 0 (disabled) or 1 (enabled). By default, this function is disabled for quicker responses and better API performance and the returned count is estimated. For example, to get the exact count of Sentinel-2 L1C products from relative orbit number 50, it is necessary to add to the original query

(https://finder.creodias.eu/resto/api/collections/Sentinel2/search.json?maxRecords=10&processingLevel=LEVEL1C&relativeOrbitNumber=50&sortParam=startDate&sortOrder=descending&status=all&dataset=ESA-DATASET)

parameter exactCount=1:

https://finder.creodias.eu/resto/api/collections/Sentinel2/search.json?maxRecords=10&processingLevel=LEVEL1C&relativeOrbitNumber=50&sortParam=startDate&sortOrder=descending&status=all&dataset=ESA-DATASET&exactCount=1

Note

Processing a query with the exact count parameter takes longer than the same query which count is estimated. It is not recommended to use this feature if it isn’t needed.

Relative orbit number as interval

Relative orbit number now also supports interval values. It is possible to search products from relative orbit numbers from a given range.

  • relativeOrbitNumber=[50,60] - orbits from 50 inclusive to 60 inclusive

  • relativeOrbitNumber=]50,60[ - orbits from 50 to 60

  • relativeOrbitNumber=[50,60[ - orbits from 50 inclusive to 60

  • relativeOrbitNumber=[50 - orbits from 50 inclusive

  • relativeOrbitNumber=]50 - orbits from 50

  • relativeOrbitNumber=60] - orbits to 60 inclusive

  • relativeOrbitNumber=60] - orbits to 60 inclusive

  • relativeOrbitNumber=60[ - orbits to 60

For example:

https://finder.creodias.eu/resto/api/collections/Sentinel2/search.json?maxRecords=10&processingLevel=LEVEL1C&relativeOrbitNumber=]50,60[&sortParam=startDate&sortOrder=descending&status=all&dataset=ESA-DATASET

The feature of searching only one value (relativeOrbitNumber=50) is still supported.