Querying a Flow
Function
This API is used to query a flow.
URI
GET /v2/{project_id}/fgs/workflows
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID. Minimum: 1 Maximum: 64 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
workflow_name |
No |
String |
Flow name. Minimum: 0 Maximum: 64 |
limit |
No |
Integer |
Number of items displayed on each page. The default value is 200. A value greater than 200 will be taken as 200. Minimum: 1 |
offset |
No |
Integer |
Offset of pagination. The default value is 0. A value less than 0 will be taken as 0. Minimum: 0 |
enterprise_project |
No |
String |
Enterprise project ID. |
mode |
No |
String |
Flow type. Options:
|
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total |
Long |
Number of objects that meet the query conditions. Minimum: 0 Maximum: 1000000 |
size |
Integer |
Size of the returned objects. Minimum: 0 Maximum: 200 |
workflows |
Array of WorkflowSimpleInfo objects |
Returned objects. Array Length: 0 - 200 |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Unique 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. |
name |
String |
Flow name. Minimum: 1 Maximum: 64 |
description |
String |
Flow description. Minimum: 0 Maximum: 512 |
created_time |
String |
Flow creation time (UTC), in the format yyyy-MM-ddTHH:mm:ssZ. Minimum: 0 Maximum: 64 |
updated_time |
String |
Flow modification time (UTC), in the format yyyy-MM-ddTHH:mm:ssZ. Minimum: 0 Maximum: 64 |
created_by |
String |
Flow creator. Minimum: 0 Maximum: 64 |
enable_stream_response |
Boolean |
Whether to return stream data. Default: false |
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 function flows.
GET /v2/{project_id}/fgs/workflows
Example Responses
Status code: 200
Response to flow query.
{ "total" : 1, "size" : 1, "workflows" : [ { "id" : "48aff955-ea10-4ffd-b426-190bc192dc14", "workflow_urn" : "urn:fss:cn-north-7:73d69ae0cfcf460190522d060f05ad:workflow:default:testflow:latest", "name" : "test-flow", "description" : "desc", "created_time" : "2021-01-01T00:00:00Z", "updated_time" : "2021-01-01T00:00:00Z", "created_by" : "admin" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Response to flow 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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot