Querying Instances of a Flow
Function
This API is used to query instances of a flow.
URI
GET /v2/{project_id}/fgs/workflows/{workflow_id}/executions
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID. Minimum: 1 Maximum: 64 |
workflow_id |
Yes |
String |
Flow ID. Minimum: 1 Maximum: 512 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
limit |
No |
Integer |
Number of items displayed on each page. The maximum value is 200. Excessive records will not be returned. Minimum: 0 Maximum: 500 |
status |
No |
String |
Instance status. Minimum: 0 Maximum: 64 Enumeration values:
|
start_time |
No |
String |
Query start time (UTC). If the start time is not specified, it is three days earlier than the end time. |
end_time |
No |
String |
Query end time (UTC). If the end time is not specified, it is three days later than the start time. If neither of them is set, data of the last three days is queried by default. |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
executions |
Array of FlowExecutionBrief objects |
Flow execution information. Array Length: 0 - 999 |
Parameter |
Type |
Description |
---|---|---|
workflow_id |
String |
Flow ID. Minimum: 1 Maximum: 64 |
workflow_urn |
String |
Flow URN. Format:urn:fss:<region_id>:<project_id>:workflow:<package>:<workflow_name>:<version>Currently, package and version can only be set to default and latest, respectively. |
execution_id |
String |
Flow instance ID. Minimum: 1 Maximum: 64 |
status |
String |
Flow instance execution status. Minimum: 1 Maximum: 32 Enumeration values:
|
begin_time |
String |
Flow instance creation time (UTC), in the format yyyy-MM-ddTHH:mm:ssZ. Minimum: 0 Maximum: 64 |
end_time |
String |
Flow instance end time (UTC), in the format yyyy-MM-ddTHH:mm:ssZ. Minimum: 0 Maximum: 64 |
last_update_time |
String |
Flow instance last update time (UTC), in the format yyyy-MM-ddTHH:mm:ssZ. Minimum: 0 Maximum: 64 |
created_by |
String |
Flow instance creator. Minimum: 1 Maximum: 32 |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. Minimum: 1 Maximum: 36 |
error_msg |
String |
Error description. Minimum: 2 Maximum: 512 |
request_id |
String |
Request ID. Minimum: 2 Maximum: 512 |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. Minimum: 1 Maximum: 36 |
error_msg |
String |
Error description. Minimum: 2 Maximum: 512 |
request_id |
String |
Request ID. Minimum: 2 Maximum: 512 |
Example Requests
Query the instances of function flow {workflow_id}.
GET /v2/{project_id}/fgs/workflows/{workflow_id}/executions
Example Responses
Status code: 200
Response to flow instance query.
{ "executions" : [ { "workflow_id" : "48aff955-ea10-4ffd-b426-190bc192dc14", "workflow_urn" : "urn:fss:cn-north-7:73d69ae0cfcf460190522d060f05ad:workflow:default:testflow:latest", "execution_id" : "48aff955-ea10-4ffd-b426-190bc192dc14", "status" : "running", "begin_time" : "2021-01-01T00:00:00Z", "end_time" : "2021-01-01T00:00:00Z", "last_update_time" : "2021-01-01T00:00:00Z", "created_by" : "admin" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Response to flow instance query. |
400 |
Bad Request |
500 |
Internal Server Error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.