You can call this operation to modify a custom graphical workflow.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyFlowForWeb

The operation that you want to perform. Set the value to ModifyFlowForWeb.

Graph String Yes {"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}]}

The information of the directed acyclic graph (DAG) of the workflow.

Id String Yes F-7A39731FE719****

The ID of the workflow.

ProjectId String Yes FP-257A173659F5****

The ID of the project.

RegionId String Yes cn-hangzhou

The ID of the region to which your project belongs.

AlertConf String No {"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"]}]}

The alert settings for the workflow instance. Valid values of eventId: EMR-210401001, EMR-110401002, and EMR-110401015. EMR-210401001 indicates the workflow instance execution failed. EMR-110401002 indicates the workflow instance execution succeeded. EMR-110401015 indicates a node instance failed.

AlertDingDingGroupBizId String No N/A

The ID of the DingTalk group to which alerts are sent.

AlertUserGroupBizId String No N/A

The ID of the user group to which alerts are sent.

ClusterId String No A23BD131A862****

The ID of the cluster.

CreateCluster Boolean No false

Specifies whether to create a cluster through the cluster template. If this parameter is set to true, the cluster is created through the cluster template and the ID of the cluster must be a template ID in the format of CT-xxx. Otherwise, the ID of the cluster must be in the format of C-xxx.

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

The CRON expression of the time-based scheduling of the workflow. For more information, see A Cron Expressions.

Description String No This is the description of a workflow

The description of the workflow. It can contain a maximum of 256 characters.

EndSchedule Long No 1538018814000

The end time of the scheduling of the workflow. It is a timestamp whose data type is LONG. For example, you can set the value to System.currentTimeMillis().

HostName String No emr-header-1.cluster-123456

The name of the host on which the workflow instance runs. The name is formatted in emr-header-1.cluster-123456.

Name String No my_flow

The name of the workflow. It can contain a maximum of 64 characters. The name must be unique in a project.

ParentCategory String No FC-F2495319DA05****

The ID of the parent directory.

ParentFlowList String No [F-123456]

The parent workflows of the workflow.

Periodic Boolean No true

Specifies whether to periodically schedule the workflow.

StartSchedule Long No 1538017814000

The start time of the scheduling of the workflow. It is a timestamp whose data type is LONG. For example, you can set the value to System.currentTimeMillis(). The StartSchedule parameter must be smaller than the EndSchedule parameter. You must specify this parameter when CronExpr is specified.

Status String No STOP_SCHEDULE

The scheduling status of the workflow. Valid values: STOP_SCHEDULE and UNDER_SCHEDULE.

Response parameters

Parameter Type Example Description
Data Boolean true

The result of the operation.

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

The ID of the request.

Examples

Sample requests


http(s)://[Endpoint]/? Action=ModifyFlowForWeb
&Id=F-7A39731FE719****
&ProjectId=FP-257A173659F5****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<ModifyFlowForWeb>
  <RequestId>ECC2D0D1-B6D5-468D-B698-30E8805EB574</RequestId>
	  <Data>true</Data>
</ModifyFlowForWeb>

JSON format

{
	"Data":true,
	"RequestId":"ECC2D0D1-B6D5-468D-B698-30E8805EB574"
}

Error codes

For a list of error codes, visit the API Error Center.