Skip to content

Query timeseries

1. Prepare query input

The input is equal for timestep and timeseries queries.

2. Execute query

POST /api/md/dataset/{id}/query-timeseries
POST /api/md/dataset/{id}/binary-query-timeseries
IMultidimensionalClient _mdClient ;// see SDK how to get the client

//with default options
var result = await _mdClient.QueryTimeseries(projectId, datasetId, queryInput);

//with binary data payload explicit options
var options = new DHI.WaterData.Models.Serialization.MD.BinaryOptions { CoordinatePrecision = 1 };
var result = await _mdClient.QueryTimesteps(projectId, datasetId, queryInput,options);

3. Process result

The result is common for timestep and timeseries queries. See common properties for query result

Specific timeseries result properties:

  • Timesteps : Contains ordered array of timestep values.
  • Datablock.ElementIndex : Index refers to the position in the Result.Elements array.

Binary options

See Binary protocol description.

SDK binary options:

  • CoordinatePrecision : number of decimal places in mesh node coordinates. Set to null to get full double values.
  • IncludeMeshId : Set to false if you don't use the Id value