Bind or Unbind Approval Group Resources
Use this API to bind an approval group to specified resources or remove an existing approval group binding. Supported resource types include environments, data sources, and database groups.
Request URL: /openapi/v1/approval/group/bind
Request Method: POST
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| id | String | No | Approval group ID. Pass null or an empty string to remove the approval group binding from the resources. | 30044 |
| resourceType | String | Yes | Resource type. Valid values: env, datasource, group. | env |
| resourceIdList | Array | Yes | Resource ID list. At least one resource ID is required. | ["env-dev"] |
Request Example
{
"id": "30044",
"resourceType": "env",
"resourceIdList": ["env-dev"]
}
Unbind Request Example
{
"id": "",
"resourceType": "env",
"resourceIdList": ["env-dev"]
}
Response Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| success | Boolean | Whether the request is successful. | true |
| requestId | String | Request ID for troubleshooting and tracing. | Aw1s9LIO-kqqrvUEnqojy5TJdmqc1OBK |
| data | String | Execution result. | success |
| 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": "Aw1s9LIO-kqqrvUEnqojy5TJdmqc1OBK",
"data": "success"
}
Result
A successful response returns success in data, which means the binding change was saved. Pass an approval group ID to bind resources, or pass null or an empty string for id to remove the approval group binding.