Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
curl "http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/warmstates?moduleInstanceId=moduleInstanceId1&stateTime=2020-03-18T15:00:00Z" 


GET whatifscenarios (2024.01)

Get either all whatIf scenraios, or, all what if scenarios that have the requested what if template id.

Request parameters

  • whatIfTemplateId (string): what if template id

Example request

Code Block
"http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/whatifscenarios?whatIfTemplateId=templateId


Response

Code Block
{
  "whatIfScenarioDescriptors" : [ {
    "id" : "userId",
    "name" : "Test whatif name",
    "whatIfTemplateId" : "whatif_properties",
    "parentWhatIfId" : null
  } ]
}


GET resources/static/{path}/{resourceId} (2023.02)

...

  • path (string, optional): One or more subfolders.
  • resourceId (string, required): name of a resource in the WebResourceFiles config folder.

Response

    • The content of the resource.

Example request

Code Block
curl "http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/resources/static/style.css"

...

GET the last refresh time of the Web Service. Can be used to make sure indexes have been updated before making any requests. Typical example may be to retrieve a new forecast for which you are sure it is already available in the Delft-FEWS database. Before retrieving the new forecast keep requesting the last refresh time until you see a change in the last refresh time. This will make sure the indexes have been updated and the new forecast can be found with the WebServices. For this endpoint to work reliable in a setup with multiple web services and a load balancer, it is required that the client that connects to this endpoint is always directed to the same Web Service instance.

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/lastrefreshtime"

...

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. It returns the last time the main time series dialog loaded time series. Time series dialog will only reload the time series when displayed time series are changed in the database or the user selected something different. The method was implemented for a very specific use case and is not recommended to be used anymore.

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"

...

GET the web OC Configuration

Response

    • JSON response with the Web OC configuration.

Example request

Code Block
curl "http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/weboc/configuration"

...