get https://api.eratos.com/api/workspace/v1/subset
Beta Feature: The subset endpoint is currently in beta testing, the API query parameters and response formats are subject to change. If you have any feedback please contact us through our support portal.
Subset a gridded dataset within a bounding box of latitude and longitude coordinates along the time axis for a given variable or variables
- If no variables are provided, all variables in the dataset will be returned. To obtain a list of variables in the dataset, see the
/resources/:rid
endpoint. - Results are returned in natural order by default, however, the
direction
parameter can be used to reverse the order of the results - Limits and offsets can be used to paginate the results (default limit is 10 and max limit is 10000)
- Results can be returned in different formats based on the Accept header (application/json, image/tiff, application/vnd.eratos.json)
Constraints:
- Only resources of type
ern:e-pn.io:schema:block
orern:e-pn.io:schema:dataset
are supported and must offer a gridded interface. - The dataset resource must have a recognised time property to subset on. Supported property names are ['time']
- The dataset resource must have recognised
latitude
andlongitude
properties to subset on. Supported property names are ['lat', 'latitude', 'Latitude'] and ['lon', 'longitude', 'Longitude'] - The
start
date must be before theend
date if both are provided and in ISO8601 format - The bounding box coordinates must be within valid ranges: latitude between
-90
and90
degrees, longitude between-180
and180
degrees - The bounding box must be specified in the order of
minLongitude,minLatitude,maxLongitude,maxLatitude
- Only 3-dimensional datasets are supported
- The dimensional selection must not exceed 10000 cells
- When requesting image/tiff format, only one variable can be specified
Returns:
- A spatiotemporal subset within the specified bounding box with the requested variables
- Format depends on the Accept header
- JSON by default (application/json)
- JSON, no href links (application/vnd.eratos.json)
- GeoTIFF (image/tiff)
Example:
Gets the last 10 results from the dataset from the given coordinates for max_temp
GET /subset?resourceId=eratos.blocks.silo.maxtemperature&bbox=144.95,-37.8,145.05,-37.7&variable=max_temp&limit=10&skip=0&direction=-1