调用DescribeFlow接口,查询工作流信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeFlow

系统规定参数。取值:DescribeFlow

ProjectId String FP-257A173659F5****

工作流ID

Id String F-7A39731FE719****

项目ID

RegionId String cn-hangzhou

地域ID

返回数据

名称 类型 示例值 描述
Status String STOP_SCHEDULE

支持状态:

  • STOP_SCHEDULE
  • UNDER_SCHEDULE
Type String DDI

目前只支持DDI

AlertUserGroupBizId String ADG-0a00d00abb7743ff9f812f1a997f3d87

报警用户组信息。

Periodic Boolean true

是否周期执行:

  • true:周期执行。
  • false:非周期行执行。
EditLockDetail String {}

编辑锁信息。

Namespace String

保留参数。

HostName String emr-header-1.cluster-123456

指定运行的机器信息,格式为emr-header-1.cluster-123456。

Application String {"nodeDefMap":{":start:":{"name":":start:","type":":start:","transitions":["cluster"]},"cluster":{"id":"CT-0C74281682CF03B4","name":"cluster","type":":Cluster:","transitions":["job1"]},"job1":{"jobId":"FJ-242AB240DBAF4195","name":"job1","type":":action:","transitions":["end"]},"end":{"name":"end","type":":end:"}}}

工作流构造信息,由一组节点定义nodeDefMap组成,多个时以逗号分隔。

type:类型包括开始节点(:start:)、构建按需集群节点(:Cluster:)、动作节点(:action:)和结束节点(:end:)。

transitions:下游的节点。

GmtModified Long 1538017814000

修改时间。

RequestId String 243D5A48-96A5-4C0C-8966-93CBF65635ED

请求ID。

Description String 这是一个创建工作流描述

工作流描述。

CreateCluster Boolean false

是否创建集群:

  • 为true时,ClusterId为集群模板id CT-XXXXXX。
  • 为false时,ClusterId为集群id C-XXXXXX。
StartSchedule Long 1538017814000

开始调度时间。

EndSchedule Long 1538018814000

结束调度时间。

Graph String {"nodes":[{"id":"48d474ea","index":0,"spmAnchorId":"0.0.0.i0.766645eb2cmNtQ","attribute":{"type":"START"},"shape":"startControlNode","type":"node","y":250,"size":"80*34","x":500},{"id":"7ba480b3","index":1,"spmAnchorId":"5176.8250060.0.i19.771e28d0IPNQGE","attribute":{"jobType":"SHELL","jobId":"FJ-7BE1062897B19D25","type":"JOB"},"config":{"hostName":""},"label":"fail_job","shape":"shellJobNode","type":"node","y":398.5,"size":"170*34","x":470.5},{"id":"33202d60","index":2,"spmAnchorId":"5176.8250060.0.i23.771e28d0IPNQGE","attribute":{"type":"END"},"shape":"endControlNode","type":"node","y":562.5,"size":"80*34","x":430.5}],"edges":[{"id":"28167ea0","index":3,"source":"48d474ea","sourceAnchor":0,"target":"7ba480b3","targetAnchor":0},{"id":"e8d5ff52","index":4,"source":"7ba480b3","sourceAnchor":1,"target":"33202d60","targetAnchor":0}]}

图形信息。

AlertDingDingGroupBizId String AUG-c917bbfaf6494bbfacdee69c8284967c

报警钉钉群信息。

GmtCreate Long 1538017814000

创建时间。

CategoryId String FC-F2495319DA05****

工作流目录ID。

CronExpr String 0 0 0-23/1 * * ?

调度Cron表达式。

Name String my_flow_demo

工作流名称。

Id String F-7A39731FE719****

工作流ID。

AlertConf String {"items":[{"enable":true,"eventId":"EMR-210401001","alertUserGroupIdList":["AUG-b79bb29bb6e14ddd89674a242623851b"],"alertDingDingGroupList":["ADG-af1f9689d6194e2dbd89927d5c515172"]},{"enable":true,"eventId":"EMR-110401015","alertUserGroupIdList":["AUG-b79bb29bb6e14ddd89674a242623851b"],"alertDingDingGroupList":["ADG-af1f9689d6194e2dbd89927d5c515172"]},{"enable":true,"eventId":"EMR-110401002","alertUserGroupIdList":["AUG-b79bb29bb6e14ddd89674a242623851b"],"alertDingDingGroupList":["ADG-af1f9689d6194e2dbd89927d5c515172"]}]}

报警通知配置,eventId目前支持:

  • EMR-210401001(工作流失败报警)。
  • EMR-110401002(工作流成功通知)。
  • EMR-110401015(工作流节点失败报警)。
ClusterId String C-A23BD131A862****

集群/集群模板ID。

ParentFlowList Array of ParentFlow
ParentFlow
ParentFlowName String parent_flow

父工作流名称。

ParentFlowId String 173659F59685

父工作流ID。

ProjectName String my_project

项目名称。

ProjectId String FP-257A173659F59685

项目ID。

示例

请求示例

http(s)://[Endpoint]/?Action=DescribeFlow
&ProjectId=FP-257A173659F5****
&Id=F-7A39731FE719****
&RegionId=cn-hangzhou
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeFlowResponse>
    <Status>STOP_SCHEDULE</Status>
    <Type>DDI</Type>
    <AlertUserGroupBizId>ADG-0a00d00abb7743ff9f812f1a997f3d87</AlertUserGroupBizId>
    <Periodic>true</Periodic>
    <EditLockDetail>{}</EditLockDetail>
    <Namespace>无</Namespace>
    <HostName>emr-header-1.cluster-123456</HostName>
    <Application>{"nodeDefMap":{":start:":{"name":":start:","type":":start:","transitions":["cluster"]},"cluster":{"id":"CT-0C74281682CF03B4","name":"cluster","type":":Cluster:","transitions":["job1"]},"job1":{"jobId":"FJ-242AB240DBAF4195","name":"job1","type":":action:","transitions":["end"]},"end":{"name":"end","type":":end:"}}}</Application>
    <GmtModified>1538017814000</GmtModified>
    <RequestId>243D5A48-96A5-4C0C-8966-93CBF65635ED</RequestId>
    <Description>这是一个创建工作流描述</Description>
    <CreateCluster>false</CreateCluster>
    <StartSchedule>1538017814000</StartSchedule>
    <EndSchedule>1538018814000</EndSchedule>
    <Graph>{"nodes":[{"id":"48d474ea","index":0,"spmAnchorId":"0.0.0.i0.766645eb2cmNtQ","attribute":{"type":"START"},"shape":"startControlNode","type":"node","y":250,"size":"80*34","x":500},{"id":"7ba480b3","index":1,"spmAnchorId":"5176.8250060.0.i19.771e28d0IPNQGE","attribute":{"jobType":"SHELL","jobId":"FJ-7BE1062897B19D25","type":"JOB"},"config":{"hostName":""},"label":"fail_job","shape":"shellJobNode","type":"node","y":398.5,"size":"170*34","x":470.5},{"id":"33202d60","index":2,"spmAnchorId":"5176.8250060.0.i23.771e28d0IPNQGE","attribute":{"type":"END"},"shape":"endControlNode","type":"node","y":562.5,"size":"80*34","x":430.5}],"edges":[{"id":"28167ea0","index":3,"source":"48d474ea","sourceAnchor":0,"target":"7ba480b3","targetAnchor":0},{"id":"e8d5ff52","index":4,"source":"7ba480b3","sourceAnchor":1,"target":"33202d60","targetAnchor":0}]}</Graph>
    <AlertDingDingGroupBizId>AUG-c917bbfaf6494bbfacdee69c8284967c</AlertDingDingGroupBizId>
    <GmtCreate>1538017814000</GmtCreate>
    <CategoryId>FC-F2495319DA05****</CategoryId>
    <CronExpr>0 0 0-23/1 * * ?</CronExpr>
    <Name>my_flow_demo</Name>
    <Id>F-7A39731FE719****</Id>
    <AlertConf>{"items":[{"enable":true,"eventId":"EMR-210401001","alertUserGroupIdList":["AUG-b79bb29bb6e14ddd89674a242623851b"],"alertDingDingGroupList":["ADG-af1f9689d6194e2dbd89927d5c515172"]},{"enable":true,"eventId":"EMR-110401015","alertUserGroupIdList":["AUG-b79bb29bb6e14ddd89674a242623851b"],"alertDingDingGroupList":["ADG-af1f9689d6194e2dbd89927d5c515172"]},{"enable":true,"eventId":"EMR-110401002","alertUserGroupIdList":["AUG-b79bb29bb6e14ddd89674a242623851b"],"alertDingDingGroupList":["ADG-af1f9689d6194e2dbd89927d5c515172"]}]}</AlertConf>
    <ClusterId>C-A23BD131A862****</ClusterId>
    <ParentFlowList>
        <ParentFlowName>parent_flow</ParentFlowName>
        <ParentFlowId>173659F59685</ParentFlowId>
        <ProjectName>my_project</ProjectName>
        <ProjectId>FP-257A173659F59685</ProjectId>
    </ParentFlowList>
</DescribeFlowResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Status" : "STOP_SCHEDULE",
  "Type" : "DDI",
  "AlertUserGroupBizId" : "ADG-0a00d00abb7743ff9f812f1a997f3d87",
  "Periodic" : true,
  "EditLockDetail" : "{}",
  "Namespace" : "无",
  "HostName" : "emr-header-1.cluster-123456",
  "Application" : "{\"nodeDefMap\":{\":start:\":{\"name\":\":start:\",\"type\":\":start:\",\"transitions\":[\"cluster\"]},\"cluster\":{\"id\":\"CT-0C74281682CF03B4\",\"name\":\"cluster\",\"type\":\":Cluster:\",\"transitions\":[\"job1\"]},\"job1\":{\"jobId\":\"FJ-242AB240DBAF4195\",\"name\":\"job1\",\"type\":\":action:\",\"transitions\":[\"end\"]},\"end\":{\"name\":\"end\",\"type\":\":end:\"}}}",
  "GmtModified" : 1538017814000,
  "RequestId" : "243D5A48-96A5-4C0C-8966-93CBF65635ED",
  "Description" : "这是一个创建工作流描述",
  "CreateCluster" : false,
  "StartSchedule" : 1538017814000,
  "EndSchedule" : 1538018814000,
  "Graph" : "{\"nodes\":[{\"id\":\"48d474ea\",\"index\":0,\"spmAnchorId\":\"0.0.0.i0.766645eb2cmNtQ\",\"attribute\":{\"type\":\"START\"},\"shape\":\"startControlNode\",\"type\":\"node\",\"y\":250,\"size\":\"80*34\",\"x\":500},{\"id\":\"7ba480b3\",\"index\":1,\"spmAnchorId\":\"5176.8250060.0.i19.771e28d0IPNQGE\",\"attribute\":{\"jobType\":\"SHELL\",\"jobId\":\"FJ-7BE1062897B19D25\",\"type\":\"JOB\"},\"config\":{\"hostName\":\"\"},\"label\":\"fail_job\",\"shape\":\"shellJobNode\",\"type\":\"node\",\"y\":398.5,\"size\":\"170*34\",\"x\":470.5},{\"id\":\"33202d60\",\"index\":2,\"spmAnchorId\":\"5176.8250060.0.i23.771e28d0IPNQGE\",\"attribute\":{\"type\":\"END\"},\"shape\":\"endControlNode\",\"type\":\"node\",\"y\":562.5,\"size\":\"80*34\",\"x\":430.5}],\"edges\":[{\"id\":\"28167ea0\",\"index\":3,\"source\":\"48d474ea\",\"sourceAnchor\":0,\"target\":\"7ba480b3\",\"targetAnchor\":0},{\"id\":\"e8d5ff52\",\"index\":4,\"source\":\"7ba480b3\",\"sourceAnchor\":1,\"target\":\"33202d60\",\"targetAnchor\":0}]}",
  "AlertDingDingGroupBizId" : "AUG-c917bbfaf6494bbfacdee69c8284967c",
  "GmtCreate" : 1538017814000,
  "CategoryId" : "FC-F2495319DA05****",
  "CronExpr" : "0 0 0-23/1 * * ?",
  "Name" : "my_flow_demo",
  "Id" : "F-7A39731FE719****",
  "AlertConf" : "{\"items\":[{\"enable\":true,\"eventId\":\"EMR-210401001\",\"alertUserGroupIdList\":[\"AUG-b79bb29bb6e14ddd89674a242623851b\"],\"alertDingDingGroupList\":[\"ADG-af1f9689d6194e2dbd89927d5c515172\"]},{\"enable\":true,\"eventId\":\"EMR-110401015\",\"alertUserGroupIdList\":[\"AUG-b79bb29bb6e14ddd89674a242623851b\"],\"alertDingDingGroupList\":[\"ADG-af1f9689d6194e2dbd89927d5c515172\"]},{\"enable\":true,\"eventId\":\"EMR-110401002\",\"alertUserGroupIdList\":[\"AUG-b79bb29bb6e14ddd89674a242623851b\"],\"alertDingDingGroupList\":[\"ADG-af1f9689d6194e2dbd89927d5c515172\"]}]}",
  "ClusterId" : "C-A23BD131A862****",
  "ParentFlowList" : [ {
    "ParentFlowName" : "parent_flow",
    "ParentFlowId" : "173659F59685",
    "ProjectName" : "my_project",
    "ProjectId" : "FP-257A173659F59685"
  } ]
}

错误码

访问错误中心查看更多错误码。

访问错误中心查看更多错误码。