Orchestrating a Flow
Function
This API is used to orchestrate a flow. You can execute a flow step by step, including starting the flow, running the flow, performing the next or previous step, completing the flow, terminating the flow, or deleting the flow. The input parameters include the operation to be performed and the name or ID of the flow.
URI
POST Huawei Cloud Astro Zero domain name/u-route/baas/v1.0/flow/{action}/{name_or_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
action |
Yes |
String |
Explanation Operation to be performed on the Flow instance. Constraints None Value The values and meanings of each operation are as follows:
Default value None |
name_or_id |
Yes |
String |
Explanation When action is set to start or run, set this parameter to the flow name. For other actions, set this parameter to the ID of the running Flow instance. You can call the API for Querying a Flow Instance to query the id in the response message. Constraints None Value None Default value None |
Request parameters
The parameters in the request body are the input parameters defined in the Flow instance.
Response parameters
Parameter |
Type |
Description |
---|---|---|
resCode |
String |
Explanation Return code. Value If the request is successful, 0 is returned. For details about other error codes, see Error Codes. |
resMsg |
String |
Explanation Message returned. Value If the request is successful, "Success" is returned. In other cases, an error message is returned. |
result |
result object |
Explanation If the request is successful, the interviewId and outputs fields are returned. |
Example Request
POST https://Huawei Cloud Astro Zero domain name/u-route/baas/v1.0/flow/start/testFlowXyz { "paramA": "valueA", "paramB": { "subParamBA": [ "A", "B" ], "subParamBB": "BB" } }
Example Response
{ "resCode": "0", "resMsg": "Success", "result": { "interviewId": "1234567890", "outputs": { "outA": "123", "outB": "456" } } }
Status Code
See Status Codes.
Error Code
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot