Get My Flow¶
Search workflows that meet the search criteria.
Prerequisite¶
The user must belong to the organization (OU) which the target workflow belongs to.
Request Format¶
GET https://{apigw-address}/dataflow-batch-service/v2.0/flows?action=getMyFlow
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|---|
userId |
Query |
Mandatory |
String |
The user ID. How to get userId>> |
orgId |
Query |
Mandatory |
String |
The organization ID which the user belongs to. How to get orgId>> |
searchValue |
Query |
false |
String |
The search criteria (if not specified, all workflows of the user will be returned). |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
Array of FlowSimpInfo Structs |
The list of searched workflows, with each element representing a FlowSimpleInfo Struct, which contains the basic information of a workflow. |
FlowSimpleInfo Struct¶
Sample¶
{
"flowId": "2526",
"editable": true,
"flowName": "testIns",
"cycle": "mi"
}
Parameters¶
Name |
Data Type |
Description |
---|---|---|
flowId |
String |
The workflow ID. |
editable |
Boolean |
|
flowName |
String |
The workflow name. |
cycle |
String |
The scheduling cycle.
|
Error Code¶
See Common Error Codes.
Samples¶
Request Sample¶
url: https://{apigw-address}/dataflow-batch-service/v2.0/flows?action=getMyFlow&searchValue={}&userId={}&orgId={}
method: GET
Return Sample¶
{
"status": 0,
"msg": "Success",
"data": [
{
"flowId": "3318",
"editable": true,
"flowName": "reduce_entity",
"cycle": "D"
},
{
"flowId": "2809",
"editable": true,
"flowName": "map",
"cycle": "D"
},
{
"flowId": "3257",
"editable": true,
"flowName": "shell",
"cycle": "D"
},
{
"flowId": "2515",
"editable": true,
"flowName": "testWorkflow122",
"cycle": "D"
},
{
"flowId": "2980",
"editable": true,
"flowName": "8",
"cycle": "D"
},
{
"flowId": "2979",
"editable": true,
"flowName": "integrattt",
"cycle": "D"
}
]
}
Java SDK Sample¶
import com.alibaba.fastjson.JSONObject;
import com.envision.apim.poseidon.config.PConfig;
import com.envision.apim.poseidon.core.Poseidon;
public class Request extends PoseidonRequest {
public void setQueryParam(String key, Object value){
QueryParams().put(key, value);
}
public void setHeaderParam(String key, String value){
headerParams().put(key, value);
}
public void setBodyParam(Map<String, Object> bodyPara){
bodyParams().putAll(bodyPara);
}
public void setMethod(String method) {
this.method = method;
}
private String method;
public String baseUri() {
return "";
}
public String method() {
return method;
}
}
public void myFlowsTest(){
//1. Select Application Registration from the left navigation bar of EnOS Console.
//2. Open the App Detail page to get the AccessKey and SecretKey of the application.
String accessKey = "yourAppAccessKey";
String secretKey = "yourAppSecretKey";
//Create a request and save the required parameters in the map of the Query.
Request request = new Request();
request.setQueryParam("searchValue","2");
request.setQueryParam("userId","yourUserId");
request.setQueryParam("orgId","yourOrgId");
request.setMethod("GET");
try {
JSONObject response = Poseidon.config(PConfig.init().appKey(accessKey).appSecret(secretKey).debug())
.url("https://{apigw-address}/dataflow-batch-service/v2.0/flows?action=getMyFlow")
.getResponse(request, JSONObject.class);
System.out.println(response);
} catch (Exception e) {
e.printStackTrace();
}
}