...
FEWS PI REST Web Service API
GET
...
timezoneid
Get the displaysgroups for a certain topology nodeID of Configured timezone for the webservice.
Request parameters
- nodeId: the id of the topology node)
- timeZero: the timezero for which the displaysgroups should be requested. If this parameter is ommitted the time zero will be assumed equal to the current system time
firstValueTimefirstValueTime
...
- not applicable
Response
- String representation of time zone.
Example request
Code Block |
---|
curl "http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/topology/actions?nodeId=groupNodeA&timeZero=2014-01-01T00:00:00Ztimezoneid" |
Example response
The response is always in JSON. Below an example.
Code Block |
---|
GMT |
GET filters
Retrieve Pi Filters configuration.
Request parameters
- filterId (string): Subset filter id.
- documentVersion (string): File format version.
- documentFormat (string): PI_XML (default) or PI_JSON
Response
- Filters PI-XML or PI-JSON file content.
Example request
Code Block |
---|
curl "http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/filters"
|
Example PI-XML response
Code Block |
---|
<?xml version="1.0" encoding="UTF-8"?>
<filters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.wldelft.nl/fews/PI" xsi:schemaLocation="http://www.wldelft.nl/fews/PI http://fews.wldelft.nl/schemas/version1.0/pi-schemas/pi_filter.xsd" version="1.23">
<filter id="Countries"> |
Code Block |
{ "results" : [ { "type" : "PI", "requests" : [ { "key" : "....", "request" : "rest/fewspiservice/v1/timeseries?timeSeriesType=EXTERNAL_FORECASTING&locationIds=amerongen_beneden¶meterIds=Q.voorspeld&moduleInstanceIds=Forecast&qualifierIds=NONE&timeStepId=PT10M&endForecastTime=2014-01-01T00%3A00%3A00Z&useDisplayUnits=true&documentFormat=PI_JSON" } ], "config" : { "timeSeriesDisplay" : {<name>Countries</name> "title" : "no name",<description></description> "subplots" : [ { "items" : [ {<child id="All"> "type" : "line",<name>All</name> "legend" : "Q.voorspeld",<description></description> "color" : "#0000ff",</child> <child "lineStyle" : "solid",id="Netherlands"> "lineWidth" : 1.0,<name>Netherlands</name> "locationId" : "amerongen_beneden",<description></description> "yAxis" : {</child> "axisPosition" : "left", "axisLabel" : "Afvoer (m3/s)" }, "request" : "...." } ] } ] } } } ] } |
GET timezoneid
Get ID of Configured timezone for the webservice.
Request parameters
- not applicable
Response
- String representation of time zone.
Example request
Code Block |
---|
curl "http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/timezoneid"
|
Example response
Code Block |
---|
GMT |
GET filters
Retrieve Pi Filters configuration.
</filter>
</filters> |
GET filters/actions (2022.02)
Retrieve a json-file which contains the request by which the selected time series from the filter can be retrieved from the database. In addition, detailed information about how to display the time series will be returned.
Request parameters
- filterId (string): Subset
- filter id .
- , documentVersion
- parameterGroupId (string): File format version.documentFormat
- parameter group id,
- parameterIds (string): PI_XML (default) or PI_JSON
Response
- one or more parameter ids,
- locationIds (string): one or more location ids,
- timeZero (string): the time zero for which the requests to retrieve the time series will be generated.
Response
- Actions for the selected time series from the provided filter Filters PI-XML or PI-JSON file content.
Example request
Code Block |
---|
curl "http://localhost:808063178/FewsWebServices/rest/fewspiservice/v1/filters" |
Example PI-XML response
/actions?parameterIds=Q.voorspeld&filterId=discharge&timeZero=2014-01-01T00:00:00Z&locationIds=amerongen_boven"
|
GET topology/actions (since 2022.01)
Get the displaysgroups for a certain topology node
Request parameters
- nodeId: the id of the topology node)
- timeZero: the timezero for which the displaysgroups should be requested. If this parameter is ommitted the time zero will be assumed equal to the current system time
firstValueTimefirstValueTime
Example requestfirstValueTime
Code Block |
---|
curl "http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/topology/actions?nodeId=groupNodeA&timeZero=2014-01-01T00:00:00Z"
|
Example response
The response is always in JSON. Below an example.
Code Block |
---|
{
"results" : [ {
"type" : "PI",
"requests" : [ { |
Code Block |
<?xml version="1.0" encoding="UTF-8"?> <filters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.wldelft.nl/fews/PI" xsi:schemaLocation="http://www.wldelft.nl/fews/PI http://fews.wldelft.nl/schemas/version1.0/pi-schemas/pi_filter.xsd" version="1.23"> <filter id="Countries"> <name>Countries</name> <description></description> "key" : <child id="All">"....", "request" <name>All</name> <description></description> </child> <child id="Netherlands"> : "rest/fewspiservice/v1/timeseries?timeSeriesType=EXTERNAL_FORECASTING&locationIds=amerongen_beneden¶meterIds=Q.voorspeld&moduleInstanceIds=Forecast&qualifierIds=NONE&timeStepId=PT10M&endForecastTime=2014-01-01T00%3A00%3A00Z&useDisplayUnits=true&documentFormat=PI_JSON" } ], "config" : { "timeSeriesDisplay" : { "title" : "no name", "subplots" <name>Netherlands</name>: [ { "items" : [ <description></description>{ </child> </filter> </filters> |
GET filters/actions (2022.02)
Retrieve a json-file which contains the request by which the selected time series from the filter can be retrieved from the database. In addition, detailed information about how to display the time series will be returned.
Request parameters
- filterId (string): filter id,
- parameterGroupId (string): parameter group id,
- parameterIds (string): one or more parameter ids,
- locationIds (string): one or more location ids,
- timeZero (string): the time zero for which the requests to retrieve the time series will be generated.
Response
- Actions for the selected time series from the provided filter
Example request
Code Block |
---|
curl "http://localhost:63178/FewsWebServices/rest/fewspiservice/v1/filters/actions?parameterIds=Q.voorspeld&filterId=discharge&timeZero=2014-01-01T00:00:00Z&locationIds=amerongen_boven" "type" : "line", "legend" : "Q.voorspeld", "color" : "#0000ff", "lineStyle" : "solid", "lineWidth" : 1.0, "locationId" : "amerongen_beneden", "yAxis" : { "axisPosition" : "left", "axisLabel" : "Afvoer (m3/s)" }, "request" : "...." } ] } ] } } } ] } |
GET locations
Retrieve Pi Locations file containing all locations that are available for the passed 'filterId' argument. If not filterId is passed then all locations configured in the pre-defined filter will be returned. The geoDatum used in the response is determined by the geoDatum configured in the locations.xml.
...