Query Approval Flow Instance Data List by Conditions
# Description
Query approval flow instance data list based on specified conditions.
# Request Specification
Method: POST + application/json
Endpoint: https://${cloud domain}/cgi/crm/v2/data/query?thirdTraceId=${Random String}
Headers: Refer to Common Parameters
# Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| data | Map | Yes | Data map |
| dataObjectApiName | String | Yes | Object API name (fixed value: ApprovalInstanceObj) |
| find_explicit_total_num | Boolean | No | Whether to return total count (true->returns total, false->doesn't return. Default: true. Setting false improves response speed) |
| search_query_info | Map | Yes | Query Condition Specification |
| limit | Int | Yes | Pagination size (max: 100) |
| offset | Int | Yes | Offset (starts from 0, must be multiple of limit) |
| filters | List | Yes | Filter conditions list |
| field_name | String | Yes | Field name |
| field_values | List[String] | Yes | Field values |
| operator | String | Yes | Operator (see [operator parameter details] below) |
| orders | List | Yes | Query conditions |
| fieldName | String | Yes | Field name |
| isAsc | Boolean | Yes | Sort order (true: ascending, false: descending) |
| fieldProjection | List[String] | Yes | Return fields list (use apiName from object fields) |
# Operator Parameter Details
You can directly use query conditions from the object list page. See How to Get List Query Conditions
| Parameter | Meaning | Description | Parameter | Meaning | Description |
|---|---|---|---|---|---|
| EQ | Equal | N | Not equal | Can query null values | |
| GT | Greater than | GTE | Greater than or equal | ||
| LT | Less than | LTE | Less than or equal | ||
| LIKE | Contains | NLIKE | Not contains | ||
| IS | Is null | ISN | Is not null | ||
| IN | In | NIN | Not in | ||
| BETWEEN | Between | NBETWEEN | Not between | ||
| STARTWITH | Starts with | ENDWITH | Ends with | ||
| HASANYOF | Has overlapping elements | NHASANYOF | No overlapping |
# Request Example
{
"data": {
"find_explicit_total_num": "",
"search_query_info": {
"limit": 5,
"orders": [
{
"fieldName": "payment_amount",
"isAsc": false
}
],
"fieldProjection": [
"_id",
"name"
],
"filters": {
"operator": "IN",
"field_name": "owner",
"field_values": [
"FSUID_7B8A3925E40FA68630C0D7E9C3XXXXXX"
]
}
},
"dataObjectApiName": "ApprovalInstanceObj"
},
"offset": 0
}
# Response Parameters
| Parameter | Type | Description |
|---|---|---|
| traceId | string | Request unique ID |
| errorDescription | string | Error description |
| data | Map | Parameter details (call Query Object Description API) |
| errorMessage | string | Error message |
| errorCode | Int | Error Codes |
# Response Example
{
"traceId": "E-O.827xxxxxx",
"errorDescription": "success",
"data": {
"created_by__r": {},
"lock_status": "0",
"is_deleted": false,
"create_time": 1612247399397,
"name": "xxxxxx",
"_id": "69046aexxxxxxx"
},
"errorMessage": "OK",
"errorCode": 0
}
# Notes
- Do not use the message field in response for logical judgment as errorMessage may change;
- If a field value is empty, the field won't be returned;
# Special Notes
# Operator Parameter Details
The response corresponds to object fields. See Approval Flow Instance Object Field Description (opens new window) for details. The following parameters are unique to this API. For error codes, refer to Global Error Codes.
| Parameter | Meaning | Parameter | Meaning |
|---|---|---|---|
| EQ | = | GT | > |
| LT | < | GTE | >= |
| LTE | <= | N | <> |
| LIKE | LIKE | NLIKE | NOT LIKE |
| IS | IS | ISN | IS NOT |
| IN | IN | NIN | NOT IN |
| BETWEEN | BETWEEN | NBETWEEN | NOT BETWEEN |
| STARTWITH | LIKE% | ENDWITH | %LIKE |
| CONTAINS | Array contains |