Getting a specified flow instance by filter (GET)
Description
URL |
scheme://domain:port/platform/ws/flow/instances |
|
Description |
Gets the flow instances by filter. |
|
HTTP Method |
GET |
|
Parameters |
Name |
Description |
id |
Optional. Flow id. |
|
flowname |
Optional. Flow definition name. |
|
username |
Optional. Flow definition owner. Use the keyword "all" to return flow definitions owned by all users. |
|
state |
Optional. Flow instance state. Possible values:
|
|
start |
Optional. The start index for flow instance paging. |
|
pagesize |
Optional. Maximum number of flow instances that are returned. |
Request
Request |
Request Information |
|
Method |
GET |
|
Request-URI |
/platform/ws/flow/instances or /platform/ws/flow/instances?id=%d&flowname=%s&username=%s&state=%s&start=%d&pagesize=%d |
|
Request-Header |
Name |
Value |
Accept |
application/xml or application/json |
|
Message-Body |
empty |
Response
Response Code |
|
|
Response-Header |
Name |
Value |
Content-Type |
application/xml or application/json |
|
Message-body |
Success Message |
If successful, returns flow definition list information.
|
Failure Message |
If not successful, returns an error message.
|
Example: Get flow instances by user
# Request
GET /platform/ws/flow/instances?username=jsmith
Accept: application/json;
# Response
200 Successful
Content-Type: application/json;
{
"pseudoFlowInstances": {
"total": 2,
"pseudoFlowInstance": [
{
"id": 101,
"user": "jsmith",
"name": "flow1",
"fullName": "101:jsmith:flow1",
"state": "Done",
"status": 0,
"workDirectory": "/home/jsmith",
" lastUpdateTime": "2018-08-14 14:11:15 GMT+08:00",
"startTime": "2018-08-14 14:01:15 GMT+08:00",
"endTime": "2018-08-14 14:11:15 GMT+08:00"
},
{
"id": 102,
"user": "jsmith",
"name": "flow1",
"fullName": "102:jsmith:flow1",
"state": "Running",
"status": 0,
"workDirectory": "/home/jsmith",
"lastUpdateTime": "2018-08-14 14:13:15 GMT+08:00",
"startTime": "2018-08-14 14:13:15 GMT+08:00",
"endTime": ""
}
]
}
}
# Request
GET /platform/ws/flow/definitions?username=jsmith
Accept: application/xml;
# Response
200 Successful
Content-Type: application/xml;
<pseudoFlowInstances total="2">
<pseudoFlowInstance>
<id>101</id>
<user>jsmith</user>
<name>flow1</name>
<fullName>101:jsmith:flow1</fullName>
<state>Done</state>
<status>0</status>
<workDirectory>/home/jsmith</workDirectory>
< lastUpdateTime>2018-08-14 14:11:15 GMT+08:00</ lastUpdateTime>
<startTime>2018-08-14 14:01:15 GMT+08:00</startTime>
<endTime>2018-08-14 14:11:15 GMT+08:00</endTime>
</pseudoFlowInstance>
<pseudoFlowInstance>
<id>102</id>
<user>jsmith</user>
<name>flow1</name>
<fullName>102:jsmith:flow1</fullName>
<state>Running</state>
<status>0</status>
<workDirectory>/home/jsmith</workDirectory>
< lastUpdateTime>2018-08-14 14:13:15 GMT+08:00</ lastUpdateTime>
<startTime>2018-08-14 14:13:15 GMT+08:00</startTime>
<endTime></endTime>
</pseudoFlowInstance>
</pseudoFlowInstances>