Data Web Services

Web Services for Automated Data Retrieval

Northern Water provides Kisters Water Information System (KiWIS) Web Services for users who require automated data retrieval in a variety of formats, including CSV, ASCII, HTML and XLSX. These services allow direct access to both timeseries and discrete water quality data. Users can find examples of commonly used queries on this page, broken into two sections; timeseries and water quality data types. In addition, additional configuration options and full service documentation are available through the KiWIS request information page.

Timeseries Data Structure and Examples

Northern Water's API structure follows the database's hierarchical structure and consists of three main levels: Station, Parameter and Timeseries. Calls are typically structured as either a discovery query, where the upper hierarchy is used, or a result query, where timeseries values are used. 

  • Station – A specific monitoring location within a site. Stations have unique names and numbers and represent distinct physical or analytical locations. 
  • Parameter – A measured variable at a station, such as Water Temperature (WT) or Flow (Q). 
  • Timeseries – A dataset associated with a parameter, often separate timeseries are available for multiple intervals (e.g., 15-minute and daily).  
Water droplet with data numbers inside it sitting on a blue background.

Web Service Query Examples

Get Station List

This query returns metadata for all stations, including stations with timeseries data and water quality data. The parameter request=getStationList retrieves all stations because no Site_no is specified. The format= field controls the output type, and returnfields= limits the columns returned. Setting AddLinks=TRUE adds hyperlinks to additional information, including:

To view all metadata and custom attributes at the station level, add ca_sta argument.

Get Timeseries List

Changing the request to request=getTimeseriesList returns all parameters and timeseries associated with a specific station. The added metadata field “coverage” provides the period of record of datya availability for that timeseries. Adding dateformat=yyyy-MM-dd HH:mm:ss standardizes date formatting. When AddLinks=TRUE, the response includes hyperlinks to graphs and time series lists for various time periods.

Get Timeseries Values 

To retrieve values, use the request: request=getTimeseriesValues. Specify the desired timeseries using the unique timeseries ID number ts_id= that was returned in the getTimeseriesList call. Time periods may be defined using: 

The following combinnations of time periods can be requested. 

Time Period PromptResults
from + towill search the requested range
from + periodwill search the given period starting at the from date
to + periodwill search the given period backdating from the to date
periodwill search the given period backdating from the current system time
period=completewill search the complete coverage
fromwill search all data starting at the given from date until the current system time
towill search all data until the given to date


Add metadata=true and specify metadata fields with md_returnfields=. 

The above query is requesting html data (format=html) for the timeseries values (request=getTimeseriesValues) for the timeseries EI-GLU Discharge (ts_id=28720010), for the last 30 days (period=P30d), with metadata included and the date following a YYYY-MM-DD HH:mm:ss format.

To include data quality and remarks, specify returnfields= and include:

Water Quality Data Structure and Examples

Northern Water's Water Quality API and database follows a hierarchical structure consisting of seven levels: Monitoring Program, Station, Sampling Event, Sample Location, Sample, Sample Result. 

  • Monitoring Program – Groups of stations and for which data is collected for a program specific goal, such as baseline monitoring, or NISP compliance monitoring.
  • Station – A specific monitoring location. Stations have unique names and numbers and represent distinct physical or analytical locations. 
  • Sampling Event – Specific date of field staff visiting a station per monitoring program guidelines.
  • Sample Location – Categories of sample position. These groupings include flowing to represent near surface samples in rivers and streams, reservoir locations include Surface, Bottom, Secchi and physical are their own groupings API, is this wqm_spot_label.
  • Sample – Within a sampling event, a sample represents a unique discrete sample physically collected in the field (including some QA samples such as SQR’s etc). If a sample has any indicated “replicate” samples, these represent duplicate lab analysis of the original sample. Replicates can be identified in the column sample_consecutive_no. 
  • Sample Result – A individual station, datetime, constituent and method combination within a sample bottle. 
Get Water Quality Measuring Program List

The request=getWqmMeasuringProgramList returns all stations with discrete sample values. 

Get Water Quality Discrete Station List

The request=getWqmStationList returns all stations with discrete sample values. Use returnfields= to limit the output. 

Get Sample Values

To retrieve discrete water quality sample values, change the request to request=getSampleValues, and you will need to enter the station_no= to return values and metadata. Use dateformat= to standardize timestamps. 

To include all recommended Northern Water metadata, make sure queries include:

  • station_name- name of the station
  • sample_timestamp- date and time when the sample was collected
  • parametertype_name - constituent name
  • wqm_trace_no – Northern Water sampling event number consisting of the unique station ID and datetime combination for the sample
  • wqm_spot_label- Location of sample collection
  • sample_depth- Depth of sample, if a composite sample, start depth in interval
  • sample_final_depth- Final depth if a composite sample, bottom depth in interval
  • value_sign – shows if sample value is less than minimum detection limit (MDL)
  • value - reported value for the timestamp
  • unit_symbol – unit symbol associated with sample value
  • value_labcode- descriptive laboratory flag individual sample results

sample_consecutive_no – numeric indicator of replicate sample 

  • sample_no - sample number where replicate type (SQR/CR) is indicated
  • value_stdremark –standard remarks associated with the sample value
  • value_remark- free comment associated with the sample value 
  • value_quality- quality code associated with sample value 
  • value_lower_dlimit – laboratory detection limit
  • laboratory_name – name of the laboratory conducting the analysis
  • value_labcomment – free comment from the laboratory associated with sample analysis
  • is_replicate- numeric indicator for lab duplicate. Original is a 1, lab dup is a 2

Other fields that may be of interest:

  • ca_wqmsample – returns all custom attributes built for northern water; including sampling equipment and wind and sky conditions. 
  • wqm_trace_team- Sampling Team