Starts a flow execution.

Description

  • The flow is created.
  • If you do not specify the execution name, the system automatically generates an execution name and starts the execution.
  • If an execution of the same name is in progress, the system does not start a new execution but directly returns the execution of the same name.
  • If the execution of the same name has ended (succeeded or failed), the ExecutionAlreadyExists error is returned.
  • If no execution of the same name exists, a new execution is started.

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 StartExecution

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

RequestId String No testRequestId

The ID of the request. If you specify this parameter, the system uses this value as the ID of the request. If you do not specify this parameter, the system generates a value at random.

FlowName String Yes flow

The name of the flow you start to execute. The name is unique within the region and cannot be modified after the flow is created. Valid values:

  • The name can contain letters, digits, underscores (_), and hyphens (-).
  • The name must start with a letter or an underscore (_).
  • The name is case-sensitive.
  • The name must be 1 to 128 characters in length.
ExecutionName String No exec

The name of the execution, which is unique within a flow. Valid values:

  • The name can contain letters, digits, underscores (_), and hyphens (-).
  • The name must start with a letter or an underscore (_).
  • The name is case-sensitive.
  • The name must be 1 to 128 characters in length.
Input String No {"key":"value"}

The input of the execution, which is in the format of JSON objects.

CallbackFnFTaskToken String No 12

Calls back TaskToken-related tasks after the flow execution ends.

Response parameters

Parameter Type Example Description
Status String Succeeded

The status of the execution. Valid values:

  • Running
  • Stopped
  • Succeeded
  • Failed
  • TimedOut
StoppedTime String 2019-01-01T01:01:01.001Z

The time when the execution stopped.

RequestId String testRequestId

The ID of the request.

StartedTime String 2019-01-01T01:01:01.001Z

The time when the execution started.

FlowDefinition String version: v1.0\ntype: flow\nname: test\nsteps:\n - type: pass\n name: mypass

The definition of the flow.

Output String {"key":"value"}

The output of the execution, which is in the format of JSON objects.

FlowName String flow

The name of the flow.

Name String exec1

The name of the execution.

Input String {"key":"value"}

The input of the execution, which is in the format of JSON objects.

Examples

Sample requests

http(s)://[Endpoint]/?Action=StartExecution
&RequestId=testRequestId
&FlowName=flow
&ExecutionName=exec
&Input={"key":"value"}
&CallbackFnFTaskToken=12
&Common request parameters

Sample success responses

JSON format

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

{
  "Status" : "Succeeded",
  "StoppedTime" : "2019-01-01T01:01:01.001Z",
  "RequestId" : "testRequestId",
  "StartedTime" : "2019-01-01T01:01:01.001Z",
  "FlowDefinition" : "version: v1.0\\ntype: flow\\nname: test\\nsteps:\\n - type: pass\\n name: mypass",
  "Output" : "{\"key\":\"value\"}",
  "FlowName" : "flow",
  "Name" : "exec1",
  "Input" : "{\"key\":\"value\"}"
}

Error codes

HttpCode Error code Error message Description
400 EntityTooLarge The payload size exceeds maximum allowed size (%s bytes). The error message returned because the request message body is too large.
400 ExecutionAlreadyExists Execution %s for flow %s already exists. The error message returned because an execution of the same name already exists in the flow.
400 InvalidArgument Parameter error. The error message returned because the values specified for one or more request parameters are invalid. For more information, see the error message.
400 MissingRequiredHeader The HTTP header '%s' must be specified. The error message returned because a required request parameter is not specified. For more information, see the error message.
400 MissingRequiredParams The HTTP query '%s' must be specified. The error message returned because a required request parameter is not specified. For more information, see the error message.
403 InvalidAccessKeyID The AccessKey ID %s is invalid. The error message returned because the specified AccessKey ID is invalid.
403 RequestTimeTooSkewed The difference between the request time %s and the current time %s is too large. The error message returned because your request time is wrong. The request has been identified as invalid. For more information, see the "Common parameters" section.
403 SignatureNotMatch The request signature we calculated does not match the signature you provided. Check your access key and signing method. The error message returned because the request signature that the system calculates does not match the request signature you provided. Check your signature algorithm and AccessKey secret.
404 FlowNotExists Flow %s does not exist. The error message returned because the requested resource does not exist. Make sure that you have created a flow.
415 UnsupportedMediaType The content type must be "application/json". The error message returned because the type of the request message body is wrong.
429 ResourceThrottled The request is throttled. Please try again later. The error message returned because the request is throttled for some reason. Try again later.
500 InternalServerError An internal error has occurred. Please retry. The error message returned because an internal server error occurred. Try again later.

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