Update DigitalDelta-v2-proposal.raml

Update DigitalDelta-v2-proposal.raml

Added biotaxon to timeseries samples, fixed RAML syntax issues.

#%RAML 1.0
title: Digital Delta API
version: 2.0
securitySchemes:
  basic:
    type: Basic Authentication
baseUri: http://digitaldeltatest.aquadesk.nl
mediaType: [ application/json ]
description: Digital Delta API
documentation:
 - title: Introduction
   content: The Digital Delta is a distributed network in which various datasources exchange information using a standard interface.
     This specification outlines the mechanics of the Digital Delta as a distributed network of nodes and masternodes and describes the technical specification of the Digital Delta web API.

     This document uses the RAML standard as the definition language.

 - title: The API specification
   content:
     The API specification consists of two parts.

The Types section describes the data types that are available for the resources. Please refer to figure 1 below for the resource object diagram.

Note: Currently, the generated HTML documentation does not contain tables that describe the data types. However, their content can be seen in the response tabs of the requests. If you want to have a detailed look at the type definitions, open the RAML file and go to the “# Base types.” section.

The Resources section describes the available end-points.

Figure 1

The Digital Delta uses uuids (universally unique identifier, version 4) for identification of resource objects.

     The use of uuids guarantees a unique identifier for an instance over all nodes in the Digital Delta without the need for individual nodes to have a knowledge about data in other nodes.

     There is a code attribute as well that can be used by suppliers for their internal identifiers.

     The Digital Delta supports timeseries data, defined as a measurement series with a begin and end time, a fixed location and a parameter.

     The list of objects is setup to be extendable to other data types, such as raster or vector data.

     The protocols provides by the services are HTTP and HTTPS. Currently authentication is Anonymous.

     The Digital Delta only supports JSON as the output format and for POST request bodies.

 - title: The RAML standard and Universal unique identifiers
   content:
     The RAML specification currently doesn't know the type uuid (Universal unique identifiers). To have a structure in the definition to allow working with uuids, the Digital Delta specification uses a strong with a specific regular expression pattern.
     The base pattern is: [0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}.
 - title: About the examples in this document
   content:
    The examples in the requests are based on based on the AquaDesk implementation of the Digital Delta specifications. The structure, however, for all gets, posts and responses will be the same for all providers.
 - title: Future enhancements
   content:
     The following future enhancements are under consideration.

Search endpoint (full-text search)

Authentication/Authorisation

Error and warning codes

OPTION request, explaining how the service works

 - title: Future research
   content:
     The following topics are considered Future research

Attributes for different standards

Support for multiple data types

Additional output formats

Basic calculations on timeseries data

 - title: Document history
   content:

        Date
        Author
        Changes

         2017-05-06
        Geri Wolters

Texts from the original document added. Texts corrected and updated.

Introduction of samples.

Changed properties previous and next to return string? instead of string.

Changed properties events from timeseries to return an array or nil, as the values can be null.

          </ul

         2017-05-30
        Geri Wolters

Added resource object diagram.

          </ul

         2017-06-13
        Geri Wolters

Unified naming of fields and parameters.

TimeSeries field 'code' is replaced by 'qualifier'. 'qualifier' is optional and filterable.

HTTP Status code 204 (NoContent) is introduced for list-requests. This value should be returned instead of an empty list.

          </ul

         2017-06-26
        Geri Wolters

Changed error responses from 404 to 400.

          </ul

        2017-07-14
        Geri Wolters / Stef Hummel

BioTaxon blocks added.

SamplingProcess block added.

ObservationProcess block added.

Removal of 'Extras'. Specific features should be coded into specific domain extensions, like BioTaxon does.

          </ul

        2017-07-17
        Geri Wolters

BioTaxon blocks added to timeseries examples.

          </ul

protocols:
  - HTTP
  - HTTPS

# Base types.
types:
  Double:
    description: A value of type Double (float).
    type: number
    format: double

  KeyValuePair:
    description: A combination of key and value.
    properties:
      key:
        type: string
        description: The key of the key/value pair.
        example: taxontype
      value:
        type: string
        description: The value of the key/value pair.

  Geometry:
    description: A geometry in GeoJSON format. Digital Delta currently only supports the Point type.
    properties:
      type:
        description: The geometry type. Must have the value "Point".
        type: string
        example: "Point"
      coordinates:
        type: Double[]
        description: An array of doubles, representing a coordinate.
        example: [ 4.234, 52.3423 ]

  ObservationTypeBioTaxon:
    description: Specific fields for biological taxa at observationtype level.
    required: false
    properties:
      type:
        description: Aquo-standard code of the taxonomic group of the taxon.The type is required.

          Qualifiers: Nullable, Filterable, Searchable.
        type: string
        example: FYTPT
        required: true
      group:
        description: Aquo-standard code of the taxonomic subgroup of the taxon. The group is optional.

          Qualifiers: Nullable, Filterable, Searchable.
        type: string
        example: CRYPT
      author:
        description: TWN-standard notation of the author of the taxon.Nullable, Filterable, Searchable.
        type: string
        example: L.
        required: false
      reference:
        description: TWN-standard literature reference.Nullable, Filterable, Searchable.
        type: string
        example: I012
        required: false
      basionym:
        description: Original name of the taxon.Nullable, Filterable, Searchable.
        type: string
        example: Abies Alba
        required: false
      parent:
        description: The hierarchical 'parent' of the taxon in its taxonimic tree.Nullable, Filterable, Searchable.
        type: string
        example: Abies
        required: false
      taxonCode:
        description: TWN-standard numeric code of the taxon. Nullable, Filterable, Searchable.
        type: number
        format: int64
        required: false
      gbifId:
        description: Taxon identifier according to the Global Biodiversity Information Facility code. Nullable, Filterable, Searchable.
        type: number
        format: int64
        required: false

  TimeSeriesBioTaxon:
    description: Specific fields for biological taxa at timeseries level.
    properties:
      lifeStage:
        description: Aquo-standard code for life stage of the observed taxa. (Levensstadium, LS)

          Qualifiers: Nullable, Filterable, Searchable.
        required: false
        type: string
        example: LS-AD
      livingForm:
        description: Aquo-standard living form of the observed taxa. (Leefvorm, LV)

          Qualifiers: Nullable, Filterable, Searchable.
        required: false
        type: string
        example: LV-CEL
      gender:
        description: Aquo-standard gender of the observed taxa. (Geslacht, GE)

          Qualifiers: Nullable, Filterable, Searchable.
        required: false
        type: string
        example: GE-X
      appearance:
        description: Aquo-standard appearance form of the observed taxa. (Verschijningsvorm, VV)

          Qualifiers: Nullable, Filterable, Searchable.
        required: false
        type: string
        example: VV-G
      substrate:
        description: Aqu-standard substrate the observed taxa was found in.

          Qualifiers: Nullable, Filterable, Searchable.
        required: false
        type: string
        example: RIET
      fytoplanktonLengthClass:
        description: Aquo-standard length class of the fytoplankton taxon.Nullable, Filterable, Searchable.
        type: string
        required: false
      fishLengthClass:
        description: Aquo-standard length class of the fish.Nullable, Filterable, Searchable.
        type: string
        required: false
      behaviour:
        description: Aquo-standard behaviour code for the taxon.Nullable, Filterable, Searchable.
        type: string
        required: false
      energySource:
        description: Aquo-standard energy source code of the taxon.Nullable, Filterable, Searchable.
        type: string
        required: false
      temperature:
        description: Aquo-standard temperature specification of the measurement conditions of the taxon.Nullable, Filterable, Searchable.
        type: string
        required: false
      period:
        description: Aquo-standard period of the measurment/analysis/sample preparation condition of the taxon.Nullable, Filterable, Searchable.
        type: string
        required: false

  SamplingProcess:
    description: Contains properties specific to the sampling process.
    properties:
      samplingMethod:
        description: Aquo-standard code, describing the method used to take the sample.

          Qualifiers: Nullable, Filterable, Searchable.
        required: false
        type: string
        example: HH-W10A:2010
      samplingProcessingMethod:
        description: Aquo-standard code, describing the method used to treat the sample in order to determining its value.

          Qualifiers: Nullable, Filterable, Searchable.
        required: false
        type: string
        example: I15061.01

  ObservationProcess:
    description: Contains properties specific to the observation process.
    properties:
      valuationMethod:
        description: Aquo-standard code, describing the method used to determine its value.

          Qualifiers: Nullable, Filterable, Searchable.
        required: false
        type: string
        example: MED

  Node:
    description: Node objects contain the properties of the data node. A node is an operational implementation of the Digital Delta specification.
    type: object
    properties:
      uuid:
        type: string
        required: true
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
        description: The unique identifier of the node. UUID Version 4.

          Qualifiers: Nullable, Filterable, Searchable.
        example: 978fdf5c-95c8-43a5-82ff-d27d9e6d685f
      name:
        type: string
        required: true
        description: The name of the node.

          Qualifiers: Nullable, Filterable, Searchable.
      description:
        type: string
        required: true
        description: The description of the node.

          Qualifiers: Nullable, Filterable, Searchable.
      baseUrl:
        type: string
        required: true
        description: The base URL of the node.

  Location:
    displayName: Location
    description: A location object contains all information required to describe a location. This version contains a node.
    type: object
    properties:
      uuid:
        type: string
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
        description: The unique identifier for the location. UUID Version 4.

          Qualifiers: Nullable, Filterable, Searchable.
      url:
        type: string
        description: The URL of the location.
      code:
        type: string
        description: The code of the location.

          Qualifiers: Nullable, Filterable, Searchable.
      name:
        type: string
        description: The name of the location..

          Qualifiers: Nullable, Filterable, Searchable.
      geometry:
        type: Geometry
        description: The GeoJSON geometry definition of the location..

          Qualifiers: Nullable, Filterable, Searchable.
      node:
        type: Node
        description: The node of the location..

          Qualifiers: Nullable, Filterable, Searchable.

  Datasource:
    displayName: DataSource
    description: DataSource (“bronhouder” in Dutch) objects describe the source of the data. A node can have multiple data sources.
    type: object
    properties:
      uuid:
        type: string
        required: true
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
        description: The unique identifier for the datasource. UUID Version 4

          Qualifiers: Nullable, Filterable, Searchable.
      name:
        type: string
        required: true
        description: The name of the datasource..

          Qualifiers: Nullable, Filterable, Searchable.
      node:
        type: Node
        required: true
        description: The node of the datasource.

  ObservationType:
    description: The ObservationType objects describe all attributes to correctly interpret what has been measured, and in what way. It is essential to have the quantity field.
    type: object
    properties:
      uuid:
        type: string
        required: true
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
        description: The unique identifier for the observationtype. UUID Version 4.
      quantity:
        type: string
        examples: [ "ZICHT", "MONSTER", "CONCTTE", "AANTL" ]
        required: true
        description: Defines what was measured.
      unit:
        type: string
        examples: [ "cm2", "n", "n/m3", "%", "DIMSLS", "C" ]
        required: true
        description: Unit of measurement. Follows the Aquo standards.
      parameterCode:
        type: string
        required: false
        examples: [ "Pediastrum", "Ca", "1112T4ClC2a", "HYBDVS" ]
        description: Parameter code specifying the observationtype. Non-biological observation types follow the Aquo standards.

          Qualifiers: Nullable, Filterable, Searchable.
      compartment:
        type: string
        required: false
        examples: [ "OW", "DL", "GW", "LW" ]
        description: The compartment in which the measurement took place. Standardised Aquo compartments.

          Qualifiers: Nullable, Filterable, Searchable.
      qualifier:
        type: string
        required: false
        examples: [ "AD", "JU", "T20C", "KO", "BraunBS", "WATSGL", "WATKLM" ]
        description: Dutch: 'Hoedanigheid'. Additional qualities of the measurement.

          Qualifiers: Nullable, Filterable, Searchable.
      observationProcess:
        type: ObservationProcess
        example:
          {
            "valuationMethod": "MED"
          }
        required: false
      bioTaxon?:
        type: ObservationTypeBioTaxon
        description: Specific biotaxon information.
        example:
          {
            "type": "FYTPT",
            "group": "CRYPT"
          }
        required: false

  MinimalEvent:
    displayName: Event (minimal)
    description: Event objects contain the actual value of each observation.
      Each observation contains a timestamp and a value.
    properties:
      value:
        type: number
        required: true
        example: 37.0
        description: The value of the measured data.

          Qualifiers: Nullable, Filterable, Searchable.
      timeStamp:
        type: datetime
        required: false
        example: 2016-12-31T12:45:00Z
        description: The date/time when the measurement took place. Uses the Zulu notation.

  Event:
    type: MinimalEvent
    displayName: Event
    description: Event objects contain the actual value of each observation.
      Each observation contains a timestamp and a value. There is an optional quality parameter and limit symbol.
    properties:
      quality:
        type: string
        required: false
        example: "99"
        description: As specified in Aquo Domain Table 'Kwaliteitsoordeel'. Specifies whether the value is considered normal, abberent, interpolated, etc. and for what reason. .

          Qualifiers: Nullable, Filterable, Searchable.
      limitSymbol:
        type: string
        required: false
        examples: ["<", ">", "="]
        description: The limit symbol supplements the measured value.

          Qualifiers: Nullable, Filterable, Searchable.

  TimeseriesType:
    description: TimeSeriesType objects describe the type of measurement the timeseries contains.
      These can be for example raw measurements, but also aggregations or simulations.
      This information could be needed to correctly interpret the measurement values.
    type: object
    properties:
      code:
        type: string
        required: true
        example: MEAS
        description: The code of the timeseries type.
      name:
        type: string
        required: true
        example: Measurement
        description: The name of the timeseries type.

  Timeseries:
    description: Timeseries objects contain all information needed to interpret timeseries.

      There are references to other objects, such as Node, Location, DataSource, ObservationType and TimeseriesType.

      The TimeseriesType should be added as a reference because it can indicate if a timeseries containts a RAW dataset or makes use of the current measurements.
      The Digital Delta specification of timeseries makes no assumptions on the nature of the series, timeseries may describe any series of data points of the same observation type and datasource in time on one location.

      This includes both equidistant series (fixed time interval between data points) and non-equidistant series (with varying time interval).

Use case:

Imagine a data-source is providing several timeseries for a specific location and observation. For example:

      Waterlevel is measured every 5 minutes for the location Lobith.
      This is the original timeseries from the datasource and we can call it the RAW timeseries or the original timeseries.

      Within the same data-souce, again, waterlevel is measured every 5 minutes for the same location, but this timeseries is a manually or automatically validated timeseries. So in this case we have an original timeseries which is providing the raw data and another timeseries which has been validated. Both timeseries can be required for different purposes.

      Now imagine that someone requires the validated timeseries instead of the original.

      The users should be able to filter them based on this information and retrieve data only for this type of timeseries. There are several more uses cases where more than two types are used. Think of timeseries that are recalculated based on validation, interval, aggregation, etc.

      Using TimeSeriesType is providing more flexibility in providing multiple timeseries for the same location and observation type provided by a single data-source.

    type: object
    properties:
      url:
        type: string
        required: true
      uuid:
        type: string
        required: true
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
        description: The unique identifier for the timeseries. UUID Version 4.

          Qualifiers: Nullable, Filterable, Searchable.
        example: f4af47f5-f087-494c-9b2d-ba129bddd545
      qualifier:
        type: string
        required: false
        description: The qualifier of the timeseries. AquaDesk uses the uuid for this.

          Qualifiers: Nullable, Filterable, Searchable.
        example: H.Meting
      location:
        type: Location
        required: true
        description: The location that the timeseries uses.

          Qualifiers: Nullable, Filterable, Searchable.
      observationType:
        type: ObservationType
        required: true
        description: The observationtype that the timeseries uses.

          Qualifiers: Nullable, Filterable, Searchable.
      node:
        type: Node
        required: true
        description: The node responsible for hosting the data for the timeseries.

          Qualifiers: Nullable, Filterable, Searchable.
      datasource:
        type: Datasource
        required: true
        description: The datasource providing the data for the timeseries..

          Qualifiers: Nullable, Filterable, Searchable.
      timeseriesType:
        type: TimeseriesType
        required: true
        description: The type of the timeseries..

          Qualifiers: Nullable, Filterable, Searchable.
      interval:
        type: number
        required: false
        description: Specifies the interval between measurements for the timeseries.

          Qualifiers: Nullable, Filterable, Searchable.
      valueType:
        type: string
        required: false
        description:  The data type of the measured data.

          Qualifiers: Nullable, Filterable, Searchable.
      start:
        type: datetime
        required: true
        example: 2016-01-01T12:45:00Z
        description:  Start date/time of the measurement. Uses the Zulu notation

          Qualifiers: Nullable, Filterable, Searchable.
      end:
        type: datetime
        required: true
        example: 2016-01-01T12:45:00Z
        description:  End date/time of the measurement. Uses the Zulu notation

          Qualifiers: Nullable, Filterable, Searchable.
      events:
        type: MinimalEvent[]
        description: Defines a minimal event.
        required: false
      samplingProcess:
        type: SamplingProcess
        description: Describes properties used in the sampling process.
        example:
          {
            "samplingMethod": "HH-W10A:2010",
            "samplingProcessingMethod": "I15061.01"
          }
        required: false
      bioTaxon:
        type: TimeSeriesBioTaxon
        description: Specific biotaxon information.
        example:
          {
            "lifeStage": "LS-AD",
            "livingForm": "LV-CEL",
            "gender": "GE-X",
            "appearance": "VV-G",
            "substrate": "RIET"
          }
        required: false

# List responses
  NodeListResponse:
    description: Contains zero or more responses to a Node list request.
    type: object
    properties:
      results:
        type: Node[]
        description: List of Nodes.
      count:
        description: Number of records satisfying the query parameters.
        type: integer
        example: 1123
      previous:
        description: Url to the API holding the previous page. null if the requested page is the first page.
        type: string?
      next:
        description: Url to the API holding the next page. null if the requested page is the last page.
        type: string?
      maxPageSize:
        description: Maximum page size, as allowed by the service.
        type: integer

  DatasourceListResponse:
    description: Contains zero or more responses to a DataSource list request.
    type: object
    properties:
      results:
        type: Datasource[]
        description: List of Datasource.
      count:
        description: Number of records satisfying the query parameters.
        type: integer
        example: 1123
      previous:
        description: Url to the API holding the previous page. null if the requested page is the first page.
        type: string?
      next:
        description: Url to the API holding the next page. null if the requested page is the last page.
        type: string?
      maxPageSize:
        description: Maximum page size, as allowed by the service.
        type: integer

  LocationListResponse:
    description: Contains zero or more responses to a Node list request.
    type: object
    properties:
      results:
        type: Location[]
        description: List of Locations.
      count:
        description: Number of records satisfying the query parameters.
        type: integer
        example: 1123
      previous:
        description: Url to the API holding the previous page. null if the requested page is the first page.
        type: string?
      next:
        description: Url to the API holding the next page. null if the requested page is the last page.
        type: string?
      maxPageSize:
        description: Maximum page size, as allowed by the service.
        type: integer

  ObservationTypeListResponse:
    description: Response for a observation type list request.
    type: object
    properties:
      results:
        type: ObservationType[]
        description: List of observation types.
      count:
        description: Number of records satisfying the query parameters.
        type: integer
        example: 1123
      previous:
        description: Url to the API holding the previous page. null if the requested page is the first page.
        type: string?
      next:
        description: Url to the API holding the next page. null if the requested page is the last page.
        type: string?
      maxPageSize:
        description: Maximum page size, as allowed by the service.
        type: integer

  TimeseriesListResponse:
    description: Response for a time series list request.
    type: object
    properties:
      results:
        type: Timeseries[]
        description: List of timeseries types.
      count:
        description: Number of records satisfying the query parameters.
        type: integer
        example: 1123
      previous:
        description: Url to the API holding the previous page. null if the requested page is the first page.
        type: string?
      next:
        description: Url to the API holding the next page. null if the requested page is the last page.
        type: string?
      maxPageSize:
        description: Maximum page size, as allowed by the service.
        type: integer

  LocationPostRequest:
    description: Location filter request
    type: object
    properties:
      code:
        type: string[]

  TimeseriesPostRequest:
    description: Timeseries filter request
    type: object
    properties:
      code:
        type: string[]
        description: Array of codes or uuids of timeseries to return. AquaDesk uses uuids.
      start:
        type: date-only
        description: First date of the requested measurements. Format: yyyy-MM-dd.
      end:
        type: date-only
        description: Last date of the requested measurements. Format: yyyy-MM-dd.

# APIs
/datasources:
  description: The Datasources endpoint can return the datasources that the provider offers. Filtering: uuid and name.

About Datasource

DataSource (“bronhouder” in Dutch) objects describe the source of the data. A node can have multiple data sources.

  get:
    queryParameters:
      name:
        required: false
        type: string
        example: AquaDesk DD Primary
      page:
        description: Page number.
        required: false
        type: integer
        minimum: 1
        example: 1
      pageSize:
        description: Page size.
        required: false
        type: integer
        minimum: 1
        maximum: 10000
        example: 10
    responses:
      200:
        body:
          application/json:
            type: DatasourceListResponse
            example: {
              "count": 1,
              "previous": null,
              "next": null,
              "maxPageSize": 100000,
              "results": [
                {
                  "uuid": "978fdf5c-95c8-43a5-82ff-d27d9e6d685f",
                  "name": "AquaDesk DD Primary",
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  }
                }
              ]
            }
      204:
        body:
          application/json:
            type: object

  /{uuid}:
    description: Request a specific datasource by its uuid.
    uriParameters:
      uuid:
        type: string
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
        description: Unique identifier for the datasource. Version 4.
        example: 978fdf5c-95c8-43a5-82ff-d27d9e6d685f
    get:
      responses:
        200:
          body:
            application/json:
              type: Datasource
              example: {
                "uuid": "978fdf5c-95c8-43a5-82ff-d27d9e6d685f",
                "name": "AquaDesk DD Primary",
                "node": {
                  "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                  "name": "AquaDesk Primary",
                  "description": "AquaDesk Primary Node",
                  "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                }
              }
        404:
          body:
            application/json:
              type: object
              example: {"message": "Invalid data source"}

/nodes:
  description: The Nodes endpoint can return the nodes that the provider offers. Filtering: uuid and name.

About Node

Node objects contain the properties of the data node. A node is an operational implementation of the Digital Delta specification.

  get:
    queryParameters:
      name:
        required: false
        type: string
        description: The (partial) name of the node.
        example: AquaDeskPrimaryNode
      page:
        description: Page number.
        required: false
        type: integer
        minimum: 1
        example: 1
      pageSize:
        description: Page size.
        required: false
        type: integer
        minimum: 1
        maximum: 10000
        example: 10
    responses:
      200:
        body:
          application/json:
            type: NodeListResponse
            example: {
              "count": 1,
              "previous": null,
              "next": null,
              "maxPageSize": 100000,
              "results": [
                {
                  "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                  "name": "AquaDeskPrimaryNode",
                  "description": "Primary node for the AquaDesk RWS service.",
                  "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                }
              ]
            }
      204:
        body:
          application/json:
            type: object

  /{uuid}:
    description: Request a specific node by its uuid.
    uriParameters:
      uuid:
        type: string
        description: Unique identifier for the node. Version 4.
        example: f4af47f5-f087-494c-9b2d-ba129bddd545
    get:
      responses:
        200:
          body:
            application/json:
              type: Node
              example: {
                "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                "name": "AquaDeskPrimaryNode",
                "description": "Primary node for the AquaDesk RWS service.",
                "baseUrl": "https://digitaldeltatest.aquadesk.nl"
              }
        404:
          body:
            application/json:
              type: object
              example:
                {"message": "Invalid node source"}

/observationtypes:
  description: The ObservationTypes endpoint can return the observationtypes that the provider offers. Filtering: list of parameters.

About ObservationType

The ObservationType objects describe all attributes to correctly interpret what has been measured, and in what way. It is essential to have the quantity field.

  get:
    queryParameters:
      quantity:
        description: Retrieve only observation types that contain the specified quantity.
        required: false
        type: string
      parameterCode:
        description: Retrieve only observation types that contain the specified parameter code.
        required: false
        type: string
      page:
        description: Page number.
        required: false
        type: integer
        minimum: 1
        example: 1
      pageSize:
        description: Page size.
        required: false
        type: integer
        minimum: 1
        maximum: 10000
        example: 10
    responses:
      200:
        body:
          application/json:
            type: ObservationTypeListResponse
            example: {
              "count": 674,
              "previous": null,
              "next": "https://digitaldeltatest.aquadesk.nl/observationtypes?page=2&pagesize=2",
              "maxPageSize": 100000,
              "results": [
                {
                  "uuid": "1f9f13c0-d45a-4031-9231-09235d81481e",
                  "quantity": "AANTL",
                  "unit": "n/ml",
                  "parameterCode": "Acanthoceras zachariasii",
                  "compartment": "OW",
                  "qualifier": "CE",
                  "observationProcess":
                  {
                    "valuationMethod": "MED"
                  }
                },
                {
                  "uuid": "75c234ef-8182-4948-a593-3c0b4c1a8308",
                  "quantity": "AANTL",
                  "unit": "n/ml",
                  "parameterCode": "Achnanthales",
                  "compartment": "OW",
                  "qualifier": "CE",
                }
              ]
            }
      204:
        body:
          application/json:
            type: object

  /{qualifier}:
    description: Request a specific observation type by its qualifier.

      Since almost no specific ObservationTypes for biological entities exist in Aquo, AquaDesk is using uuids instead of the code. The type 'String' is used in both circumstances.
    uriParameters:
      qualifier:
        type: string
        description: The qualifier (or uuid for AquaDesk) identifying the observation type.
    get:
      responses:
        200:
          body:
            application/json:
              type: ObservationType
              example: {
                "uuid": "1f9f13c0-d45a-4031-9231-09235d81481e",
                "quantity": "AANTL",
                "unit": "n/ml",
                "parameterCode": "Acanthoceras zachariasii",
                "compartment": "OW",
                "qualifier": "CE",
              }
        404:
          body:
            application/json:
              type: object
              example: {"message": "Invalid observation type source"}

/locations:
  description: The Locations endpoint can return the locations that the provider offers. Filtering: bounding box, uuid, code, name and node.

About Locations

A location object contains all information required to describe a location. This version contains a node.

  get:
    queryParameters:
      boundingBox:
        description: Bounding box representing a rectangle in which the locations must lie. This is represented by 4 doubles, separated by commas.

         Example: boundingBox=minLon,minLat,maxLon,maxLat

          Where:

           minLon: minimum longitude in decimal degrees (WGS84)

           minLat: minimum lattitude in decimal degrees (WGS84)

           maxLon: maximum longitude in decimal degrees (WGS84)

           maxLat: maximum lattitude in decimal degrees (WGS84)

        required: false
        type: string
        example: 4.8,52.0,5.8,54.0
      name:
        required: false
        type: string
        description: (Partial) location name.
        example: NEDHMT
      node:
        required: false
        type: string
        description: Uuid of the node.
        example: f4af47f5-f087-494c-9b2d-ba129bddd545
      code:
        required: false
        type: string
        description: Location code.
        example: NLWATB-RWTS_AFGDM_0001
      page:
        description: Page number.
        required: false
        type: integer
        minimum: 1
        example: 1
      pageSize:
        description: Page size.
        required: false
        type: integer
        minimum: 1
        maximum: 10000
        example: 10
    responses:
      200:
        body:
          application/json:
            type: LocationListResponse
            example: {
              "count": 795,
              "previous": null,
              "next": "https://digitaldeltatest.aquadesk.nl/locations?page=2&pagesize=10",
              "maxPageSize": 100000,
              "results": [
                {
                  "uuid": "ed0655e7-ced5-42ad-ac42-b9b96639307c",
                  "url": "https://digitaldeltatest.aquadesk.nl/locations/ed0655e7-ced5-42ad-ac42-b9b96639307c",
                  "code": "NLWATB-RWTS_AFGDM_0001",
                  "name": "NEDHMT",
                  "geometry": {
                    "type": "Point",
                    "coordinates": [
                      5.15835627200311,
                      51.7581204207227,
                      0
                    ]
                  },
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  }
                },
                {
                  "uuid": "4d58d630-ac4e-4eb3-bff4-1b17c7b77630",
                  "url": "https://digitaldeltatest.aquadesk.nl/locations/4d58d630-ac4e-4eb3-bff4-1b17c7b77630",
                  "code": "NLWATB-RWTS_AFGDM_0002",
                  "name": "VEEN",
                  "geometry": {
                    "type": "Point",
                    "coordinates": [
                      5.11187400090377,
                      51.7800422641779,
                      0
                    ]
                  },
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  }
                }
              ]
            }
      204:
        body:
          application/json:
            type: object

  /{uuid}:
    description: Request a specific location by its uuid.
    uriParameters:
      uuid:
        type: string
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
        description: Unique identifier for the location. Version 4.
        example: ed0655e7-ced5-42ad-ac42-b9b96639307c
    get:
      responses:
        200:
          body:
            application/json:
              type: Location
              example: {
                "uuid": "ed0655e7-ced5-42ad-ac42-b9b96639307c",
                "url": "https://digitaldeltatest.aquadesk.nl/locations/ed0655e7-ced5-42ad-ac42-b9b96639307c",
                "code": "NLWATB-RWTS_AFGDM_0001",
                "name": "NEDHMT",
                "geometry": {
                  "type": "Point",
                  "coordinates": [
                    5.15835627200311,
                    51.7581204207227,
                    0
                  ]
                },
                "node": {
                  "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                  "name": "AquaDesk Primary",
                  "description": "AquaDesk Primary Node",
                  "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                }
              }
        404:
          body:
            application/json:
              type: object
              example: |
                {"message": "Invalid location code"}

  post:
    body:
      application/json:
        type: LocationPostRequest
        example: { code: [ "NLWATB-RWTS_AFGDM_0001", "NLWATB-RWTS_AFGDM_0002"] }
    responses:
      200:
        body:
          application/json:
            type: LocationListResponse
            example: {
              "count": 795,
              "previous": null,
              "next": "https://digitaldeltatest.aquadesk.nl/locations?page=2&pageSize=10",
              "maxPageSize": 100000,
              "results": [
                {
                  "uuid": "ed0655e7-ced5-42ad-ac42-b9b96639307c",
                  "url": "https://digitaldeltatest.aquadesk.nl/locations/ed0655e7-ced5-42ad-ac42-b9b96639307c",
                  "code": "NLWATB-RWTS_AFGDM_0001",
                  "name": "NEDHMT",
                  "geometry": {
                    "type": "Point",
                    "coordinates": [
                      5.15835627200311,
                      51.7581204207227,
                      0
                    ]
                  },
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  }
                },
                {
                  "uuid": "4d58d630-ac4e-4eb3-bff4-1b17c7b77630",
                  "url": "https://digitaldeltatest.aquadesk.nl/locations/4d58d630-ac4e-4eb3-bff4-1b17c7b77630",
                  "code": "NLWATB-RWTS_AFGDM_0002",
                  "name": "VEEN",
                  "geometry": {
                    "type": "Point",
                    "coordinates": [
                      5.11187400090377,
                      51.7800422641779,
                      0
                    ]
                  },
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  }
                }
              ]
            }
      204:
        body:
          application/json:
            type: object

      404:
        body:
          application/json:
            type: object
            example: |
              {"message": "Invalid filters"}

/timeseries:
  description:
    The timeseries endpoint can return both the metadata and the data itself. If a start‐ and endtime is given in the request, the data is added to the response, for both the List and the Detail requests. Furthermore, it is possible to only retrieve the data (without the metadata) by querying the data endpoint: /timeseries/{uuid}/data/.

    Optional: add start and end filter, returns metadata and data (values)

    Filtering: value type, uuid, code, node, timeseries type, observation type, location name, start- and enddate.

About Timeseries

Timeseries objects contain all information needed to interpret timeseries.

    There are references to other objects, such as Node, Location, DataSource, ObservationType and TimeseriesType.

    The TimeseriesType should be added as a reference because it can indicate if a timeseries containts a RAW dataset or makes use of the current measurements.
    The Digital Delta specification of timeseries makes no assumptions on the nature of the series, timeseries may describe any series of data points of the same observation type and datasource in time on one location.

    This includes both equidistant series (fixed time interval between data points) and non-equidistant series (with varying time interval).

Use case:

Imagine a data-source is providing several timeseries for a specific location and observation. For example:

    Waterlevel is measured every 5 minutes for the location Lobith.
    This is the original timeseries from the datasource and we can call it the RAW timeseries or the original timeseries.

    Within the same data-souce, again, waterlevel is measured every 5 minutes for the same location, but this timeseries is a manually or automatically validated timeseries. So in this case we have an original timeseries which is providing the raw data and another timeseries which has been validated. Both timeseries can be required for different purposes.

    Now imagine that someone requires the validated timeseries instead of the original.

    The users should be able to filter them based on this information and retreve data only for this type of timeseries. There are several more uses cases where more than two types are used. Think of timeseries that are recalculated based on validation, interval, aggregation, etc.

    Using TimeseriesType is providing more flexibility in providing multiple timeseries for the same location and observation type provided by a single data-source.

  get:
    queryParameters:
      start:
        type: datetime
        required: false
        description: Retrieve measurements that are measured on or after this date and time.
        example: 2015-01-01T00:00:00Z
      end:
        type: datetime
        required: false
        description: Retrieve measurements that are measured before or on this date and time. Uses the Zulu notation.
        example: 2016-12-31T23:59:59Z
      locationCode:
        type: string
        required: false
        description: Retrieve measurements that were measured at a location with a name like the location code.
        example: VEEN
      observationType:
        type: string
        required: false
        description: Unique identifier of the observation type.
        example: 1f9f13c0-d45a-4031-9231-09235d81481e
      timeseriesType:
        type: string
        required: false
        description: Code of the time series. AquaDesk only supports MEAS.
        example: MEAS
      node:
        required: false
        type: string
        description: Unique identifier of the node.
        example: f4af47f5-f087-494c-9b2d-ba129bddd545
      valueType:
        type: string
        required: false
        description: Value type.
        example: float
      page:
        description: Page number.
        required: false
        type: integer
        minimum: 1
        example: 1
      pageSize:
        description: Page size.
        required: false
        type: integer
        minimum: 1
        maximum: 10000
        example: 10
      qualifier:
        description: Filter for the optional qualifier property.
        required: false
        type: string
        example: H.meting
    responses:
      200:
        body:
          application/json:
            type: TimeseriesListResponse
            example: {
              "count": 48751,
              "previous": null,
              "next": "https://digitaldeltatest.aquadesk.nl/timeseries?page=2&pagesize=2",
              "maxPageSize": 100000,
              "results": [
                {
                  "url": "https://digitaldeltatest.aquadesk.nl/timeseries/e9ede034-f254-4855-b1ea-fe715c382935",
                  "uuid": "e9ede034-f254-4855-b1ea-fe715c382935",
                  "location": {
                    "uuid": "6fba498f-0b59-462b-8c34-bd456d8e7d31",
                    "url": "https://digitaldeltatest.aquadesk.nl/locations/6fba498f-0b59-462b-8c34-bd456d8e7d31",
                    "code": "NLWATB-RWTS_BERMS_0002",
                    "name": "KEIZVR",
                    "geometry": {
                      "type": "Point",
                      "coordinates": [
                        4.89443671141974,
                        51.7201856231622,
                        0
                      ]
                    },
                    "node": {
                      "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                      "name": "AquaDesk Primary",
                      "description": "AquaDesk Primary Node",
                      "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                    }
                  },
                  "observationType": {
                    "uuid": "297d7ba6-d5e0-4683-849a-5246a3aa83c4",
                    "quantity": "AANTL",
                    "unit": "n/ml",
                    "parameterCode": "Achnanthidium",
                    "compartment": "OW",
                    "qualifier": "CE",
                  },
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  },
                  "datasource": {
                    "uuid": "978fdf5c-95c8-43a5-82ff-d27d9e6d685f",
                    "name": "AquaDesk Primary",
                    "node": {
                      "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                      "name": "AquaDesk Primary",
                      "description": "AquaDesk Primary Node",
                      "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                    }
                  },
                  "timeseriesType": {
                    "code": "MEAS",
                    "name": "Measurements"
                  },
                  "interval": null,
                  "valueType": "float",
                  "start": "2005-02-14T23:00:00Z",
                  "end": "2005-02-14T23:00:00Z",
                  "events": null
                },
                {
                  "url": "https://digitaldeltatest.aquadesk.nl/timeseries/db9544e4-1eb3-4f99-ac6e-b9c02a7cca88",
                  "uuid": "db9544e4-1eb3-4f99-ac6e-b9c02a7cca88",
                  "location": {
                    "uuid": "6fba498f-0b59-462b-8c34-bd456d8e7d31",
                    "url": \null\,
                    "code": "NLWATB-RWTS_BERMS_0002",
                    "name": "KEIZVR",
                    "geometry": {
                      "type": "Point",
                      "coordinates": [
                        4.89443671141974,
                        51.7201856231622,
                        0
                      ]
                    },
                    "node": {
                      "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                      "name": "AquaDesk Primary",
                      "description": "AquaDesk Primary Node",
                      "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                    }
                  },
                  "observationType": {
                    "uuid": "5cd9726e-7985-4789-9674-22bec8bef325",
                    "quantity": "AANTL",
                    "unit": "n/ml",
                    "parameterCode": "Actinocyclus normanii",
                    "compartment": "OW",
                    "qualifier": "CE"
                  },
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  },
                  "datasource": {
                    "uuid": "978fdf5c-95c8-43a5-82ff-d27d9e6d685f",
                    "name": "AquaDesk Primary",
                    "node": {
                      "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                      "name": "AquaDesk Primary",
                      "description": "AquaDesk Primary Node",
                      "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                    }
                  },
                  "timeseriesType": {
                    "code": "MEAS",
                    "name": "Measurements"
                  },
                  "samplingProcess":
                  {
                    "samplingMethod": "HH-W10A:2010",
                    "samplingProcessingMethod": "I15061.01"
                  },
                  "bioTaxon":
                  {
                    "lifeStage": "LS-AD",
                    "livingForm": "LV-CEL",
                    "gender": "GE-X",
                    "appearance": "VV-G",
                    "substrate": "RIET"
                  },
                  "interval": null,
                  "valueType": "float",
                  "start": "2004-08-30T22:00:00Z",
                  "end": "2004-08-30T22:00:00Z",
                  "events": null
                }
              ]
            }
      204:
        body:
          application/json:
            type: object
      400:
        body:
          application/json:
            type: object
            example: |
              {"message": "Invalid filters"}
  post: # post bodies define filters
    body:
      application/json:
        type: TimeseriesPostRequest
        example: { code: [ "H.Meting" ], start: "2012-01-01", end: "2013-01-01"}
    responses:
      200:
        body:
          application/json:
            type: TimeseriesListResponse
            example: {
              "count": 48751,
              "previous": null,
              "next": "https://digitaldeltatest.aquadesk.nl/timeseries?page=2&pagesize=2",
              "maxPageSize": 100000,
              "results": [
                {
                  "url": "https://digitaldeltatest.aquadesk.nl/timeseries/e9ede034-f254-4855-b1ea-fe715c382935",
                  "uuid": "e9ede034-f254-4855-b1ea-fe715c382935",
                  "location": {
                    "uuid": "6fba498f-0b59-462b-8c34-bd456d8e7d31",
                    "url": "https://digitaldeltatest.aquadesk.nl/locations/6fba498f-0b59-462b-8c34-bd456d8e7d31",
                    "code": "NLWATB-RWTS_BERMS_0002",
                    "name": "KEIZVR",
                    "geometry": {
                      "type": "Point",
                      "coordinates": [
                        4.89443671141974,
                        51.7201856231622,
                        0
                      ]
                    },
                    "node": {
                      "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                      "name": "AquaDesk Primary",
                      "description": "AquaDesk Primary Node",
                      "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                    }
                  },
                  "observationType": {
                    "uuid": "297d7ba6-d5e0-4683-849a-5246a3aa83c4",
                    "quantity": "AANTL",
                    "unit": "n/ml",
                    "parameterCode": "Achnanthidium",
                    "compartment": "OW",
                    "qualifier": "CE",
                  },
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  },
                  "datasource": {
                    "uuid": "978fdf5c-95c8-43a5-82ff-d27d9e6d685f",
                    "name": "AquaDesk Primary",
                    "node": {
                      "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                      "name": "AquaDesk Primary",
                      "description": "AquaDesk Primary Node",
                      "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                    }
                  },
                  "timeseriesType": {
                    "code": "MEAS",
                    "name": "Measurements"
                  },
                  "interval": null,
                  "valueType": "float",
                  "start": "2005-02-14T23:00:00Z",
                  "end": "2005-02-14T23:00:00Z",
                  "events": null
                },
                {
                  "url": "https://digitaldeltatest.aquadesk.nl/timeseries/db9544e4-1eb3-4f99-ac6e-b9c02a7cca88",
                  "uuid": "db9544e4-1eb3-4f99-ac6e-b9c02a7cca88",
                  "location": {
                    "uuid": "6fba498f-0b59-462b-8c34-bd456d8e7d31",
                    "url": \null\,
                    "code": "NLWATB-RWTS_BERMS_0002",
                    "name": "KEIZVR",
                    "geometry": {
                      "type": "Point",
                      "coordinates": [
                        4.89443671141974,
                        51.7201856231622,
                        0
                      ]
                    },
                    "node": {
                      "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                      "name": "AquaDesk Primary",
                      "description": "AquaDesk Primary Node",
                      "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                    }
                  },
                  "observationType": {
                    "uuid": "5cd9726e-7985-4789-9674-22bec8bef325",
                    "quantity": "AANTL",
                    "unit": "n/ml",
                    "parameterCode": "Actinocyclus normanii",
                    "compartment": "OW",
                    "qualifier": "CE",
                  },
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  },
                  "datasource": {
                    "uuid": "978fdf5c-95c8-43a5-82ff-d27d9e6d685f",
                    "name": "AquaDesk Primary",
                    "node": {
                      "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                      "name": "AquaDesk Primary",
                      "description": "AquaDesk Primary Node",
                      "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                    }
                  },
                  "timeseriesType": {
                    "code": "MEAS",
                    "name": "Measurements"
                  },
                  "bioTaxon":
                  {
                    "lifeStage": "LS-AD",
                    "livingForm": "LV-CEL",
                    "gender": "GE-X",
                    "appearance": "VV-G",
                    "substrate": "RIET"
                  },
                  "interval": null,
                  "valueType": "float",
                  "start": "2004-08-30T22:00:00Z",
                  "end": "2004-08-30T22:00:00Z",
                  "events": null
                }
              ]
            }
      204:
        body:
          application/json:
            type: object

      400:
        body:
          application/json:
            type: object
            example: |
              {"message": "Invalid filters"}

  /{uuid}:
    description: Get the data of one timeseries, including metadata.
    uriParameters:
      uuid:
        type: string
        description: Unique identifier for the timeseries. Version 4.
        example: db9544e4-1eb3-4f99-ac6e-b9c02a7cca88
    get:
      responses:
        200:
          body:
            application/json:
              type: Timeseries
              example: {
                "url": "https://digitaldeltatest.aquadesk.nl/timeseries/db9544e4-1eb3-4f99-ac6e-b9c02a7cca88",
                "uuid": "db9544e4-1eb3-4f99-ac6e-b9c02a7cca88",
                "location": {
                  "uuid": "6fba498f-0b59-462b-8c34-bd456d8e7d31",
                  "url": "https://digitaldeltatest.aquadesk.nl/locations/6fba498f-0b59-462b-8c34-bd456d8e7d31",
                  "code": "NLWATB-RWTS_BERMS_0002",
                  "name": "KEIZVR",
                  "geometry": {
                    "type": "Point",
                    "coordinates": [
                      4.89443671141974,
                      51.7201856231622,
                      0
                    ]
                  },
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  }
                },
                "observationType": {
                  "uuid": "5cd9726e-7985-4789-9674-22bec8bef325",
                  "quantity": "AANTL",
                  "unit": "n/ml",
                  "parameterCode": "Actinocyclus normanii",
                  "compartment": "OW",
                  "qualifier": "CE",
                },
                "node": {
                  "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                  "name": "AquaDesk Primary",
                  "description": "AquaDesk Primary Node",
                  "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                },
                "datasource": {
                  "uuid": "978fdf5c-95c8-43a5-82ff-d27d9e6d685f",
                  "name": "AquaDesk Primary",
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  }
                },
                "timeseriesType": {
                  "code": "MEAS",
                  "name": "Measurements"
                },
                "interval": null,
                "valueType": "float",
                "start": "2004-08-30T22:00:00Z",
                "end": "2004-08-30T22:00:00Z",
                "bioTaxon":
                  {
                    "lifeStage": "LS-AD",
                    "livingForm": "LV-CEL",
                    "gender": "GE-X",
                    "appearance": "VV-G",
                    "substrate": "RIET"
                  },
                "events": [
                  {
                    "value": 13.81,
                    "timeStamp": "2004-08-30T22:00:00Z"
                  }
                ]
              }
        204:
          body:
            application/json:
              type: object
        400:
          body:
            application/json:
              type: object
              example: |
                {"message": "Invalid time series"}

    /data:
      description: Get the detail data for the specified timeseries, excluding metadata.
      get:
        queryParameters:
          start:
            type: date-only
            required: false
            example: 2016-01-01
            description: Format: yyyy-MM-dd.
          end:
            type: date-only
            required: false
            example: 2016-12-31
            description: Format: yyyy-MM-dd.
        responses:
          200:
            body:
              application/json:
                type: Event[]
                example: [
                  {
                    "value": 13.81,
                    "timeStamp": "2004-08-30T22:00:00Z",
                    "quality": "",
                    "limitSymbol": null
                  }
                ]
          400:
            body:
              application/json:
                type: object
                example: |
                  {"message": "Invalid time series"}

#%RAML 1.0
title: Digital Delta API
version: 1.0
securitySchemes:
  basic:
    type: Basic Authentication
baseUri: http://digitaldeltatest.aquadesk.nl
mediaType: [ application/json ]
description: Digital Delta API
documentation:
 - title: Introduction
   content: The Digital Delta is a distributed network in which various datasources exchange information using a standard interface.
     This specification outlines the mechanics of the Digital Delta as a distributed network of nodes and masternodes and describes the technical specification of the Digital Delta web API.

     This document uses the RAML standard as the definition language.

 - title: The API specification
   content:
     The API specification consists of two parts.

The Types section describes the data types that are available for the resources. Please refer to figure 1 below for the resource object diagram.

Note: Currently, the generated HTML documentation does not contain tables that describe the data types. However, their content can be seen in the response tabs of the requests. If you want to have a detailed look at the type definitions, open the RAML file and go to the “# Base types.” section.

The Resources section describes the available end-points.

Figure 1

The Digital Delta uses uuids (universally unique identifier, version 4) for identification of resource objects.

     The use of uuids guarantees a unique identifier for an instance over all nodes in the Digital Delta without the need for individual nodes to have a knowledge about data in other nodes.

     There is a code attribute as well that can be used by suppliers for their internal identifiers.

     The Digital Delta supports timeseries data, defined as a measurement series with a begin and end time, a fixed location and a parameter.

     The list of objects is setup to be extendable to other data types, such as raster or vector data.

     The protocols provides by the services are HTTP and HTTPS. Currently authentication is Anonymous.

     The Digital Delta only supports JSON as the output format and for POST request bodies.

 - title: The RAML standard and Universal unique identifiers
   content:
     The RAML specification currently doesn't know the type uuid (Universal unique identifiers). To have a structure in the definition to allow working with uuids, the Digital Delta specification uses a strong with a specific regular expression pattern.
     The base pattern is: [0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}.
 - title: About the examples in this document
   content:
    The examples in the requests are based on based on the AquaDesk implementation of the Digital Delta specifications. The structure, however, for all gets, posts and responses will be the same for all providers.
 - title: Future enhancements
   content:
     The following future enhancements are under consideration.

Search endpoint (full-text search)

Authentication/Authorisation

Error and warning codes

OPTION request, explaining how the service works

 - title: Future research
   content:
     The following topics are considered Future research

Attributes for different standards

Support for multiple data types

Additional output formats

Basic calculations on timeseries data

 - title: Document history
   content:

        Date
        Author
        Changes

         2017-05-06
        Geri Wolters

Texts from the original document added. Texts corrected and updated.

Introduction of samples.

Changed properties previous and next to return string? instead of string.

Changed properties events from timeseries to return an array or nil, as the values can be null.

          </ul

         2017-05-30
        Geri Wolters

Added resource object diagram.

          </ul

         2017-06-13
        Geri Wolters

Unified naming of fields and parameters.

TimeSeries field 'code' is replaced by 'qualifier'. 'qualifier' is optional and filterable.

HTTP Status code 204 (NoContent) is introduced for list-requests. This value should be returned instead of an empty list.

          </ul

         2017-06-26
        Geri Wolters

Changed error responses from 404 to 400.

          </ul

         2017-07-14
        Geri Wolters / Stef Hummel

BioTaxon block added.

SamplingProcess block added.

ObservationProcess block added.

Removal of 'Extras'. Specific features should be coded into specific domain extensions, like BioTaxon does.

          </ul

protocols:
  - HTTP
  - HTTPS

# Base types.
types:
  Double:
    description: A value of type Double (float).
    type: number
    format: double

  KeyValuePair:
    description: A combination of key and value.
    properties:
      key:
        type: string
        description: The key of the key/value pair.
        example: taxontype
      value:
        type: string
        description: The value of the key/value pair.

  Geometry:
    description: A geometry in GeoJSON format. Digital Delta currently only supports the Point type.
    properties:
      type:
        description: The geometry type. Must have the value "Point".
        type: string
        example: "Point"
      coordinates:
        type: Double[]
        description: An array of doubles, representing a coordinate.
        example: [ 4.234, 52.3423 ]

  ObservationTypeBioTaxon:
    description: Specific fields for biological taxa at observationtype level.
    required: false
    properties:
      type:
        description: Aquo-standard code of the taxonomic group of the taxon.The type is required.

          Qualifiers: Nullable, Filterable, Searchable.
        type: string
        example: FYTPT
        required: true
      group:
        description: Aquo-standard code of the taxonomic subgroup of the taxon. The group is optional.

          Qualifiers: Nullable, Filterable, Searchable.
        type: string
        example: CRYPT

  TimeSeriesBioTaxon:
    description: Specific fields for biological taxa at timeseries level.
    properties:
      lifeStage:
        description: Aquo-standard code for life stage of the observed taxa. (Levensstadium, LS)

          Qualifiers: Nullable, Filterable, Searchable.
        required: false
        type: string
        example: LS-AD
      livingForm:
        description: Aquo-standard living form of the observed taxa. (Leefvorm, LV)

          Qualifiers: Nullable, Filterable, Searchable.
        required: false
        type: string
        example: LV-CEL
      gender:
        description: Aquo-standard gender of the observed taxa. (Geslacht, GE)

          Qualifiers: Nullable, Filterable, Searchable.
        required: false
        type: string
        example: GE-X
      appearance:
        description: Aquo-standard appearance form of the observed taxa. (Verschijningsvorm, VV)

          Qualifiers: Nullable, Filterable, Searchable.
        required: false
        type: string
        example: VV-G
      substrate:
        description: Aqu-standard substrate the observed taxa was found in.

          Qualifiers: Nullable, Filterable, Searchable.
        required: false
        type: string
        example: RIET

  SamplingProcess:
    description: Contains properties specific to the sampling process.
    properties:
      samplingMethod:
        description: Aquo-standard code, describing the method used to take the sample.

          Qualifiers: Nullable, Filterable, Searchable.
        required: false
        type: string
        example: HH-W10A:2010
      samplingProcessingMethod:
        description: Aquo-standard code, describing the method used to treat the sample in order to determining its value.

          Qualifiers: Nullable, Filterable, Searchable.
        required: false
        type: string
        example: I15061.01

  ObservationProcess:
    description: Contains properties specific to the observation process.
    properties:
      valuationMethod:
        description: Aquo-standard code, describing the method used to determine its value.

          Qualifiers: Nullable, Filterable, Searchable.
        required: false
        type: string
        example: MED

  Node:
    description: Node objects contain the properties of the data node. A node is an operational implementation of the Digital Delta specification.
    type: object
    properties:
      uuid:
        type: string
        required: true
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
        description: The unique identifier of the node. UUID Version 4.

          Qualifiers: Nullable, Filterable, Searchable.
        example: 978fdf5c-95c8-43a5-82ff-d27d9e6d685f
      name:
        type: string
        required: true
        description: The name of the node.

          Qualifiers: Nullable, Filterable, Searchable.
      description:
        type: string
        required: true
        description: The description of the node.

          Qualifiers: Nullable, Filterable, Searchable.
      baseUrl:
        type: string
        required: true
        description: The base URL of the node.

  Location:
    displayName: Location
    description: A location object contains all information required to describe a location. This version contains a node.
    type: object
    properties:
      uuid:
        type: string
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
        description: The unique identifier for the location. UUID Version 4.

          Qualifiers: Nullable, Filterable, Searchable.
      url:
        type: string
        description: The URL of the location.
      code:
        type: string
        description: The code of the location.

          Qualifiers: Nullable, Filterable, Searchable.
      name:
        type: string
        description: The name of the location..

          Qualifiers: Nullable, Filterable, Searchable.
      geometry:
        type: Geometry
        description: The GeoJSON geometry definition of the location..

          Qualifiers: Nullable, Filterable, Searchable.
      node:
        type: Node
        description: The node of the location..

          Qualifiers: Nullable, Filterable, Searchable.

  Datasource:
    displayName: DataSource
    description: DataSource (“bronhouder” in Dutch) objects describe the source of the data. A node can have multiple data sources.
    type: object
    properties:
      uuid:
        type: string
        required: true
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
        description: The unique identifier for the datasource. UUID Version 4

          Qualifiers: Nullable, Filterable, Searchable.
      name:
        type: string
        required: true
        description: The name of the datasource..

          Qualifiers: Nullable, Filterable, Searchable.
      node:
        type: Node
        required: true
        description: The node of the datasource.

  ObservationType:
    description: The ObservationType objects describe all attributes to correctly interpret what has been measured, and in what way. It is essential to have the quantity field.
    type: object
    properties:
      uuid:
        type: string
        required: true
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
        description: The unique identifier for the observationtype. UUID Version 4.
      quantity:
        type: string
        examples: [ "ZICHT", "MONSTER", "CONCTTE", "AANTL" ]
        required: true
        description: Defines what was measured.
      unit:
        type: string
        examples: [ "cm2", "n", "n/m3", "%", "DIMSLS", "C" ]
        required: true
        description: Unit of measurement. Follows the Aquo standards.
      parameterCode:
        type: string
        required: false
        examples: [ "Pediastrum", "Ca", "1112T4ClC2a", "HYBDVS" ]
        description: Parameter code specifying the observationtype. Non-biological observation types follow the Aquo standards.

          Qualifiers: Nullable, Filterable, Searchable.
      compartment:
        type: string
        required: false
        examples: [ "OW", "DL", "GW", "LW" ]
        description: The compartment in which the measurement took place. Standardised Aquo compartments.

          Qualifiers: Nullable, Filterable, Searchable.
      qualifier:
        type: string
        required: false
        examples: [ "AD", "JU", "T20C", "KO", "BraunBS", "WATSGL", "WATKLM" ]
        description: Dutch: 'Hoedanigheid'. Additional qualities of the measurement.

          Qualifiers: Nullable, Filterable, Searchable.
      observationProcess?:
        type: ObservationProcess
        example:
          {
            "valuationMethod": "MED"
          }
      bioTaxon?:
        type: ObservationTypeBioTaxon
        description: Specific biotaxon information.
        example:
          {
            "type": "FYTPT",
            "group": "CRYPT"
          }
        description: Extra information about the measurement. Can be used to provide specific details concerning the circumstances or the object measured, etc.

  MinimalEvent:
    displayName: Event (minimal)
    description: Event objects contain the actual value of each observation.
      Each observation contains a timestamp and a value.
    properties:
      value:
        type: number
        required: true
        example: 37.0
        description: The value of the measured data.

          Qualifiers: Nullable, Filterable, Searchable.
      timeStamp:
        type: datetime
        required: false
        example: 2016-12-31T12:45:00Z
        description: The date/time when the measurement took place. Uses the Zulu notation.

  Event:
    type: MinimalEvent
    displayName: Event
    description: Event objects contain the actual value of each observation.
      Each observation contains a timestamp and a value. There is an optional quality parameter and limit symbol.
    properties:
      quality:
        type: string
        required: false
        example: "99"
        description: As specified in Aquo Domain Table 'Kwaliteitsoordeel'. Specifies whether the value is considered normal, abberent, interpolated, etc. and for what reason. .

          Qualifiers: Nullable, Filterable, Searchable.
      limitSymbol:
        type: string
        required: false
        examples: ["<", ">", "="]
        description: The limit symbol supplements the measured value.

          Qualifiers: Nullable, Filterable, Searchable.

  TimeseriesType:
    description: TimeSeriesType objects describe the type of measurement the timeseries contains.
      These can be for example raw measurements, but also aggregations or simulations.
      This information could be needed to correctly interpret the measurement values.
    type: object
    properties:
      code:
        type: string
        required: true
        example: MEAS
        description: The code of the timeseries type.
      name:
        type: string
        required: true
        example: Measurement
        description: The name of the timeseries type.

  Timeseries:
    description: Timeseries objects contain all information needed to interpret timeseries.

      There are references to other objects, such as Node, Location, DataSource, ObservationType and TimeseriesType.

      The TimeseriesType should be added as a reference because it can indicate if a timeseries containts a RAW dataset or makes use of the current measurements.
      The Digital Delta specification of timeseries makes no assumptions on the nature of the series, timeseries may describe any series of data points of the same observation type and datasource in time on one location.

      This includes both equidistant series (fixed time interval between data points) and non-equidistant series (with varying time interval).

Use case:

Imagine a data-source is providing several timeseries for a specific location and observation. For example:

      Waterlevel is measured every 5 minutes for the location Lobith.
      This is the original timeseries from the datasource and we can call it the RAW timeseries or the original timeseries.

      Within the same data-souce, again, waterlevel is measured every 5 minutes for the same location, but this timeseries is a manually or automatically validated timeseries. So in this case we have an original timeseries which is providing the raw data and another timeseries which has been validated. Both timeseries can be required for different purposes.

      Now imagine that someone requires the validated timeseries instead of the original.

      The users should be able to filter them based on this information and retrieve data only for this type of timeseries. There are several more uses cases where more than two types are used. Think of timeseries that are recalculated based on validation, interval, aggregation, etc.

      Using TimeSeriesType is providing more flexibility in providing multiple timeseries for the same location and observation type provided by a single data-source.

    type: object
    properties:
      url:
        type: string
        required: true
      uuid:
        type: string
        required: true
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
        description: The unique identifier for the timeseries. UUID Version 4.

          Qualifiers: Nullable, Filterable, Searchable.
        example: f4af47f5-f087-494c-9b2d-ba129bddd545
      qualifier:
        type: string
        required: false
        description: The qualifier of the timeseries. AquaDesk uses the uuid for this.

          Qualifiers: Nullable, Filterable, Searchable.
        example: H.Meting
      location:
        type: Location
        required: true
        description: The location that the timeseries uses.

          Qualifiers: Nullable, Filterable, Searchable.
      observationType:
        type: ObservationType
        required: true
        description: The observationtype that the timeseries uses.

          Qualifiers: Nullable, Filterable, Searchable.
      node:
        type: Node
        required: true
        description: The node responsible for hosting the data for the timeseries.

          Qualifiers: Nullable, Filterable, Searchable.
      datasource:
        type: Datasource
        required: true
        description: The datasource providing the data for the timeseries..

          Qualifiers: Nullable, Filterable, Searchable.
      timeseriesType:
        type: TimeseriesType
        required: true
        description: The type of the timeseries..

          Qualifiers: Nullable, Filterable, Searchable.
      interval:
        type: number
        required: false
        description: Specifies the interval between measurements for the timeseries.

          Qualifiers: Nullable, Filterable, Searchable.
      valueType:
        type: string
        required: false
        description:  The data type of the measured data.

          Qualifiers: Nullable, Filterable, Searchable.
      start:
        type: datetime
        required: true
        example: 2016-01-01T12:45:00Z
        description:  Start date/time of the measurement. Uses the Zulu notation

          Qualifiers: Nullable, Filterable, Searchable.
      end:
        type: datetime
        required: true
        example: 2016-01-01T12:45:00Z
        description:  End date/time of the measurement. Uses the Zulu notation

          Qualifiers: Nullable, Filterable, Searchable.
      events?:
        type: MinimalEvent[]
        description: Defines a minimal event.
      samplingProcess?:
        type: SamplingProcess
        description: Describes properties used in the sampling process.
        example:
          {
            "samplingMethod": "HH-W10A:2010",
            "samplingProcessingMethod": "I15061.01"
          }
      bioTaxon?:
        type: TimeSeriesBioTaxon
        description: Specific biotaxon information.
        example:
          {
            "lifeStage": "LS-AD",
            "livingForm": "LV-CEL",
            "gender": "GE-X",
            "appearance": "VV-G",
            "substrate": "RIET"
          }

# List responses
  NodeListResponse:
    description: Contains zero or more responses to a Node list request.
    type: object
    properties:
      results:
        type: Node[]
        description: List of Nodes.
      count:
        description: Number of records satisfying the query parameters.
        type: integer
        example: 1123
      previous:
        description: Url to the API holding the previous page. null if the requested page is the first page.
        type: string?
      next:
        description: Url to the API holding the next page. null if the requested page is the last page.
        type: string?
      maxPageSize:
        description: Maximum page size, as allowed by the service.
        type: integer

  DatasourceListResponse:
    description: Contains zero or more responses to a DataSource list request.
    type: object
    properties:
      results:
        type: Datasource[]
        description: List of Datasource.
      count:
        description: Number of records satisfying the query parameters.
        type: integer
        example: 1123
      previous:
        description: Url to the API holding the previous page. null if the requested page is the first page.
        type: string?
      next:
        description: Url to the API holding the next page. null if the requested page is the last page.
        type: string?
      maxPageSize:
        description: Maximum page size, as allowed by the service.
        type: integer

  LocationListResponse:
    description: Contains zero or more responses to a Node list request.
    type: object
    properties:
      results:
        type: Location[]
        description: List of Locations.
      count:
        description: Number of records satisfying the query parameters.
        type: integer
        example: 1123
      previous:
        description: Url to the API holding the previous page. null if the requested page is the first page.
        type: string?
      next:
        description: Url to the API holding the next page. null if the requested page is the last page.
        type: string?
      maxPageSize:
        description: Maximum page size, as allowed by the service.
        type: integer

  ObservationTypeListResponse:
    description: Response for a observation type list request.
    type: object
    properties:
      results:
        type: ObservationType[]
        description: List of observation types.
      count:
        description: Number of records satisfying the query parameters.
        type: integer
        example: 1123
      previous:
        description: Url to the API holding the previous page. null if the requested page is the first page.
        type: string?
      next:
        description: Url to the API holding the next page. null if the requested page is the last page.
        type: string?
      maxPageSize:
        description: Maximum page size, as allowed by the service.
        type: integer

  TimeseriesListResponse:
    description: Response for a time series list request.
    type: object
    properties:
      results:
        type: Timeseries[]
        description: List of timeseries types.
      count:
        description: Number of records satisfying the query parameters.
        type: integer
        example: 1123
      previous:
        description: Url to the API holding the previous page. null if the requested page is the first page.
        type: string?
      next:
        description: Url to the API holding the next page. null if the requested page is the last page.
        type: string?
      maxPageSize:
        description: Maximum page size, as allowed by the service.
        type: integer

  LocationPostRequest:
    description: Location filter request
    type: object
    properties:
      code:
        type: string[]

  TimeseriesPostRequest:
    description: Timeseries filter request
    type: object
    properties:
      code:
        type: string[]
        description: Array of codes or uuids of timeseries to return. AquaDesk uses uuids.
      start:
        type: date-only
        description: First date of the requested measurements. Format: yyyy-MM-dd.
      end:
        type: date-only
        description: Last date of the requested measurements. Format: yyyy-MM-dd.

# APIs
/datasources:
  description: The Datasources endpoint can return the datasources that the provider offers. Filtering: uuid and name.

About Datasource

DataSource (“bronhouder” in Dutch) objects describe the source of the data. A node can have multiple data sources.

  get:
    queryParameters:
      name:
        required: false
        type: string
        example: AquaDesk DD Primary
      page:
        description: Page number.
        required: false
        type: integer
        minimum: 1
        example: 1
      pageSize:
        description: Page size.
        required: false
        type: integer
        minimum: 1
        maximum: 10000
        example: 10
    responses:
      200:
        body:
          application/json:
            type: DatasourceListResponse
            example: {
              "count": 1,
              "previous": null,
              "next": null,
              "maxPageSize": 100000,
              "results": [
                {
                  "uuid": "978fdf5c-95c8-43a5-82ff-d27d9e6d685f",
                  "name": "AquaDesk DD Primary",
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  }
                }
              ]
            }
      204:
        body:
          application/json:
            type: object

  /{uuid}:
    description: Request a specific datasource by its uuid.
    uriParameters:
      uuid:
        type: string
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
        description: Unique identifier for the datasource. Version 4.
        example: 978fdf5c-95c8-43a5-82ff-d27d9e6d685f
    get:
      responses:
        200:
          body:
            application/json:
              type: Datasource
              example: {
                "uuid": "978fdf5c-95c8-43a5-82ff-d27d9e6d685f",
                "name": "AquaDesk DD Primary",
                "node": {
                  "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                  "name": "AquaDesk Primary",
                  "description": "AquaDesk Primary Node",
                  "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                }
              }
        404:
          body:
            application/json:
              type: object
              example: {"message": "Invalid data source"}

/nodes:
  description: The Nodes endpoint can return the nodes that the provider offers. Filtering: uuid and name.

About Node

Node objects contain the properties of the data node. A node is an operational implementation of the Digital Delta specification.

  get:
    queryParameters:
      name:
        required: false
        type: string
        description: The (partial) name of the node.
        example: AquaDeskPrimaryNode
      page:
        description: Page number.
        required: false
        type: integer
        minimum: 1
        example: 1
      pageSize:
        description: Page size.
        required: false
        type: integer
        minimum: 1
        maximum: 10000
        example: 10
    responses:
      200:
        body:
          application/json:
            type: NodeListResponse
            example: {
              "count": 1,
              "previous": null,
              "next": null,
              "maxPageSize": 100000,
              "results": [
                {
                  "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                  "name": "AquaDeskPrimaryNode",
                  "description": "Primary node for the AquaDesk RWS service.",
                  "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                }
              ]
            }
      204:
        body:
          application/json:
            type: object

  /{uuid}:
    description: Request a specific node by its uuid.
    uriParameters:
      uuid:
        type: string
        description: Unique identifier for the node. Version 4.
        example: f4af47f5-f087-494c-9b2d-ba129bddd545
    get:
      responses:
        200:
          body:
            application/json:
              type: Node
              example: {
                "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                "name": "AquaDeskPrimaryNode",
                "description": "Primary node for the AquaDesk RWS service.",
                "baseUrl": "https://digitaldeltatest.aquadesk.nl"
              }
        404:
          body:
            application/json:
              type: object
              example:
                {"message": "Invalid node source"}

/observationtypes:
  description: The ObservationTypes endpoint can return the observationtypes that the provider offers. Filtering: list of parameters.

About ObservationType

The ObservationType objects describe all attributes to correctly interpret what has been measured, and in what way. It is essential to have the quantity field.

  get:
    queryParameters:
      quantity:
        description: Retrieve only observation types that contain the specified quantity.
        required: false
        type: string
      parameterCode:
        description: Retrieve only observation types that contain the specified parameter code.
        required: false
        type: string
      page:
        description: Page number.
        required: false
        type: integer
        minimum: 1
        example: 1
      pageSize:
        description: Page size.
        required: false
        type: integer
        minimum: 1
        maximum: 10000
        example: 10
    responses:
      200:
        body:
          application/json:
            type: ObservationTypeListResponse
            example: {
              "count": 674,
              "previous": null,
              "next": "https://digitaldeltatest.aquadesk.nl/observationtypes?page=2&pagesize=2",
              "maxPageSize": 100000,
              "results": [
                {
                  "uuid": "1f9f13c0-d45a-4031-9231-09235d81481e",
                  "quantity": "AANTL",
                  "unit": "n/ml",
                  "parameterCode": "Acanthoceras zachariasii",
                  "compartment": "OW",
                  "qualifier": "CE",
                  "observationProcess":
                  {
                    "valuationMethod": "MED"
                  }
                },
                {
                  "uuid": "75c234ef-8182-4948-a593-3c0b4c1a8308",
                  "quantity": "AANTL",
                  "unit": "n/ml",
                  "parameterCode": "Achnanthales",
                  "compartment": "OW",
                  "qualifier": "CE",
                  "extra": [
                    {
                      "key": "taxongroup",
                      "value": "DIATM"
                    },
                    {
                      "key": "type",
                      "value": "Biotaxon"
                    }
                  ]
                }
              ]
            }
      204:
        body:
          application/json:
            type: object

  /{qualifier}:
    description: Request a specific observation type by its qualifier.

      Since almost no specific ObservationTypes for biological entities exist in Aquo, AquaDesk is using uuids instead of the code. The type 'String' is used in both circumstances.
    uriParameters:
      code:
        type: string
        qualifier: The qualifier (or uuid for AquaDesk) identifying the observation type.
        examples: [ "AD", "JU", "T20C", "KO", "BraunBS", "WATSGL", "WATKLM" ]
    get:
      responses:
        200:
          body:
            application/json:
              type: ObservationType
              example: {
                "uuid": "1f9f13c0-d45a-4031-9231-09235d81481e",
                "quantity": "AANTL",
                "unit": "n/ml",
                "parameterCode": "Acanthoceras zachariasii",
                "compartment": "OW",
                "qualifier": "CE",
                "extra": [
                  {
                    "key": "taxongroup",
                    "value": "DIATM"
                  },
                  {
                    "key": "type",
                    "value": "Biotaxon"
                  }
                ]
              }
        404:
          body:
            application/json:
              type: object
              example: {"message": "Invalid observation type source"}

/locations:
  description: The Locations endpoint can return the locations that the provider offers. Filtering: bounding box, uuid, code, name and node.

About Locations

A location object contains all information required to describe a location. This version contains a node.

  get:
    queryParameters:
      boundingBox:
        description: Bounding box representing a rectangle in which the locations must lie. This is represented by 4 doubles, separated by commas.

         Example: boundingBox=minLon,minLat,maxLon,maxLat

          Where:

           minLon: minimum longitude in decimal degrees (WGS84)

           minLat: minimum lattitude in decimal degrees (WGS84)

           maxLon: maximum longitude in decimal degrees (WGS84)

           maxLat: maximum lattitude in decimal degrees (WGS84)

        required: false
        type: string
        example: 4.8,52.0,5.8,54.0
      name:
        required: false
        type: string
        description: (Partial) location name.
        example: NEDHMT
      node:
        required: false
        type: string
        description: Uuid of the node.
        example: f4af47f5-f087-494c-9b2d-ba129bddd545
      code:
        required: false
        type: string
        description: Location code.
        example: NLWATB-RWTS_AFGDM_0001
      page:
        description: Page number.
        required: false
        type: integer
        minimum: 1
        example: 1
      pageSize:
        description: Page size.
        required: false
        type: integer
        minimum: 1
        maximum: 10000
        example: 10
    responses:
      200:
        body:
          application/json:
            type: LocationListResponse
            example: {
              "count": 795,
              "previous": null,
              "next": "https://digitaldeltatest.aquadesk.nl/locations?page=2&pagesize=10",
              "maxPageSize": 100000,
              "results": [
                {
                  "uuid": "ed0655e7-ced5-42ad-ac42-b9b96639307c",
                  "url": "https://digitaldeltatest.aquadesk.nl/locations/ed0655e7-ced5-42ad-ac42-b9b96639307c",
                  "code": "NLWATB-RWTS_AFGDM_0001",
                  "name": "NEDHMT",
                  "geometry": {
                    "type": "Point",
                    "coordinates": [
                      5.15835627200311,
                      51.7581204207227,
                      0
                    ]
                  },
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  }
                },
                {
                  "uuid": "4d58d630-ac4e-4eb3-bff4-1b17c7b77630",
                  "url": "https://digitaldeltatest.aquadesk.nl/locations/4d58d630-ac4e-4eb3-bff4-1b17c7b77630",
                  "code": "NLWATB-RWTS_AFGDM_0002",
                  "name": "VEEN",
                  "geometry": {
                    "type": "Point",
                    "coordinates": [
                      5.11187400090377,
                      51.7800422641779,
                      0
                    ]
                  },
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  }
                }
              ]
            }
      204:
        body:
          application/json:
            type: object

  /{uuid}:
    description: Request a specific location by its uuid.
    uriParameters:
      uuid:
        type: string
        pattern: "[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}"
        description: Unique identifier for the location. Version 4.
        example: ed0655e7-ced5-42ad-ac42-b9b96639307c
    get:
      responses:
        200:
          body:
            application/json:
              type: Location
              example: {
                "uuid": "ed0655e7-ced5-42ad-ac42-b9b96639307c",
                "url": "https://digitaldeltatest.aquadesk.nl/locations/ed0655e7-ced5-42ad-ac42-b9b96639307c",
                "code": "NLWATB-RWTS_AFGDM_0001",
                "name": "NEDHMT",
                "geometry": {
                  "type": "Point",
                  "coordinates": [
                    5.15835627200311,
                    51.7581204207227,
                    0
                  ]
                },
                "node": {
                  "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                  "name": "AquaDesk Primary",
                  "description": "AquaDesk Primary Node",
                  "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                }
              }
        404:
          body:
            application/json:
              type: object
              example: |
                {"message": "Invalid location code"}

  post:
    body:
      application/json:
        type: LocationPostRequest
        example: { code: [ "NLWATB-RWTS_AFGDM_0001", "NLWATB-RWTS_AFGDM_0002"] }
    responses:
      200:
        body:
          application/json:
            type: LocationListResponse
            example: {
              "count": 795,
              "previous": null,
              "next": "https://digitaldeltatest.aquadesk.nl/locations?page=2&pageSize=10",
              "maxPageSize": 100000,
              "results": [
                {
                  "uuid": "ed0655e7-ced5-42ad-ac42-b9b96639307c",
                  "url": "https://digitaldeltatest.aquadesk.nl/locations/ed0655e7-ced5-42ad-ac42-b9b96639307c",
                  "code": "NLWATB-RWTS_AFGDM_0001",
                  "name": "NEDHMT",
                  "geometry": {
                    "type": "Point",
                    "coordinates": [
                      5.15835627200311,
                      51.7581204207227,
                      0
                    ]
                  },
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  }
                },
                {
                  "uuid": "4d58d630-ac4e-4eb3-bff4-1b17c7b77630",
                  "url": "https://digitaldeltatest.aquadesk.nl/locations/4d58d630-ac4e-4eb3-bff4-1b17c7b77630",
                  "code": "NLWATB-RWTS_AFGDM_0002",
                  "name": "VEEN",
                  "geometry": {
                    "type": "Point",
                    "coordinates": [
                      5.11187400090377,
                      51.7800422641779,
                      0
                    ]
                  },
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  }
                }
              ]
            }
      204:
        body:
          application/json:
            type: object

      404:
        body:
          application/json:
            type: object
            example: |
              {"message": "Invalid filters"}

/timeseries:
  description:
    The timeseries endpoint can return both the metadata and the data itself. If a start‐ and endtime is given in the request, the data is added to the response, for both the List and the Detail requests. Furthermore, it is possible to only retrieve the data (without the metadata) by querying the data endpoint: /timeseries/{uuid}/data/.

    Optional: add start and end filter, returns metadata and data (values)

    Filtering: value type, uuid, code, node, timeseries type, observation type, location name, start- and enddate.

About Timeseries

Timeseries objects contain all information needed to interpret timeseries.

    There are references to other objects, such as Node, Location, DataSource, ObservationType and TimeseriesType.

    The TimeseriesType should be added as a reference because it can indicate if a timeseries containts a RAW dataset or makes use of the current measurements.
    The Digital Delta specification of timeseries makes no assumptions on the nature of the series, timeseries may describe any series of data points of the same observation type and datasource in time on one location.

    This includes both equidistant series (fixed time interval between data points) and non-equidistant series (with varying time interval).

Use case:

Imagine a data-source is providing several timeseries for a specific location and observation. For example:

    Waterlevel is measured every 5 minutes for the location Lobith.
    This is the original timeseries from the datasource and we can call it the RAW timeseries or the original timeseries.

    Within the same data-souce, again, waterlevel is measured every 5 minutes for the same location, but this timeseries is a manually or automatically validated timeseries. So in this case we have an original timeseries which is providing the raw data and another timeseries which has been validated. Both timeseries can be required for different purposes.

    Now imagine that someone requires the validated timeseries instead of the original.

    The users should be able to filter them based on this information and retreve data only for this type of timeseries. There are several more uses cases where more than two types are used. Think of timeseries that are recalculated based on validation, interval, aggregation, etc.

    Using TimeseriesType is providing more flexibility in providing multiple timeseries for the same location and observation type provided by a single data-source.

  get:
    queryParameters:
      start:
        type: datetime
        required: false
        description: Retrieve measurements that are measured on or after this date and time.
        example: 2015-01-01T00:00:00Z
      end:
        type: datetime
        required: false
        description: Retrieve measurements that are measured before or on this date and time. Uses the Zulu notation.
        example: 2016-12-31T23:59:59Z
      locationCode:
        type: string
        required: false
        description: Retrieve measurements that were measured at a location with a name like the location code.
        example: VEEN
      observationType:
        type: string
        required: false
        description: Unique identifier of the observation type.
        example: 1f9f13c0-d45a-4031-9231-09235d81481e
      timeseriesType:
        type: string
        required: false
        description: Code of the time series. AquaDesk only supports MEAS.
        example: MEAS
      node:
        required: false
        type: string
        description: Unique identifier of the node.
        example: f4af47f5-f087-494c-9b2d-ba129bddd545
      valueType:
        type: string
        required: false
        description: Value type.
        example: float
      page:
        description: Page number.
        required: false
        type: integer
        minimum: 1
        example: 1
      pageSize:
        description: Page size.
        required: false
        type: integer
        minimum: 1
        maximum: 10000
        example: 10
      qualifier:
        description: Filter for the optional qualifier property.
        required: false
        type: string
        example: H.meting
    responses:
      200:
        body:
          application/json:
            type: TimeseriesListResponse
            example: {
              "count": 48751,
              "previous": null,
              "next": "https://digitaldeltatest.aquadesk.nl/timeseries?page=2&pagesize=2",
              "maxPageSize": 100000,
              "results": [
                {
                  "url": "https://digitaldeltatest.aquadesk.nl/timeseries/e9ede034-f254-4855-b1ea-fe715c382935",
                  "uuid": "e9ede034-f254-4855-b1ea-fe715c382935",
                  "location": {
                    "uuid": "6fba498f-0b59-462b-8c34-bd456d8e7d31",
                    "url": "https://digitaldeltatest.aquadesk.nl/locations/6fba498f-0b59-462b-8c34-bd456d8e7d31",
                    "code": "NLWATB-RWTS_BERMS_0002",
                    "name": "KEIZVR",
                    "geometry": {
                      "type": "Point",
                      "coordinates": [
                        4.89443671141974,
                        51.7201856231622,
                        0
                      ]
                    },
                    "node": {
                      "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                      "name": "AquaDesk Primary",
                      "description": "AquaDesk Primary Node",
                      "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                    }
                  },
                  "observationType": {
                    "uuid": "297d7ba6-d5e0-4683-849a-5246a3aa83c4",
                    "quantity": "AANTL",
                    "unit": "n/ml",
                    "parameterCode": "Achnanthidium",
                    "compartment": "OW",
                    "qualifier": "CE",
                    "extra": [
                      {
                        "key": "taxongroup",
                        "value": "DIATM"
                      },
                      {
                        "key": "type",
                        "value": "Biotaxon"
                      }
                    ]
                  },
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  },
                  "datasource": {
                    "uuid": "978fdf5c-95c8-43a5-82ff-d27d9e6d685f",
                    "name": "AquaDesk Primary",
                    "node": {
                      "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                      "name": "AquaDesk Primary",
                      "description": "AquaDesk Primary Node",
                      "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                    }
                  },
                  "timeseriesType": {
                    "code": "MEAS",
                    "name": "Measurements"
                  },
                  "interval": null,
                  "valueType": "float",
                  "start": "2005-02-14T23:00:00Z",
                  "end": "2005-02-14T23:00:00Z",
                  "events": null
                },
                {
                  "url": "https://digitaldeltatest.aquadesk.nl/timeseries/db9544e4-1eb3-4f99-ac6e-b9c02a7cca88",
                  "uuid": "db9544e4-1eb3-4f99-ac6e-b9c02a7cca88",
                  "location": {
                    "uuid": "6fba498f-0b59-462b-8c34-bd456d8e7d31",
                    "url": \null\,
                    "code": "NLWATB-RWTS_BERMS_0002",
                    "name": "KEIZVR",
                    "geometry": {
                      "type": "Point",
                      "coordinates": [
                        4.89443671141974,
                        51.7201856231622,
                        0
                      ]
                    },
                    "node": {
                      "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                      "name": "AquaDesk Primary",
                      "description": "AquaDesk Primary Node",
                      "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                    }
                  },
                  "observationType": {
                    "uuid": "5cd9726e-7985-4789-9674-22bec8bef325",
                    "quantity": "AANTL",
                    "unit": "n/ml",
                    "parameterCode": "Actinocyclus normanii",
                    "compartment": "OW",
                    "qualifier": "CE"
                  },
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  },
                  "datasource": {
                    "uuid": "978fdf5c-95c8-43a5-82ff-d27d9e6d685f",
                    "name": "AquaDesk Primary",
                    "node": {
                      "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                      "name": "AquaDesk Primary",
                      "description": "AquaDesk Primary Node",
                      "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                    }
                  },
                  "timeseriesType": {
                    "code": "MEAS",
                    "name": "Measurements"
                  },
                  "samplingProcess":
                  {
                    "samplingMethod": "HH-W10A:2010",
                    "samplingProcessingMethod": "I15061.01"
                  },
                  "interval": null,
                  "valueType": "float",
                  "start": "2004-08-30T22:00:00Z",
                  "end": "2004-08-30T22:00:00Z",
                  "events": null
                }
              ]
            }
      204:
        body:
          application/json:
            type: object
      400:
        body:
          application/json:
            type: object
            example: |
              {"message": "Invalid filters"}
  post: # post bodies define filters
    body:
      application/json:
        type: TimeseriesPostRequest
        example: { code: [ "H.Meting" ], start: "2012-01-01", end: "2013-01-01"}
    responses:
      200:
        body:
          application/json:
            type: TimeseriesListResponse
            example: {
              "count": 48751,
              "previous": null,
              "next": "https://digitaldeltatest.aquadesk.nl/timeseries?page=2&pagesize=2",
              "maxPageSize": 100000,
              "results": [
                {
                  "url": "https://digitaldeltatest.aquadesk.nl/timeseries/e9ede034-f254-4855-b1ea-fe715c382935",
                  "uuid": "e9ede034-f254-4855-b1ea-fe715c382935",
                  "location": {
                    "uuid": "6fba498f-0b59-462b-8c34-bd456d8e7d31",
                    "url": "https://digitaldeltatest.aquadesk.nl/locations/6fba498f-0b59-462b-8c34-bd456d8e7d31",
                    "code": "NLWATB-RWTS_BERMS_0002",
                    "name": "KEIZVR",
                    "geometry": {
                      "type": "Point",
                      "coordinates": [
                        4.89443671141974,
                        51.7201856231622,
                        0
                      ]
                    },
                    "node": {
                      "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                      "name": "AquaDesk Primary",
                      "description": "AquaDesk Primary Node",
                      "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                    }
                  },
                  "observationType": {
                    "uuid": "297d7ba6-d5e0-4683-849a-5246a3aa83c4",
                    "quantity": "AANTL",
                    "unit": "n/ml",
                    "parameterCode": "Achnanthidium",
                    "compartment": "OW",
                    "qualifier": "CE",
                    "extra": [
                      {
                        "key": "taxongroup",
                        "value": "DIATM"
                      },
                      {
                        "key": "type",
                        "value": "Biotaxon"
                      }
                    ]
                  },
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  },
                  "datasource": {
                    "uuid": "978fdf5c-95c8-43a5-82ff-d27d9e6d685f",
                    "name": "AquaDesk Primary",
                    "node": {
                      "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                      "name": "AquaDesk Primary",
                      "description": "AquaDesk Primary Node",
                      "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                    }
                  },
                  "timeseriesType": {
                    "code": "MEAS",
                    "name": "Measurements"
                  },
                  "interval": null,
                  "valueType": "float",
                  "start": "2005-02-14T23:00:00Z",
                  "end": "2005-02-14T23:00:00Z",
                  "events": null
                },
                {
                  "url": "https://digitaldeltatest.aquadesk.nl/timeseries/db9544e4-1eb3-4f99-ac6e-b9c02a7cca88",
                  "uuid": "db9544e4-1eb3-4f99-ac6e-b9c02a7cca88",
                  "location": {
                    "uuid": "6fba498f-0b59-462b-8c34-bd456d8e7d31",
                    "url": \null\,
                    "code": "NLWATB-RWTS_BERMS_0002",
                    "name": "KEIZVR",
                    "geometry": {
                      "type": "Point",
                      "coordinates": [
                        4.89443671141974,
                        51.7201856231622,
                        0
                      ]
                    },
                    "node": {
                      "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                      "name": "AquaDesk Primary",
                      "description": "AquaDesk Primary Node",
                      "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                    }
                  },
                  "observationType": {
                    "uuid": "5cd9726e-7985-4789-9674-22bec8bef325",
                    "quantity": "AANTL",
                    "unit": "n/ml",
                    "parameterCode": "Actinocyclus normanii",
                    "compartment": "OW",
                    "qualifier": "CE",
                    "extra": [
                      {
                        "key": "taxongroup",
                        "value": "DIATM"
                      },
                      {
                        "key": "type",
                        "value": "Biotaxon"
                      }
                    ]
                  },
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  },
                  "datasource": {
                    "uuid": "978fdf5c-95c8-43a5-82ff-d27d9e6d685f",
                    "name": "AquaDesk Primary",
                    "node": {
                      "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                      "name": "AquaDesk Primary",
                      "description": "AquaDesk Primary Node",
                      "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                    }
                  },
                  "timeseriesType": {
                    "code": "MEAS",
                    "name": "Measurements"
                  },
                  "interval": null,
                  "valueType": "float",
                  "start": "2004-08-30T22:00:00Z",
                  "end": "2004-08-30T22:00:00Z",
                  "events": null
                }
              ]
            }
      204:
        body:
          application/json:
            type: object

      400:
        body:
          application/json:
            type: object
            example: |
              {"message": "Invalid filters"}

  /{uuid}:
    description: Get the data of one timeseries, including metadata.
    uriParameters:
      uuid:
        type: string
        description: Unique identifier for the timeseries. Version 4.
        example: db9544e4-1eb3-4f99-ac6e-b9c02a7cca88
    get:
      responses:
        200:
          body:
            application/json:
              type: Timeseries
              example: {
                "url": "https://digitaldeltatest.aquadesk.nl/timeseries/db9544e4-1eb3-4f99-ac6e-b9c02a7cca88",
                "uuid": "db9544e4-1eb3-4f99-ac6e-b9c02a7cca88",
                "location": {
                  "uuid": "6fba498f-0b59-462b-8c34-bd456d8e7d31",
                  "url": "https://digitaldeltatest.aquadesk.nl/locations/6fba498f-0b59-462b-8c34-bd456d8e7d31",
                  "code": "NLWATB-RWTS_BERMS_0002",
                  "name": "KEIZVR",
                  "geometry": {
                    "type": "Point",
                    "coordinates": [
                      4.89443671141974,
                      51.7201856231622,
                      0
                    ]
                  },
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  }
                },
                "observationType": {
                  "uuid": "5cd9726e-7985-4789-9674-22bec8bef325",
                  "quantity": "AANTL",
                  "unit": "n/ml",
                  "parameterCode": "Actinocyclus normanii",
                  "compartment": "OW",
                  "qualifier": "CE",
                  "extra": [
                    {
                      "key": "taxongroup",
                      "value": "DIATM"
                    },
                    {
                      "key": "type",
                      "value": "Biotaxon"
                    }
                  ]
                },
                "node": {
                  "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                  "name": "AquaDesk Primary",
                  "description": "AquaDesk Primary Node",
                  "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                },
                "datasource": {
                  "uuid": "978fdf5c-95c8-43a5-82ff-d27d9e6d685f",
                  "name": "AquaDesk Primary",
                  "node": {
                    "uuid": "f4af47f5-f087-494c-9b2d-ba129bddd545",
                    "name": "AquaDesk Primary",
                    "description": "AquaDesk Primary Node",
                    "baseUrl": "https://digitaldeltatest.aquadesk.nl"
                  }
                },
                "timeseriesType": {
                  "code": "MEAS",
                  "name": "Measurements"
                },
                "interval": null,
                "valueType": "float",
                "start": "2004-08-30T22:00:00Z",
                "end": "2004-08-30T22:00:00Z",
                "events": [
                  {
                    "value": 13.81,
                    "timeStamp": "2004-08-30T22:00:00Z"
                  }
                ]
              }
        204:
          body:
            application/json:
              type: object
        400:
          body:
            application/json:
              type: object
              example: |
                {"message": "Invalid time series"}

    /data:
      description: Get the detail data for the specified timeseries, excluding metadata.
      get:
        queryParameters:
          start:
            type: date-only
            required: false
            example: 2016-01-01
            description: Format: yyyy-MM-dd.
          end:
            type: date-only
            required: false
            example: 2016-12-31
            description: Format: yyyy-MM-dd.
        responses:
          200:
            body:
              application/json:
                type: Event[]
                example: [
                  {
                    "value": 13.81,
                    "timeStamp": "2004-08-30T22:00:00Z",
                    "quality": "",
                    "limitSymbol": null
                  }
                ]
          400:
            body:
              application/json:
                type: object
                example: |
                  {"message": "Invalid time series"}