List Approval Groups
Use this API to query approval groups in the current organization with pagination. The response returns approval group IDs and policy settings for create, update, delete, or resource binding calls.
Request URL: /openapi/v1/approval/group/list
Request Method: POST
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| current | Integer | No | Page number. Starts from 1. Default value: 1. | 1 |
| pageSize | Integer | No | Number of records per page. Default value: 10. | 10 |
Request Example
{
"current": 1,
"pageSize": 10
}
Response Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| success | Boolean | Whether the request is successful. | true |
| requestId | String | Request ID for troubleshooting and tracing. | Nc2e9WDR-KQQRiTAnQOJf6ZTdMPk6TVB |
| data | Array | Approval group list. See data Fields. | [{...}] |
| current | Integer | Current page number. | 1 |
| pageSize | Integer | Number of records per page. | 10 |
| total | Integer | Total number of records that match the query conditions. | 16 |
| errorCode | String | Error code returned when the call fails. | None |
| message | String | Error message returned when the call fails. | None |
data Fields
| Parameter | Type | Description | Example |
|---|---|---|---|
| id | Long | Approval group ID. | 48 |
| name | String | Approval group name. | Default Production Approval Flow |
| resourceNum | Integer | Number of bound resources. | 24 |
| description | String | Approval group description. | Default Production Approval Flow |
| isDefault | Boolean | Whether this is a default approval group. | true |
| createTime | String | Time when the approval group was created. | 2023-02-17 04:48:55Z |
| specifyApprover | Boolean | Whether an approver must be specified when submitting an approval. | true |
| selfApproval | Boolean | Whether the submitter can approve their own request. | false |
Successful Invocation Example
{
"success": true,
"requestId": "Nc2e9WDR-KQQRiTAnQOJf6ZTdMPk6TVB",
"data": [
{
"id": 48,
"name": "Default Production Approval Flow",
"resourceNum": 24,
"description": "Default Production Approval Flow",
"isDefault": true,
"createTime": "2023-02-17 04:48:55Z",
"specifyApprover": true,
"selfApproval": true
},
{
"id": 49,
"name": "Default Development Approval Flow",
"resourceNum": 15,
"description": "Default Development Approval Flow",
"isDefault": true,
"createTime": "2023-02-17 04:48:55Z",
"specifyApprover": true,
"selfApproval": false
}
],
"current": 1,
"pageSize": 10,
"total": 16
}
Result
A successful response returns approval group records for the current organization. Use the returned id when you update an approval group, delete an approval group, or bind resources to an approval group.