Delete¶
POST /api/v1/service_manage/delete
Overview¶
Batch delete specified Service List configurations.
Prerequisites and Usage Steps¶
The API Key must have service management permission (trace.serviceManage). First call Service List to verify the UUID and name item by item. serviceUUIDs in the request must be a confirmed non-empty list. This API deletes all active Service Lists in the workspace when it receives an empty array; clients must block empty arrays before sending. Deletion soft-deletes matching Service Lists and cleans up the label associations corresponding to these UUIDs. Save details as a backup before calling; if the result is unclear, list the configurations again first, then decide the next step.
Request Headers¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| DF-API-KEY | string | Y | OpenAPI authentication credential for the workspace. Example: <DF-API-KEY>How to obtain or enter: Obtain an OpenAPI Key with this operation permission from API Key management in the target workspace. |
Body Request Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| serviceUUIDs[*] | string | A single Service List UUID string in the array. Example: sman_exampleHow to obtain or enter: Copy from content.data[].uuid in Service List. |
|
| serviceUUIDs | array | Y | Array of Service List UUIDs to delete. Clients must prohibit empty arrays; currently an empty array can delete active Service Lists in the entire workspace. Null allowed: False Example: ["sman_example"]How to obtain or enter: Select the services that actually need to be deleted from content.data[].uuid in Service List. Before sending, check that the array is not empty and verify the names item by item. |
Additional Parameter Notes¶
Deletion does not stop service collection or delete already collected trace data. If auto-discovery is still running, the corresponding Service List may appear again later.
Request Example¶
curl --request POST 'https://openapi.guance.com/api/v1/service_manage/delete' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json' \
--data-raw '{"serviceUUIDs":["sman_example"]}'
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content | boolean | true on success. UUIDs that do not exist or do not belong to the current workspace are ignored; you cannot conclude that every UUID has been deleted based on this. |
{
"code": 200,
"content": true,
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
Error Response¶
For authentication, rate limiting, and common request errors, see Common Error Definitions.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Resolution |
|---|---|---|---|---|
| 406 | ft.ParameterValidationFailed | A request field is missing, or the field value violates the declared validation conditions | Parameter parsing failed | Check the parameter location, field name, type, and value. |
| 400 | ft.RequestJsonFormatError | Invalid request JSON syntax | Request JSON format error | Fix the JSON according to content.reason, line, and column. |
| 400 | ft.JsonFormatError | JSON top level is not an object | Some JSON file format error | Structure the request body as a JSON object. |