You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Export timeseries to the Dijkdata Service Center (DDSC). NOT YET AVAILABLE.

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.

Creating locations:

 

POST https://api.ddsc.nl/api/v2/locations/ HTTP/1.1

Host: api.ddsc.nl
Accept: application/json, text/javascript
{
    "name": "Test",
   "organisation": "Deltares",
    "organisation_code": "deltares_organisation_code",
    "geometry": null,
    "access_modifier": 0,
    "ddsc_icon_url": "",
    "ddsc_show_on_map": false,
    "extra_metadata": null
}

 

A uuid of the location is returned.  uuidlocation

 

Creating a new timeseries for storing events"

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":1,
    "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:

[
  {"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: 

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.

 

 

  • No labels