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

Compare with Current View Page History

Version 1 Next »

Export timeseries to the Dijkdata Service Center (DDSC). 

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

 

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

 

Aanmaken van een nieuwe tijdserie voor het opslaan van events (timesteps met floatvalues). Is het correct dat ik daarvoor value type 12 voor moet gebruiken?

 

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

    "parameter_referenced_unit": 1,

    "threshold_min_soft": null,

    "threshold_min_hard": null,

    "threshold_max_soft": null,

    "threshold_max_hard": null,

}

 

Het resultaat van de post geeft mij een uuid terug voor de tijdserie.

 

Vervolgens wil ik events toevoegen aan deze tijdserie. De documentatie is niet geheel duidelijk hoe ik dat zou moeten. Uit jouw eerder mail begrijp ik dat dat als volgt kan:

 

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"},

  …

]

 

 

Om nu een afbeelding te kunnen koppelen aan deze locatie, moet ik een nieuwe tijdserie aanmaken met value_type: 5. Door dezelfde location id door te sturen, worden deze aan elkaar gelinked.

 

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,

}

 

 

Vervolgens moet ik het image kunnen posten naar deze tijdseries.

 

Zou je nog een voorbeeld kunnen geven hoe dat moet? Dat kan ik niet terugvinden in de documentatie.

 

Groeten,

 

Rudie Ekkelenkamp

 

  • No labels