Delete (or partially delete) multiple service level objective objects.
This endpoint facilitates deletion of one or more thresholds for one or more
service level objective objects. If all thresholds are deleted, the service level
objective object is deleted as well.
This endpoint requires the slos_write permission.
OAuth apps require the slos_write authorization scope to access this endpoint.
Request
Body Data (required)
Delete multiple service level objective objects request body.
The bulk partial delete service level objective object endpoint
response.
This endpoint operates on multiple service level objective objects, so
it may be partially successful. In such cases, the “data” and “error”
fields in this response indicate which deletions succeeded and failed.
Expand All
Field
Type
Description
data
object
An array of service level objective objects.
deleted
[string]
An array of service level objective object IDs that indicates
which objects that were completely deleted.
updated
[string]
An array of service level objective object IDs that indicates
which objects that were modified (objects for which at least one
threshold was deleted, but that were not completely deleted).
errors
[object]
Array of errors object returned.
id [required]
string
The ID of the service level objective object associated with
this error.
message [required]
string
The error message.
timeframe [required]
enum
The timeframe of the threshold associated with this error
or "all" if all thresholds are affected.
Allowed enum values: 7d,30d,90d,all
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"python3"example.py"
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"rb"example.rb"
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"go run"main.go"
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"java"Example.java"
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Bulk Delete SLO Timeframes returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration({authMethods:{AuthZ:{accessToken: process.env.DD_BEARER_TOKENasstring,},},});constapiInstance=newv1.ServiceLevelObjectivesApi(configuration);constparams: v1.ServiceLevelObjectivesApiDeleteSLOTimeframeInBulkRequest={body:{id1:["7d","30d"],id2:["7d","30d"],},};apiInstance.deleteSLOTimeframeInBulk(params).then((data: v1.SLOBulkDeleteResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"tsc"example.ts"
Request a personalized demo
Get Started with Datadog
Ask AI
AI-generated responses may be inaccurate. Verify important info.