REST API

Parameters 

    https://api.iwqis.iowawis.org/v1/params

    https://api.iwqis.iowawis.org/v1/params/discharge (for a specific parameter, discharge here)

Sites

    https://api.iwqis.iowawis.org/v1/sites

    https://api.iwqis.iowawis.org/v1/sites/WQS0020 (for a specific site, WQS0020 here)

 

Latest value

   

Returned JSON
 [{
                "measure_uid": 86164,
                "editor_uid": "iihr",
                "param_uid": "discharge",
                "method_uid": null,
                "site_uid": "WQS0020",
                "datetime": "2017-04-19T14:45:00.000Z",
                "value": 121356,
                "private": false
    }, {
                "measure_uid": 86168,
                "editor_uid": "iihr",
                "param_uid": "yield",
                "method_uid": null,
                "site_uid": "WQS0020",
                "datetime": "2017-04-19T14:45:00.000Z",
                "value": 0.03471,
                "private": false
    }, {
                "measure_uid": 85798,
                "editor_uid": "iihr",
                "param_uid": "nitrate_con",
                "method_uid": "nitratax",
                "site_uid": "WQS0020",
                "datetime": "2017-04-19T15:30:00.000Z",
                "value": 3.39,
                "private": false
    }, {
                "measure_uid": 86165,
                "editor_uid": "iihr",
                "param_uid": "load",
                "method_uid": null,
                "site_uid": "WQS0020",
                "datetime": "2017-04-19T14:45:00.000Z",
                "value": 2205890,
                "private": false
    }]

 

Get Values with Time range

We have two others endpoints that give hourly and daily aggregates. Since we are dealing with dense time series (with a fixed timestep), I use a compact storage for the time serie data. An hourly resource represent one day of hourly data as an array of 24 values. A daily resource represent one year of daily data as an array of 365/366 values.

   

    https://api.iwqis.iowawis.org/v1/hourly?site_uid=WQS0020&begin=2017-04-01&end=2017-04-20

   

    where "begin" and "end" dates are in YYYY-MM-DD format.

   

    https://api.iwqis.iowawis.org/v1/daily?site_uid=WQS0020&param_uid=discharge&begin=2016&end=2017

   

    where "begin" and "end" are YYYY.

 

Emails

 

Hi Sam,

 

Thanks very much for the detailed email – very helpful!  Looks to me like it is very user friendly.

 

I only have one question at the moment: are there parameters that can be added to the data endpoints or another endpoint other than https://api.iwqis.iowawis.org/v1/latest that provides historical data?

 

Thanks much,

Marcus

 

 

--

Marcus Slavenas

Research Programmer, NCSA, ISDA

(217) 244-0774

 

 

On 4/20/17, 11:19 AM, "Debionne, Samuel H P" <samuel-debionne@uiowa.edu> wrote:

 

    Hi Marcus,

   

    The IWQIS API is an industry standard implementation of a REST service, so hopefully should be user-friendly. The API, which is not public , was designed to be consumed by front-end web applications and not as a typical data retrieval web service (e.g. NWIS).

   

    The description of the parameters available in the system (the params resource) can be retrieved using this endpoint:

   

    https://api.iwqis.iowawis.org/v1/params

    https://api.iwqis.iowawis.org/v1/params/discharge (for a specific parameter, discharge here)

   

    Same idea for the available sites (the sites resource):

   

    https://api.iwqis.iowawis.org/v1/sites

    https://api.iwqis.iowawis.org/v1/sites/WQS0020 (for a specific site, WQS0020 here)

   

    Then for a given site and parameter, the latest values can be retrieve using:

   

    https://api.iwqis.iowawis.org/v1/latest?site_uid=WQS0020&param_uid=discharge

   

    To get all the latest values at WQS0020, one would use:

   

    https://api.iwqis.iowawis.org/v1/latest?site_uid=WQS0020

   

    that returns:

   

    [{

                "measure_uid": 86164,

                "editor_uid": "iihr",

                "param_uid": "discharge",

                "method_uid": null,

                "site_uid": "WQS0020",

                "datetime": "2017-04-19T14:45:00.000Z",

                "value": 121356,

                "private": false

    }, {

                "measure_uid": 86168,

                "editor_uid": "iihr",

                "param_uid": "yield",

                "method_uid": null,

                "site_uid": "WQS0020",

                "datetime": "2017-04-19T14:45:00.000Z",

                "value": 0.03471,

                "private": false

    }, {

                "measure_uid": 85798,

                "editor_uid": "iihr",

                "param_uid": "nitrate_con",

                "method_uid": "nitratax",

                "site_uid": "WQS0020",

                "datetime": "2017-04-19T15:30:00.000Z",

                "value": 3.39,

                "private": false

    }, {

                "measure_uid": 86165,

                "editor_uid": "iihr",

                "param_uid": "load",

                "method_uid": null,

                "site_uid": "WQS0020",

                "datetime": "2017-04-19T14:45:00.000Z",

                "value": 2205890,

                "private": false

    }]

   

    Eventually, some parameters (e.g. water temperature) may be measured using different methods, so you would get two latest values for a parameter (param_uid) but with different methods (method_uid).

   

    Do not expect the number of parameters available at a given site to be fixed: if a parameter is out of range or a sensor pulled out of the water, the corresponding parameters will  not be listed in the latest resource. The "latest" resource keeps only a 5 days history, eg the value is the latest within the last 5 days period.

   

    Hoping that helps and let me know if you have any questions,

    Sam

   

    > -----Original Message-----

    > From: Ted Kratschmer [mailto:EKratsch@lc.edu]

    > Sent: Thursday, April 20, 2017 8:43 AM

    > To: Jones, Christopher S <christopher-s-jones@uiowa.edu>; Slavenas,

    > Marcus C (slavenas@illinois.edu) <slavenas@illinois.edu>

    > Cc: Debionne, Samuel H P <samuel-debionne@uiowa.edu>;

    > sbrad77@illinois.edu; Lee, Jong Sung (jonglee1@illinois.edu)

    > <jonglee1@illinois.edu>

    > Subject: RE: developer

    >

    > Hi Chris- Yes, we do. Marcus Slavenas is copied on this message, and is our

    > data ingestion guru.

    >

    >

    >

    > Thanks,

    >

    > Ted

    >

    >

    >

    > From: Jones, Christopher S [mailto:christopher-s-jones@uiowa.edu]

    > Sent: Thursday, April 20, 2017 7:50 AM

    > To: Ted Kratschmer

    > Cc: Debionne, Samuel H P

    > Subject: developer

    >

    >

    >

    > Ted do you have a developer that knows a bit about REST, endpoints,

    > resources, that can connect with our guy to resolve the remaining data

    > transfer issues?

    >

    >

    >

    > ________________________________

    >

    > This communication, along with any attachments, is covered by federal and

    > state law governing electronic communications and may contain confidential

    > and legally privileged information. If the reader of this message is not the

    > intended recipient, you are hereby notified that any dissemination,

    > distribution, use or copying of this message is strictly prohibited. If you have

    > received this in error, please reply immediately to the sender and delete this

    > message. Thank you.

   

 

  • No labels