Get Flow¶
Get the information of a specified workflow.
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
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Required/Optional |
Data Type |
Description |
|---|---|---|---|---|
flowId |
Query |
Required |
Integer |
The workflow ID. |
userId |
Query |
Required |
String |
The user ID. How to get userId>> |
orgId |
Query |
Required |
String |
The organization ID which the user belongs to. How to get orgId>> |
action |
Query |
Required |
String |
Fixed value: get |
Response Parameters¶
Flow Struct¶
Sample¶
{
"flowId": 3560,
"flowName": "outuser1",
"active": 0,
"creator": "yourCreator",
"createTime": "2019-12-09 07:19:52.0",
"updateUser": "yourUpdateUser",
"updateTime": "2019-12-09 07:19:52.0",
"freq": "0 0 0 * * ? *",
"cycle": "D",
"parameters": "[]",
"owner": "yourOwners",
"visitor": "yourVisitors",
"doAs": "yourDoAs",
"alertMode": 3,
"alertTo": "",
"appId": "",
"graph": {
"creator": "yourCreator",
"freq": "0 0 0 * * ? *",
"owners": "yourOwners",
"type": 1,
"cycle": "D",
"alertMode": 3,
"visitors": "yourVisitors",
"doAs": "your_bd_account",
"flows": [],
"appId": "",
"name": "outuser1",
"startTime": "2019-07-25",
"alertTo": "",
"syncType": 1,
"relations": [],
"parameters": "[]",
"tasks": [
{
"x": 0.002,
"y": 0.002,
"taskName": "tass",
"nodeId": "t_106089",
"taskId": 106089
}
],
"queue": "",
"desc": ""
},
"entry": 1,
"type": 1,
"syncType": 1,
"desc": "",
"queue": "",
"startTime": "2019-07-25",
"locked": false,
"virtual": false,
"hasEditPri": true,
"hasReadPri": true,
"isUserLocked": false
}
Parameters¶
Name |
Data Type |
Description |
|---|---|---|
flowId |
Integer |
The workflow ID. |
flowName |
String |
The workflow name. |
active |
Integer |
The scheduling status of the workflow.
|
creator |
String |
The username of the user who created the workflow instance. |
createTime |
String |
The time when the workflow is created. |
updateUser |
String |
The user who updated the workflow. |
updateTime |
String |
The time when the workflow is updated. |
freq |
String |
Workflow scheduling cycle using 7-field Crontab format. Crontab triggers events at specified time points, for example:
For complete Crontab syntax, see:Cron Expression Explainer |
cycle |
String |
The scheduling cycle.
|
parameters |
Map |
The global parameters that are configured for the workflow to dynamically adapt to the environment changes (in the format of key=value). |
owner |
String |
The username of the owners of the workflow. The semicolon (;) is used to separate each owner, for example, owners=”userNameA;userNameB”. |
visitor |
String |
The username of the vistors who can access the workflow. The semicolon (;) is used to separate each visitor, for example, visitors=”userNameA;userNameB”. |
doAs |
String |
The big data account of the organization to which the workflow belongs. |
alertMode |
Integer |
The alert mode.
|
alertTo |
String |
The receiver of the alerts. |
appId |
String |
Null string |
graph |
FlowGraph Struct |
The workflow dependency. For more information, see FlowGraph Struct |
entry |
Integer |
The method used for creating the workflow.
|
type |
Integer |
The scheduling type of the workflow.
|
syncType |
Integer |
The sync type of the workflow.
|
desc |
String |
The workflow description. |
startTime |
String |
The effective date of the workflow. |
virtual |
Boolean |
|
locked |
Boolean |
|
hasEditPri |
Boolean |
|
hasReadPri |
Boolean |
|
isUserLocked |
Boolean |
|
FlowGraph Struct¶
Sample¶
{
"creator":"yourCreator",
"freq":"0 0 0 * * ? *",
"alertMode":3,
"type":1,
"owners":"yourOwners",
"visitors":";yourVisitors; ",
"startTime":"2019-07-25"
"cycle":"D",
"doAs":"yourDoAs",
"flows":[],
"alertTo":"",
"name":"21",
"syncType":1,
"relations":[],
"parameters":"[]",
"appId":"",
"tasks":
[{
"taskName":"tass",
"task_inst_id":"104890-20190812080700",
"x":0.002,
"y":0.002,
"taskId":104890,
"nodeId":"t_104890",
"status":"CANCEL"}],
"queue":"",
"desc":"ga"
}
Parameters¶
Name |
Data Type |
Description |
|---|---|---|
creator |
String |
The username of the user who created the workflow instance. |
freq |
String |
Workflow scheduling cycle using 7-field Crontab format. Crontab triggers events at specified time points, for example:
For complete Crontab syntax, see:Cron Expression Explainer |
alertMode |
Integer |
The alert mode.
|
type |
Integer |
The scheduling type of the workflow.
|
owners |
String |
The username of the owners of the workflow. The semicolon (;) is used to separate each owner, for example, owners=”userNameA;userNameB”. |
visitors |
String |
The username of the vistors who can access the workflow. The semicolon (;) is used to separate each visitor, for example, visitors=”userNameA;userNameB”. |
startTime |
String |
The effective date of the workflow. |
cycle |
String |
The scheduling cycle.
|
doAs |
String |
The big data account of the organization to which the workflow belongs. |
flows |
Array of FlowSimpleInfo Structs |
The list of workflows that have dependency relations with the workflow. For more information, see FlowSimpleInfo Struct |
alertTo |
String |
The receiver of the alerts. |
name |
String |
The workflow name. |
syncType |
Integer |
The sync type of the workflow.
|
relations |
Array of Relation Structs |
The list of the relations between tasks in the workflow, with each element representing the upstream and downstream dependency. For more information, see Relation Struct |
parameters |
Map |
The parameters that are configured for the task to dynamically adapt to the environment changes (in the format of key=value) |
appId |
String |
Null string |
tasks |
Array of TaskSimpleInfo Structs |
The list of all task nodes in the workflow, with each element representing a TaskSimpleInfo struct, which contains basic information of a task node. For more information, see TaskSimpleInfo Struct |
queue |
String |
The computing queue. |
desc |
String |
The workflow description. |
FlowSimpleInfo Struct¶
Sample¶
{
"flowId":"2809",
"flowName":"21",
"nodeId":"f_2809",
"isVirtual":false,
"x":0.0125,
"y":0.0015
}
Parameters¶
Name |
Data Type |
Description |
|---|---|---|
flowId |
String |
The workflow ID. |
flowName |
String |
The workflow name. |
nodeId |
String |
The ID of the node that is part of other workflows. |
isVirtual |
Boolean |
|
x |
Double |
The x-axis of the node on the configuration panel of the workflow. |
y |
Double |
The y-axis of the node on the configuration panel of the workflow. |
TaskSimpleInfo Struct¶
Sample¶
{
"taskName":"tass",
"x":0.0132,
"y":0.008100000381469727,
"taskId":"104575",
"nodeId":"t_104575"
}
Parameters¶
Name |
Data Type |
Description |
|---|---|---|
taskName |
String |
The task name. |
x |
Double |
The x-axis of the task on the configuration panel. |
y |
Double |
The y-axis of the task on the configuration panel. |
taskId |
String |
The task ID. |
nodeId |
String |
The node ID. (Note: The node ID is not the same as the task ID, because there are task nodes and workflow nodes that have dependency relations in a workflow.) |
Relation Struct¶
Sample¶
{
"cycleGap": "D0",
"rerun": true,
"source": "t_105048",
"target": "t_104575"
}
Parameters¶
Name |
Data Type |
Description |
|---|---|---|
cycleGap |
String |
The scheduling time difference between upstream and downstream tasks, with the format of {cycle}{offset} (cycle is the unit of time different, and offset is value). |
source |
String |
The node ID of the upstream task. |
target |
String |
The node ID of the downstream task. |
rerun |
Boolean |
Effective only for task-level re-running.
|
Error Code¶
See Common Error Codes.
Samples¶
Request Sample¶
url: https://{apigw-address}/dataflow-batch-service/v2.0/flows?action=get&flowId=2479&userId=yourUserId&orgId=yourOrgId
method: GET
Return Sample¶
{
"status": 0,
"msg": "SUCCESS",
"data": {
"flowId": 2479,
"flowName": "test0722-1",
"active": 0,
"creator": "yourCreator",
"createTime": "2019-07-22 08:56:35.0",
"updateUser": "yourUpdateUser",
"updateTime": "2019-07-22 08:56:58.0",
"freq": "0 0 0 * * ? *",
"cycle": "D",
"parameters": "[{\"key\":\"overwrite\",\"value\":\"true\"}]",
"owner": "yourOwner",
"visitor": "yourVisitor",
"doAs": "your_bd_account",
"alertMode": 1,
"graph": "{\"queue\":\"\",\"cycle\":\"D\",\"desc\":\"\",\"doAs\":\"yourDoAs\",\"freq\":\"0 0 0 * * ? *\",\"visitors\":\"yourVisitors\",\"tasks\":[{\"taskName\":\"MDM-Sync\",\"taskId\":104506,\"y\":0.002,\"x\":0.002,\"nodeId\":\"t_104506\"},{\"taskName\":\"MDMHive\",\"taskId\":\"104507\",\"y\":0.009,\"x\":0.002,\"nodeId\":\"t_104507\"}],\"type\":0,\"creator\":\"yourCreator\",\"flows\":[],\"alertMode\":1,\"relations\":[{\"cycleGap\":\"D0\",\"rerun\":true,\"source\":\"t_104506\",\"target\":\"t_104507\"}],\"name\":\"test0722-1\",\"startTime\":\"2019-07-22\",\"active\":0,\"parameters\":\"[{\\\"key\\\":\\\"overwrite\\\",\\\"value\\\":\\\"true\\\"}]\",\"owners\":\"yourOwners\"}",
"entry": 0,
"type": 0,
"syncType": 1,
"desc": "",
"startTime": "2019-07-22",
"virtual": false,
"locked": false,
"hasEditPri": false,
"hasReadPri": true,
"isUserLocked": false
}
}