Permanently delete an agent. This operation is irreversible.
Request headers
|
Header |
Required |
Description |
|
|
Yes |
|
Path parameters
|
Parameter |
Type |
Required |
Description |
|
|
string |
Yes |
Unique agent identifier. |
Request body
No request body is required.
Example request
curl -X DELETE "https://api.qoder.com.cn/api/v1/cloud/agents/agent_019eXXXX..." \
-H "Authorization: Bearer $QODER_PAT"
Example response
HTTP 200 OK
{
"type": "agent",
"id": "agent_019eXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"deleted": true
}
Response fields
|
Field |
Type |
Description |
|
|
string |
Always |
|
|
string |
Unique identifier of the deleted agent. |
|
|
boolean |
Always |
Errors
|
HTTP |
Type |
Trigger |
|
401 |
|
The PAT is invalid or expired. |
|
403 |
|
Caller lacks permission to delete this agent. An admin role may be required. |
|
404 |
|
No agent exists with the given ID, or it has already been deleted. |
See Errors for the full error envelope.
Notes
-
Deletion is permanent and cannot be undone.
-
To temporarily disable an agent instead, use Archive an agent.
-
Deleting an already-archived agent is allowed.
-
Calling
DELETEagain on the same ID returns 404. -
Some deployments require additional admin permissions (the
x-gw-roles: adminheader); insufficient permissions return 403.
Before deleting
-
Confirm that the agent has no active sessions running.
-
If you are not sure whether permanent deletion is needed, archive the agent first.
-
Back up the agent configuration through the version history endpoint before deleting.