Removes an agent and its associated bindings from a specified PolarClaw.
Operation description
Request description
After this API is executed, it returns the ID of the successfully removed agent and the number of removed bindings.
Ensure that you know the target
AgentIdbefore calling this API. Otherwise, the operation may fail or affect unexpected agents.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:DeletePolarClawAgent |
delete |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ApplicationId |
string |
Yes |
The application ID. |
pa-************** |
| AgentId |
string |
Yes |
The ID of the agent to delete. The value cannot be main. You can obtain this value from the response of CreatePolarClawAgent. |
work |
| DeleteFiles |
boolean |
No |
Specifies whether to delete the working directory and session files. Default value: true. |
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
2281C6C9-CBAB-1AFD-8400-670750CF6025_2212 |
| Message |
string |
The response message. |
successful |
| Code |
integer |
The response status code. |
200 |
| ApplicationId |
string |
The application ID. |
pa-************** |
| AgentId |
string |
The ID of the deleted agent. |
work |
| RemovedBindings |
integer |
The number of automatically removed bindings. |
1 |
Examples
Success response
JSON format
{
"RequestId": "2281C6C9-CBAB-1AFD-8400-670750CF6025_2212",
"Message": "successful",
"Code": 200,
"ApplicationId": "pa-**************",
"AgentId": "work",
"RemovedBindings": 1
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.