Versions Compared

Key

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

...

GET taskrunstatus

Track the status of a workflow using the taskRunId.

Request parameters

  • taskId (string, required): task Id of a workflow.
  • maxWaitMillis (integer) time in milliseconds to wait for response

Response

Status of the workflow task. Possible response codes are:

  • I = Invalid,
  • P = Pending,
  • T = Terminated,
  • R = running,
  • F = Failed,
  • C = Completed fully successful,
  • D = Completed partly successful,
  • A = Approved,
  • B = Approved partly successful
  • null= No status available (produces when method call times-out)

Example request

Code Block
curl localhost:8080/FewsWebServices/rest/fewspiservice/v1/taskrunstatus?documentVersion=1.23&taskId=1_0

Example response

Code Block
C

 

POST runtask

Request parameters

  • not applicable

Response

  • S

Example request

Code Block
$ curl 'http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/timezoneid/runtasks/?workflowId=ImportObserved&startTime=2014-01-01T00:00:00+0000&timeZero=2014-01-01T00:00:00+0000&endTime=2014-01-01T00:30:00+0000 -i -X POST -H 'Content-Type: application/x-www-form-urlencoded'  -d ''

Example response

Code Block
1_0

 

 

GET timeseriesmodifiers

Request parameters

  • locationIds (string)

  • moduleInstanceIds (string)

  • startTime (dateTime)

  • endTime (dateTime)

  • userId (string)

  • modifierTypeId (string)

  • active (boolean, default true)

  • userDefinedModifierDescriptionKeyValuePair (string)

  • documentFormat (string)

Response

Example request

Code Block
curl http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/timeseriesmodifiers?onlyActiveModifiers=true

Example response

Code Block
GMTTODO

 

GET modifiers

Request parameters

  • not applicable

Response

Example request

Code Block
curl http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/timeseriesmodifiersmodifiers?onlyActiveModifiers=true

Example response

Code Block
GMTTODO

 

POST modifiers

Request parameters

  • not applicable

Response

Example request

Code Block
$ curl 'FewsWebServices/rest/fewspiservice/v1/timezoneid'TODO

Example response

Code Block
GMTTODO

 

GET workflows

Request parameters

  • documentVersion (string, 1.9 or up): File format version (optional). For example: 1.23

Response

Example request

Code Block
curl http://localhost:8080/FewsWebServices/rest/fewspiservice/v1/workflows

Example response

Code Block
<?xml version="1.0" encoding="UTF-8"?>
<workflows 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_workflows.xsd" version="1.23">
    <workflow id="ImportObserved">
        <name>Import Observed Data</name>
        <description>Import observed scalar data from external sources and process the imported data</description>
    </workflow>
</workflows>

 

...

Example request

Code Block
$ curl 'FewsWebServices/rest/fewspiservice/v1/timezoneid'TODO

Example response

Code Block
GMTTODO

 

Configuration

The FewsPiService.properties file can be used to make service specific configurations available. This is a property file that is located in the FEWS configuration in the directory:

...