...
GET all configured rating curves from the region config and optionally filter by locationIds.
Request parameters
- documentVersion (string): only PI_XML or PI_JSON is supported.
- locationIds (string, optional): one or more locationIds for which to retrieve the rating curves.
...
Code Block |
---|
<?xml version="1.0" encoding="UTF-8"?> <RatingCurves xmlns="http://www.wldelft.nl/fews/PI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews/PI http://fews.wldelft.nl/schemas/version1.0/pi-schemas/pi_ratingcurves.xsd"> <timeZone>0.0</timeZone> <ratingCurve> <header> <locationId>ALKA2</locationId> <startDate date="2012-01-01" time="00:00:00"/> <endDate date="2012-11-21" time="00:00:00"/> <stationName>ALKA2</stationName> <stageUnit>FT</stageUnit> <dischargeUnit>CFS</dischargeUnit> <comment>Sep07 88.88 199 kcfs</comment> </header> <table> <interpolationMethod>logarithmic</interpolationMethod> <minStage>64.9</minStage> <maxStage>INF</maxStage> <row stage="64.9" discharge="2990.3328"/> <row stage="65.1" discharge="3280.365"/> <row stage="65.4" discharge="3740.4165"/> <row stage="65.700004" discharge="4240.472"/> </table> </ratingCurve> </RatingCurves> |
POST /ratingcurves/stagetodischarge(2022.02)
POST Converts stage values to discharge values using a rating curve at a specific location. The stageValues should be passed in the body of the POST request as a key value pair where the key is dischargeValue and the value is URL Encoded JSON that conforms to the pi_rest_ratingcurves_stage.json schema: https://fewsdocs.deltares.nl/webservices/rest-api/v1/schemas/pirest/pi_rest_ratingcurves_stage.json
Request parameters
- documentVersion (string): only PI_XML is supported.
- locationId (string, required): Location id for which to calculate the discharge.
Body parameters
stageValues (json string, required): Stage values in JSON format that conforms to the schema: https://fewsdocs.deltares.nl/webservices/rest-api/v1/schemas/pirest/pi_rest_ratingcurves_stage.json. Example: { "stageValues" : [ "22.1", "22.2" ] }:
Code Block { "stageValues" : [ "22.1", "22.2" ] }
Response
- PI_JSON response with rating curves.
Example request
Code Block |
---|
curl "http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/ratingcurves/stagetodischarge"
|
Example PI-XML response
Code Block |
---|
{ "dischargeValues" : [ "9920.0", "10200.0" ] }
|
POST ratingcurves/dischargetostage (2022.02)
Converts stage values to discharge values using a rating curve at a specific location. The stageValues should be passed in the body of the POST request as a key value pair where the key is dischargeValue and the value is URL Encoded JSON that conforms to the pi_rest_ratingcurves_stage.json schema: https://fewsdocs.deltares.nl/webservices/rest-api/v1/schemas/pirest/pi_rest_ratingcurves_stage.json.
Request parameters
- documentVersion (string): only PI_XML is supported.
- locationId (string, required): Location id for which to calculate the discharge.
Body parameters
stageValues (json string, required): Stage values in JSON format that conforms to the schema: https://fewsdocs.deltares.nl/webservices/rest-api/v1/schemas/pirest/pi_rest_ratingcurves_stage.json. Example: { "stageValues" : [ "22.1", "22.2" ] }:
Code Block { "dischargeValues" : [ "9920.0", "10200.0" ] }
Response
- PI_JSON response with rating curves.
Example request
Code Block |
---|
curl "http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/ratingcurves/stagetodischarge"
|
Example PI-XML response
Code Block |
---|
{ "stageValues" : [ "22.1", "22.2" ] } |
GET warmstates/times (2022.02)
...
- moduleInstanceIds(string): one or more module instance ids.
Response
- PI_JSON response with state times per module instance ids
Example request
Code Block |
---|
curl "http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/warmstates/times?moduleInstanceIds=moduleInstanceId1" |
Example PI-XML response
Code Block | ||
---|---|---|
| ||
{ "warmStateTimes" : [ { "moduleInstanceId" : "moduleInstanceId1", "times" : [ "1970-01-01T00:57:04Z", "1970-01-01T01:12:32Z" ] } ] } |
...
- moduleInstanceId (string, required): .
- stateTime (string, required): state time. For example: 2020-03-18T15:00:00Z
Response
- binary zip file.
Example request
Code Block |
---|
curl "http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/warmstates?moduleInstanceId=moduleInstanceId1&stateTime=2020-03-18T15:00:00Z" |
...
GET the system time as configured in the Operator Client of Stand Alone
Request parameters
- documentFormat (string): TEXT (default) or PI_JSON
Response
- text response with the actual system time. Format: yyyy-MM-ddTHH:mm:ssZ
Example request
Code Block |
---|
curl "http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/systemtime" |
...
Get the last time the timeseries were updated in the Operator Client or a Stand Alone
Request parameters
- documentFormat (string): TEXT (default) or PI_JSON
Response
- text response with the last update time. Format: yyyy-MM-ddTHH:mm:ssZ
Example request
Code Block |
---|
curl "http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/lastupdatetime" |
...
Get the currently selected topology node id in the Operator Client or a Stand Alone
Request parameters
- documentFormat (string): PI_JSON
Response
- PI_JSON response
Example request
Code Block |
---|
curl "http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/topology/selected" |
...
Get the currently selected parameter ids in the Operator Client or a Stand Alone
Request parameters
- documentFormat (string): PI_JSON
Response
- PI_JSON response
Example request
Code Block |
---|
curl "http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/parameters/selected" |
...
GET the system time as configured in the Operator Client of Stand Alone
Request parameters
- documentFormat (string): PI_JSON
Response
- PI_JSON response
Example request
Code Block |
---|
curl "http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/filters/selected" |
...
Get the currently selected location ids in the Operator Client or a Stand Alone
Request parameters
- documentFormat (string): PI_JSON
Response
- PI_JSON
Example request
Code Block |
---|
curl "http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/locations/selected" |
...
Get the time series for the selected topology node
Request parameters
- documentFormat (string): PI_XML (default) or PI_JSON
- topologyNodeId (string): Id of the topology node for which the time series will be returned.
- timeZero (date): time zero in format: yyyy-MM-ddTHH:mm:ssZ
- startTime (date): Optional startTime for the requested period in format: yyyy-MM-ddTHH:mm:ssZ. If not set, the start time of the zoom period in the first time series dialog will be used.
- endTime (date): Optional endTime for the requested period in format: yyyy-MM-ddTHH:mm:ssZ. If not set, the end time of the zoom period in the first time series dialog will be used.
- thresholdsVisible (boolean): Set to true to make thresholds visible.
- omitMissing (boolean): Toggle omitting or returning of missing values in response. Default is true
- useDisplayUnits (boolean): Set to true to use display units
- convertDatum (boolean): Set to true to convert datum
- documentVersion (string): Document Version
Response
- Timeseries in PI_XML or PI_JSON format
Example request
Code Block |
---|
curl "http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/timeseries/topology/node" |
...