Querying an Instance of a Specified Flow
Function
This API is used to query an instance of a specified flow.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
URI
GET /v1/{project_id}/ffs/graphs/{workflow_id}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID. For details, see Obtaining a Project ID. Constraints N/A. Range The value contains 32 characters. Only letters and digits are allowed. Default Value N/A. |
| workflow_id | Yes | String | Definition Flow ID. Constraints N/A. Range 1 to 512 characters Default Value N/A. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| x-cloud-service | No | Boolean | User tags. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| id | String | Flow instance ID. |
| name | String | Name. |
| description | String | Description. |
| nodes | Array of GraphNode objects | nodes |
| edges | Array of GraphEdge objects | edges |
| domain_name | String | domain_name |
| domain_id | String | domain_id |
| project_id | String | project_id |
| workflow_id | String | workflow_id |
| workflow_run_id | String | workflow_run_id |
| created | String | Creation time (UTC), in the format yyyy-MM-ddTHH:mm:ssZ. |
| updated | String | Update time (UTC), in the format yyyy-MM-ddTHH:mm:ssZ. |
| task_status | String | task_status |
| error_info | OperateErrorResponse object | OperateErrorResponse |
| workflow_urn | String | workflow_urn |
| workflow_definition | WorkflowCreateBody object | Definition Request body for creating a flow. Range N/A. |
| constants | String | constants |
| label | String | label |
| privilege | String | privilege |
| enterprise_project_id | String | enterprise_project_id |
| merge_params | Boolean | merge_params |
| mode | String | mode |
| express_config | ExpressConfig object | Definition Express flow configuration items of FunctionGraph. Range N/A. |
| lts_group_id | String | lts_group_id |
| lts_stream_id | String | lts_stream_id |
| enable_stream_response | Boolean | Whether to return stream data. |
| Parameter | Type | Description |
|---|---|---|
| id | String | ID |
| name | String | Name. |
| category | String | Category. |
| description | String | Description. |
| parent_node | String | parent_node |
| shape | Shape object | shape |
| position_x | Integer | position_x |
| position_y | Integer | position_y |
| execution_id | String | Execution ID. |
| incoming_edges | Array of strings | incoming_edges |
| outgoing_edges | Array of strings | outgoing_edges |
| Parameter | Type | Description |
|---|---|---|
| id | String | id |
| from | String | from |
| to | String | to |
| label | String | label |
| shape | Shape object | shape |
| Parameter | Type | Description |
|---|---|---|
| graph_id | String | graph_id |
| error_detail | String | error_detail |
| Parameter | Type | Description |
|---|---|---|
| name | String | Definition Name of a flow. Range 1 to 64 characters |
| description | String | Definition Flow description. Range 1 to 512 characters |
| start | String | Definition ID of the start node in a flow. Range 1 to 256 characters |
| triggers | Array of Trigger objects | Definition List of triggers in a flow. Range 0 to 200 triggers |
| functions | Array of Function objects | Definition List of functions in a flow. Range 0 to 100 functions |
| states | Array of OperationState objects | Definition List of nodes in a flow. Range 1 to 100 nodes |
| constants | Object | Definition Flow constant. Range N/A. |
| retries | Array of Retry objects | Definition List of retry policies for a flow. Range 0 to 200 policies |
| mode | String | Definition Flow mode. The default mode is NORMAL. Range |
| express_config | ExpressConfig object | Definition Express flow configuration. This parameter is required when mode is set to EXPRESS. |
| enterprise_project_id | String | Definition Enterprise project of a flow. Range 0 to 64 characters |
| enable_stream_response | Boolean | Definition Whether streaming response is supported. Range N/A. |
| Parameter | Type | Description |
|---|---|---|
| trigger_name | String | Definition Trigger name. Range N/A. |
| trigger_type | String | Definition Trigger type. Range |
| enabled | Boolean | Definition Whether to enable the trigger. Range N/A. |
| trigger_config | OBSTriggerConfig object | Definition OBS trigger configuration. Range N/A. |
| Parameter | Type | Description |
|---|---|---|
| bucket | String | Definition OBS bucket name. Range N/A. |
| events | Array of strings | Definition OBS event list. Range N/A. |
| prefix | String | Definition OBS object name prefix. Range N/A. |
| suffix | String | Definition OBS object name suffix. Range N/A. |
| Parameter | Type | Description |
|---|---|---|
| name | String | Definition Function name, which must be unique in a flow. Range N/A. |
| operation | String | Definition Function URN. Range N/A. |
| metadata | Object | Definition Extended information about the function, which is customized by users. Range N/A. |
| Parameter | Type | Description |
|---|---|---|
| action_mode | String | Definition Node execution mode. Range |
| actions | Array of Action objects | Definition Node execution actions. Range N/A. |
| on_errors | Array of OnError objects | Definition List of node execution error handling policies. Range N/A. |
| id | String | Definition Node ID, which is unique in a flow. Range N/A. |
| name | String | Definition Node name. Range N/A. |
| type | String | Definition Node type list. Range |
| end | Boolean | Definition Whether the node is an end node. Range N/A. |
| transition | String | Definition ID of the next node. Range N/A. |
| state_data_filter | StateDataFilter object | Definition Filter expression. Range N/A. |
| duration | Long | Definition Waiting time, in seconds. This parameter is mandatory and valid only when the node type is Sleep. Range N/A. |
| Parameter | Type | Description |
|---|---|---|
| function_ref | FunctionRef object | Definition Function invocation information. Range N/A. |
| Parameter | Type | Description |
|---|---|---|
| ref_name | String | Definition Function reference name, which must be the same as the name in the outer functions. Range N/A. |
| invoke_mode | String | Definition Function invocation mode. Currently, only synchronous invocation is supported. Range |
| arguments | Object | Definition Input parameter for function execution. Constants in constants can be referenced. Definition format: parameter path | constant value/constant path Parameter path: The JsonPath of the input parameter, for example, $.a.b[0].c. The constant value can be of the numeric, string (enclosed in single quotation marks), or Boolean type. The constant path is the JsonPath path of the constant, but the root node must be represented by $CONST, for example, $CONST.a.b. Range N/A. |
| Parameter | Type | Description |
|---|---|---|
| error | String | Definition Error matching expression, which is used to filter exceptions. Range N/A. |
| transition | String | Definition ID of the next node. Range N/A. |
| retry_ref | String | Definition Retry policy name. Range N/A. |
| Parameter | Type | Description |
|---|---|---|
| input | String | Definition Input filter expression (JSONPath). Range N/A. |
| output | String | Definition Output filter expression (JSONPath). Range N/A. |
| Parameter | Type | Description |
|---|---|---|
| name | String | Definition Retry policy name, which must be unique in a flow. Range N/A. |
| delay | Long | Definition Retry interval, in seconds. If the parameter is not set, the value is 1 by default. Range N/A. |
| max_attempts | Long | Definition Maximum number of retry times. If this parameter is not set, the default value 3 is used. Range N/A. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error description. |
| request_id | String | Request ID. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error description. |
| request_id | String | Request ID. |
Example Requests
None
Example Responses
None
Status Codes
| Status Code | Description |
|---|---|
| 200 | Response to flow instance query. |
| 400 | Bad Request |
| 500 | Internal Server Error |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank 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