Note : This endpoint is in Preview.
If you have any feedback, contact Datadog support .
DELETE https://api.ap1.datadoghq.com/api/v2/incidents/config/notification-rules/{id} https://api.ap2.datadoghq.com/api/v2/incidents/config/notification-rules/{id} https://api.datadoghq.eu/api/v2/incidents/config/notification-rules/{id} https://api.ddog-gov.com/api/v2/incidents/config/notification-rules/{id} https://api.us2.ddog-gov.com/api/v2/incidents/config/notification-rules/{id} https://api.datadoghq.com/api/v2/incidents/config/notification-rules/{id} https://api.us3.datadoghq.com/api/v2/incidents/config/notification-rules/{id} https://api.us5.datadoghq.com/api/v2/incidents/config/notification-rules/{id}
Overview Deletes a notification rule by its ID.
This endpoint requires the incident_notification_settings_write permission.
OAuth apps require the incident_notification_settings_write authorization scope to access this endpoint.
Arguments Path Parameters The ID of the notification rule.
Query Strings Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, incident_type, notification_template
Response Bad Request
{
"errors" : [
"Bad Request"
]
} Unauthorized
{
"errors" : [
"Bad Request"
]
} Forbidden
{
"errors" : [
"Bad Request"
]
} Not Found
{
"errors" : [
"Bad Request"
]
} Too many requests
{
"errors" : [
"Bad Request"
]
} Code Example Copy
# Path parameters export id = "00000000-0000-0000-0000-000000000001" # Curl command curl -X DELETE "https://api.ap1.datadoghq.com "https://api.ap2.datadoghq.com "https://api.datadoghq.eu "https://api.ddog-gov.com "https://api.us2.ddog-gov.com "https://api.datadoghq.com "https://api.us3.datadoghq.com "https://api.us5.datadoghq.com /api/v2/incidents/config/notification-rules/${id} " \
-H "DD-API-KEY: ${DD_API_KEY} " \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY} "
"""
Delete an incident notification rule returns "No Content" response
"""
from datadog_api_client import ApiClient , Configuration
from datadog_api_client.v2.api.incidents_api import IncidentsApi
from uuid import UUID
configuration = Configuration ()
configuration . unstable_operations [ "delete_incident_notification_rule" ] = True
with ApiClient ( configuration ) as api_client :
api_instance = IncidentsApi ( api_client )
api_instance . delete_incident_notification_rule (
id = UUID ( "00000000-0000-0000-0000-000000000001" ),
)
Instructions First install the library and its dependencies and then save the example to example.py and run following commands:
DD_SITE = "datadoghq.com us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<DD_API_KEY>" DD_APP_KEY = "<DD_APP_KEY>" python3 "example.py"
# Delete an incident notification rule returns "No Content" response
require "datadog_api_client"
DatadogAPIClient . configure do | config |
config . unstable_operations [ "v2.delete_incident_notification_rule" . to_sym ] = true
end
api_instance = DatadogAPIClient :: V2 :: IncidentsAPI . new
api_instance . delete_incident_notification_rule ( "00000000-0000-0000-0000-000000000001" )
Instructions First install the library and its dependencies and then save the example to example.rb and run following commands:
DD_SITE = "datadoghq.com us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<DD_API_KEY>" DD_APP_KEY = "<DD_APP_KEY>" rb "example.rb"
// Delete an incident notification rule returns "No Content" response
package main
import (
"context"
"fmt"
"os"
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
"github.com/google/uuid"
)
func main () {
ctx := datadog . NewDefaultContext ( context . Background ())
configuration := datadog . NewConfiguration ()
configuration . SetUnstableOperationEnabled ( "v2.DeleteIncidentNotificationRule" , true )
apiClient := datadog . NewAPIClient ( configuration )
api := datadogV2 . NewIncidentsApi ( apiClient )
r , err := api . DeleteIncidentNotificationRule ( ctx , uuid . MustParse ( "00000000-0000-0000-0000-000000000001" ), * datadogV2 . NewDeleteIncidentNotificationRuleOptionalParameters ())
if err != nil {
fmt . Fprintf ( os . Stderr , "Error when calling `IncidentsApi.DeleteIncidentNotificationRule`: %v\n" , err )
fmt . Fprintf ( os . Stderr , "Full HTTP response: %v\n" , r )
}
}
Instructions First install the library and its dependencies and then save the example to main.go and run following commands:
DD_SITE = "datadoghq.com us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<DD_API_KEY>" DD_APP_KEY = "<DD_APP_KEY>" go run "main.go"
// Delete an incident notification rule returns "No Content" response
import com.datadog.api.client.ApiClient ;
import com.datadog.api.client.ApiException ;
import com.datadog.api.client.v2.api.IncidentsApi ;
import java.util.UUID ;
public class Example {
public static void main ( String [] args ) {
ApiClient defaultClient = ApiClient . getDefaultApiClient ();
defaultClient . setUnstableOperationEnabled ( "v2.deleteIncidentNotificationRule" , true );
IncidentsApi apiInstance = new IncidentsApi ( defaultClient );
try {
apiInstance . deleteIncidentNotificationRule (
UUID . fromString ( "00000000-0000-0000-0000-000000000001" ));
} catch ( ApiException e ) {
System . err . println ( "Exception when calling IncidentsApi#deleteIncidentNotificationRule" );
System . err . println ( "Status code: " + e . getCode ());
System . err . println ( "Reason: " + e . getResponseBody ());
System . err . println ( "Response headers: " + e . getResponseHeaders ());
e . printStackTrace ();
}
}
}
Instructions First install the library and its dependencies and then save the example to Example.java and run following commands:
DD_SITE = "datadoghq.com us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<DD_API_KEY>" DD_APP_KEY = "<DD_APP_KEY>" java "Example.java"
// Delete an incident notification rule returns "No Content" response
use datadog_api_client ::datadog ;
use datadog_api_client ::datadogV2 ::api_incidents ::DeleteIncidentNotificationRuleOptionalParams ;
use datadog_api_client ::datadogV2 ::api_incidents ::IncidentsAPI ;
use uuid ::Uuid ;
#[tokio::main]
async fn main () {
let mut configuration = datadog ::Configuration ::new ();
configuration . set_unstable_operation_enabled ( "v2.DeleteIncidentNotificationRule" , true );
let api = IncidentsAPI ::with_config ( configuration );
let resp = api
. delete_incident_notification_rule (
Uuid ::parse_str ( "00000000-0000-0000-0000-000000000001" ). expect ( "invalid UUID" ),
DeleteIncidentNotificationRuleOptionalParams ::default (),
)
. await ;
if let Ok ( value ) = resp {
println! ( " {:#?} " , value );
} else {
println! ( " {:#?} " , resp . unwrap_err ());
}
}
Instructions First install the library and its dependencies and then save the example to src/main.rs and run following commands:
DD_SITE = "datadoghq.com us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<DD_API_KEY>" DD_APP_KEY = "<DD_APP_KEY>" cargo run
/**
* Delete an incident notification rule returns "No Content" response
*/
import { client , v2 } from "@datadog/datadog-api-client" ;
const configuration = client . createConfiguration ();
configuration . unstableOperations [ "v2.deleteIncidentNotificationRule" ] = true ;
const apiInstance = new v2 . IncidentsApi ( configuration );
const params : v2.IncidentsApiDeleteIncidentNotificationRuleRequest = {
id : "00000000-0000-0000-0000-000000000001" ,
};
apiInstance
. deleteIncidentNotificationRule ( params )
. then (( data : any ) => {
console . log (
"API called successfully. Returned data: " + JSON . stringify ( data )
);
})
. catch (( error : any ) => console . error ( error ));
Instructions First install the library and its dependencies and then save the example to example.ts and run following commands:
DD_SITE = "datadoghq.com us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<DD_API_KEY>" DD_APP_KEY = "<DD_APP_KEY>" tsc "example.ts"