Skip to content

Delete



GET /api/v1/slo/{slo_uuid}/delete

Overview

Delete the specified SLO and its detection components.

Prerequisites and Usage Steps

The current API Key must have monitor.sloCfgManage; metric-type saves also require query permission for the target metric namespace, and SLO management permission alone is insufficient to pass this prerequisite check. Operations are limited to the Workspace to which the Key belongs; the SLO UUID in the path is taken from content.data[].uuid in Get SLO List (usually with a monitor_ prefix), not the Rule UUID of the associated Monitor or metricQueryInfo.sloId.

This is a GET delete endpoint with write side effects. Before calling it, back up the SLO and its associations, and check whether references such as status pages need adjustment. It deletes the SLO itself, its detection/computation components, and SLI/Alert Policy/tag associations; it does not delete the referenced original SLI Monitors and Alert Policies, nor does it guarantee cleanup of historical time series data. The remote schedule is deleted first, and then the local deletion is submitted; after submission, policy caches are cleaned asynchronously. These stages are not a cross-service transaction, so a failure may have already stopped the schedule or completed the local deletion.

Returns an array of deleted names, usually one item; if the target does not exist/has been deleted/is in another Workspace, NotFoundSLO is returned. Do not treat a 404 from a retry as evidence that the initial deletion failed. After a network failure or 500, check the SLO list and current scheduling state first to avoid blind repetition.

Route Parameters

Parameter Type Required Description
slo_uuid string Y Target SLO UUID; not the SLI Monitor UUID or metricQueryInfo.sloId.
Example: monitor_example
How to obtain or enter: Read content.data[].uuid from Get SLO List.

Request Headers

Parameter 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.

Request Example

curl --get 'https://openapi.guance.com/api/v1/slo/monitor_example/delete' \
  -H 'DF-API-KEY: <DF-API-KEY>'

Response

HTTP 200, application/json. The example below shows the main fields that can be read directly.

Field Type Description
content array<string> Array of names of actually deleted SLOs.
content[] string Name of a deleted SLO; for a single deletion, usually one item.
{
  "code": 200,
  "content": [
    "支付服务可用性"
  ],
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Responses

For authentication, rate limiting, and common request errors, see Common Error Definitions.

HTTP Status errorCode Trigger Condition Message or Response Description Handling
404 ft.NotFoundSLO The target is not in the current Workspace, has been deleted, or is not an SLO; modifications also include missing required detection/computation components The specified SLO was not found Get the uuid from the SLO list in the current Workspace; confirm that the target still exists. If components are missing, ask the administrator to repair them.
400 ft.OuterFuncFailed The remote scheduling service returned a failure External function call failed (some branches use the downstream message) Check message and traceId. Ask the administrator to verify scheduling availability and the current configuration state, and then retry.
400 ft.SameSetTraggerExists The remote scheduling service reports that an identical trigger configuration already exists A trigger with the same configuration already exists First verify this SLO and the remote scheduling, resolve residual/duplicate configurations, and then submit.
500 ft.InternalServerError Database/cache, task queue, invalid array member, or unhandled downstream exception; a failure may also have already produced remote changes Internal error First check the target SLO configuration and current scheduling state; for a deletion failure, additionally verify the deleted status. Do not blindly repeat creation or batch overwrite.

Feedback

Is this page helpful?