Updated on 2025-08-14 GMT+08:00

Querying a Flow Instance

Function

This API is used to query the information about a Flow instance by filtering the instance information based on the entered parameters.

URI

GET Huawei Cloud Astro Zero domain name/u-route/baas/v1.0/flow/{action}{?owner&creator&fields&orderField&orderType&limit&offset}

Table 1 URI parameters

Parameter

Mandatory

Type

Description

action

Yes

String

Explanation

Flow status to be queried or Flow information queried by ID.

Constraints

None

Value

The values and meanings of each status are as follows:

  • activeFlow: a Flow instance that is being executed
  • suspendedFlow: a Flow instance that is suspended
  • terminatedFlow: a Flow instance that is terminated
  • completedFlow: a Flow instance that finishes running
  • instanceId: ID of a Flow instance

Default value

None

owner

No

String

Explanation

Account ID.

Constraints

None

Value

None

Default value

None

creator

No

String

Explanation

Creator ID.

Constraints

None

Value

None

Default value

None

fields

No

Array

Explanation

Fields to query. If this parameter is not passed, the default value is used.

Constraints

None

Value

None

Default value

None

orderField

No

String

Explanation

Field used for sorting. The field must be a value of fields.

Constraints

None

Value

None

Default value

None

orderType

No

String

Explanation

Sorting order.

Constraints

None

Value

  • 0: ascending order.
  • 1: descending order.

Default value

None

limit

No

Integer

Explanation

Maximum number of data records.

Constraints

None

Value

None

Default value

None

offset

No

Integer

Explanation

Start position of the query.

Constraints

None

Value

None

Default value

None

Request Parameters

None

Response Parameters

Table 2 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

Object

Explanation

If the request is successful, content is returned, including the fields or default fields in the request.

Example Request

To query the Flow instance whose ID is 002N000000jrOCerKZBQ, send the following request:
GET https://Huawei Cloud Astro Zero domain name/u-route/baas/v1.0/flow/002N000000jrOCerKZBQ

Example Response

{
    "resCode": "0",
    "resMsg": "Success",
    "result": {
        "createdBy": "10gd000000QwWjXspAOW",
        "createdBy.__objectType": "User",
        "createdBy.name": "bingo",
        "createdDate": "2021-05-19 11:41:30",
        "curElement": "isMasterAccountByIdentityId",
        "description": "",
        "endTime": "",
        "id": "002N000000jrOCerKZBQ",
        "label": "isMasterAccount 2021-05-19 11:41:30",
        "lastHandler": null,
        "lastModifiedBy": "10gd000000QwWjXspAOW",
        "lastModifiedBy.__objectType": "User",
        "lastModifiedBy.name": "bingo",
        "lastModifiedDate": "2021-05-19 11:41:30",
        "name": "CP_DS__isMasterAccountForOperator",
        "owner": "10gd000000QwWjXspAOW",
        "owner.__objectType": "User",
        "owner.name": "bingo",
        "rootID": "",
        "runMode": 2,
        "startTime": "2021-05-19 11:41:30",
        "state": "Broken",
        "suspended": false,
        "type": "Flow",
        "type.name": "Flow",
        "version": "1.0.1"
    }
}

Status Code

See Status Codes.

Error Code

See Error Codes.