Create Approval Group
Use this API to create a new approval group by copying an existing approval group. This lets you reuse an existing approval flow and save it with a new name and description.
Request URL: /openapi/v1/approval/group/create
Request Method: POST
Before You Begin
- Call List Approval Groups to obtain the
replicateGroupIdto copy from. - The new approval group copies the flow configuration from the source approval group and saves it with the new name and description.
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| name | String | Yes | Approval group name. | Production Approval Flow |
| description | String | No | Approval group description. | For production SQL task approvals |
| replicateGroupId | Long | Yes | Source approval group ID. | 48 |
How to Use the Returned Value
After the call succeeds, data in the response is the new approval group ID. Use this value as id when calling Update Approval Group, Delete Approval Group, or Bind or Unbind Approval Group Resources.
Request Example
{
"name": "Production Approval Flow",
"description": "For production SQL task approvals",
"replicateGroupId": 48
}
Response Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| success | Boolean | Whether the request is successful. | true |
| requestId | String | Request ID for troubleshooting and tracing. | Cl7o7OJC-ioopxKTnomht9GHdkoq6PBL |
| data | Long | ID of the new approval group. | 30044 |
| errorCode | String | Error code returned when the call fails. | None |
| message | String | Error message returned when the call fails. | None |
Successful Invocation Example
{
"success": true,
"requestId": "Cl7o7OJC-ioopxKTnomht9GHdkoq6PBL",
"data": 30044
}
Result
A successful response returns the new approval group ID in data. Store this value if you plan to update the approval policy or bind the approval group to environments, data sources, or database groups.