Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

See: https://portal.ddsc.nl/

For documentation on the API see: https://ddsc.lizard.net/doc/api.html

To import data into the DDSC service locations and timeseries have to be created first.

...

A uuid of the location is returned.  uuidlocation

 

Creating a new timeseries for storing events"

Code Block
POST https://api.ddsc.nl/api/v2/timeseries/
{
    "name": "Locatie1",
    "description": "",
    "location": uuidlocation,
    "organisation_code": "deltares_organisation_code",
    "device": "",
    "supplier": jane.doe,
    "supplier_code": "12345",
    "access_modifier": null,
    "value_type":21,
    "parameter_referenced_unit": 1,
    "threshold_min_soft": null,
    "threshold_min_hard": null,
    "threshold_max_soft": null,
    "threshold_max_hard": null,
}


 

The result of this post returns the uuid of this timeseries.

 

Posting events to the timeseries can be done with:

POST https://api.ddsc.nl/api/v2/timeseries/(uuid: uuid)/data/

Where uuid is the uuid of the timeseries.

 

The POST content can be JSON according the following format:

Code Block
[
  {"value": "2.0123", "datetime": "2013-02-12T09:56:12Z"},
  {"value": "2.0123", "datetime": "2013-02-13T09:56:12Z"},
  ...
]


 

For posting to image a new timeseries of value type 5 has to be created where the uuid of the location is specified. This way they can be related to each other.

Creating an "image" time series can be done as follows: 

Code Block

POST https://api.ddsc.nl/api/v2/timeseries/
{
    "name": "Locatie1",
    "description": "",
    "location": uuidlocation,
    "organisation_code": "1234567",
    "device": "",
    "supplier": jane.doe,
    "supplier_code": "12345",
    "access_modifier": null,
    "value_type":5,
    "parameter_referenced_unit": 1,
    "threshold_min_soft": null,
    "threshold_min_hard": null,
    "threshold_max_soft": null,
    "threshold_max_hard": null,
}

The uuid of this series is returned.

The images can now be posted to:

POST https://api.ddsc.nl/api/v2/timeseries/(uuid: uuid)/data/

In the header user name and password should be specified and datetime as well. Only one image per datetime can be posted.