The incident-type-scoped behavior settings. All fields are optional on update. Any field omitted from a PATCH request keeps its current value. This object is read-only on the incident type resource itself and is only mutated through the update (PATCH) endpoint.
allow_incident_deletion
boolean
Whether incidents of this type can be deleted.
allow_workflows
boolean
Whether automation workflows can be triggered for incidents of this type.
default: true
create_message
string
An optional message shown to users when they declare an incident of this type.
disable_out_of_the_box_postmortem_template
boolean
Whether the out-of-the-box postmortem template is disabled for incidents of this type.
editable_timestamps
boolean
Whether responders can edit incident timestamps for incidents of this type.
private_incidents
boolean
Whether responders can create private incidents of this type. This is an opt-in setting, distinct from private_incidents_by_default, which controls whether incidents are created private automatically.
private_incidents_by_default
boolean
Whether incidents of this type are created as private by default.
slug_source
enum
When set to servicenow, incidents will display the ServiceNow record ID instead of the public ID. If no ServiceNow integration exists, the public ID will be displayed.
Allowed enum values: default,servicenow
default: default
test_incidents
boolean
Whether incidents of this type are treated as test incidents.
default: true
createdAt
date-time
Timestamp when the incident type was created.
createdBy
string
A unique identifier that represents the user that created the incident type.
description
string
Text that describes the incident type.
is_default
boolean
When true, this incident type will be used as the default type when an incident type is not specified.
lastModifiedBy
string
A unique identifier that represents the user that last modified the incident type.
modifiedAt
date-time
Timestamp when the incident type was last modified.
name
string
The name of the incident type.
prefix
string
The string that will be prepended to the incident title across the Datadog app.
id [required]
string
The incident type's ID.
type [required]
enum
Incident type resource type.
Allowed enum values: incident_types
The incident-type-scoped behavior settings. All fields are optional on update. Any field omitted from a PATCH request keeps its current value. This object is read-only on the incident type resource itself and is only mutated through the update (PATCH) endpoint.
allow_incident_deletion
boolean
Whether incidents of this type can be deleted.
allow_workflows
boolean
Whether automation workflows can be triggered for incidents of this type.
default: true
create_message
string
An optional message shown to users when they declare an incident of this type.
disable_out_of_the_box_postmortem_template
boolean
Whether the out-of-the-box postmortem template is disabled for incidents of this type.
editable_timestamps
boolean
Whether responders can edit incident timestamps for incidents of this type.
private_incidents
boolean
Whether responders can create private incidents of this type. This is an opt-in setting, distinct from private_incidents_by_default, which controls whether incidents are created private automatically.
private_incidents_by_default
boolean
Whether incidents of this type are created as private by default.
slug_source
enum
When set to servicenow, incidents will display the ServiceNow record ID instead of the public ID. If no ServiceNow integration exists, the public ID will be displayed.
Allowed enum values: default,servicenow
default: default
test_incidents
boolean
Whether incidents of this type are treated as test incidents.
default: true
createdAt
date-time
Timestamp when the incident type was created.
createdBy
string
A unique identifier that represents the user that created the incident type.
description
string
Text that describes the incident type.
is_default
boolean
If true, this incident type will be used as the default incident type if a type is not specified during the creation of incident resources.
lastModifiedBy
string
A unique identifier that represents the user that last modified the incident type.
modifiedAt
date-time
Timestamp when the incident type was last modified.
name [required]
string
The name of the incident type.
prefix
string
The string that will be prepended to the incident title across the Datadog app.
id [required]
string
The incident type's ID.
relationships
object
The incident type's resource relationships.
created_by_user
object
Relationship to user.
data [required]
object
Relationship to user object.
id [required]
string
A unique identifier that represents the user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
google_meet_configuration
object
A reference to a Google Meet Configuration resource.
data [required]
object
The Google Meet configuration relationship data object.
id [required]
string
The unique identifier of the Google Meet configuration.
type [required]
string
The type of the Google Meet configuration.
last_modified_by_user
object
Relationship to user.
data [required]
object
Relationship to user object.
id [required]
string
A unique identifier that represents the user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
microsoft_teams_configuration
object
A reference to a Microsoft Teams Configuration resource.
data [required]
object
The Microsoft Teams configuration relationship data object.
id [required]
string
The unique identifier of the Microsoft Teams configuration.
type [required]
string
The type of the Microsoft Teams configuration.
zoom_configuration
object
A reference to a Zoom configuration resource.
data [required]
object
The Zoom configuration relationship data object.
id [required]
string
The unique identifier of the Zoom configuration.
type [required]
string
The type of the Zoom configuration.
type [required]
enum
Incident type resource type.
Allowed enum values: incident_types
default: incident_types
{"data":{"attributes":{"configuration":{"allow_incident_deletion":false,"allow_workflows":true,"create_message":"Create an incident here","disable_out_of_the_box_postmortem_template":false,"editable_timestamps":false,"private_incidents":false,"private_incidents_by_default":false,"slug_source":"default","test_incidents":true},"createdAt":"2019-09-19T10:00:00.000Z","createdBy":"00000000-0000-0000-0000-000000000000","description":"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.","is_default":false,"lastModifiedBy":"00000000-0000-0000-0000-000000000000","modifiedAt":"2019-09-19T10:00:00.000Z","name":"Security Incident","prefix":"IR"},"id":"00000000-0000-0000-0000-000000000000","relationships":{"created_by_user":{"data":{"id":"00000000-0000-0000-2345-000000000000","type":"users"}},"google_meet_configuration":{"data":{"id":"00000000-0000-0000-0000-000000000000","type":"google_meet_configurations"}},"last_modified_by_user":{"data":{"id":"00000000-0000-0000-2345-000000000000","type":"users"}},"microsoft_teams_configuration":{"data":{"id":"00000000-0000-0000-0000-000000000000","type":"microsoft_teams_configurations"}},"zoom_configuration":{"data":{"id":"00000000-0000-0000-0000-000000000000","type":"zoom_configurations"}}},"type":"incident_types"}}
## default
#
# Path parameters exportincident_type_id="CHANGE_ME" # Curl command curl-XPATCH"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.uk1.datadoghq.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/incidents/config/types/${incident_type_id}" \
-H"Accept: application/json" \
-H"Content-Type: application/json" \
-H"DD-API-KEY: ${DD_API_KEY}" \
-H"DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d@-<<EOF{
"data": {
"attributes": {
"createdBy": "00000000-0000-0000-0000-000000000000",
"description": "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data. Note: This will notify the security team.",
"is_default": false,
"lastModifiedBy": "00000000-0000-0000-0000-000000000000",
"name": "Security Incident",
"prefix": "IR"
},
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}EOF
// Update an incident type returns "OK" responsepackagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){// there is a valid "incident_type" in the systemIncidentTypeDataID:=os.Getenv("INCIDENT_TYPE_DATA_ID")body:=datadogV2.IncidentTypePatchRequest{Data:datadogV2.IncidentTypePatchData{Id:IncidentTypeDataID,Attributes:datadogV2.IncidentTypeUpdateAttributes{Name:datadog.PtrString("Security Incident-updated"),},Type:datadogV2.INCIDENTTYPETYPE_INCIDENT_TYPES,},}ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.UpdateIncidentType",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewIncidentsApi(apiClient)resp,r,err:=api.UpdateIncidentType(ctx,IncidentTypeDataID,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `IncidentsApi.UpdateIncidentType`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `IncidentsApi.UpdateIncidentType`:\n%s\n",responseContent)}
// Update an incident type returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.IncidentsApi;importcom.datadog.api.client.v2.model.IncidentTypePatchData;importcom.datadog.api.client.v2.model.IncidentTypePatchRequest;importcom.datadog.api.client.v2.model.IncidentTypeResponse;importcom.datadog.api.client.v2.model.IncidentTypeType;importcom.datadog.api.client.v2.model.IncidentTypeUpdateAttributes;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setUnstableOperationEnabled("v2.updateIncidentType",true);IncidentsApiapiInstance=newIncidentsApi(defaultClient);// there is a valid "incident_type" in the systemStringINCIDENT_TYPE_DATA_ATTRIBUTES_NAME=System.getenv("INCIDENT_TYPE_DATA_ATTRIBUTES_NAME");StringINCIDENT_TYPE_DATA_ID=System.getenv("INCIDENT_TYPE_DATA_ID");IncidentTypePatchRequestbody=newIncidentTypePatchRequest().data(newIncidentTypePatchData().id(INCIDENT_TYPE_DATA_ID).attributes(newIncidentTypeUpdateAttributes().name("Security Incident-updated")).type(IncidentTypeType.INCIDENT_TYPES));try{IncidentTypeResponseresult=apiInstance.updateIncidentType(INCIDENT_TYPE_DATA_ID,body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling IncidentsApi#updateIncidentType");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
"""
Update an incident type returns "OK" response
"""fromosimportenvironfromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.incidents_apiimportIncidentsApifromdatadog_api_client.v2.model.incident_type_patch_dataimportIncidentTypePatchDatafromdatadog_api_client.v2.model.incident_type_patch_requestimportIncidentTypePatchRequestfromdatadog_api_client.v2.model.incident_type_typeimportIncidentTypeTypefromdatadog_api_client.v2.model.incident_type_update_attributesimportIncidentTypeUpdateAttributes# there is a valid "incident_type" in the systemINCIDENT_TYPE_DATA_ATTRIBUTES_NAME=environ["INCIDENT_TYPE_DATA_ATTRIBUTES_NAME"]INCIDENT_TYPE_DATA_ID=environ["INCIDENT_TYPE_DATA_ID"]body=IncidentTypePatchRequest(data=IncidentTypePatchData(id=INCIDENT_TYPE_DATA_ID,attributes=IncidentTypeUpdateAttributes(name="Security Incident-updated",),type=IncidentTypeType.INCIDENT_TYPES,),)configuration=Configuration()configuration.unstable_operations["update_incident_type"]=TruewithApiClient(configuration)asapi_client:api_instance=IncidentsApi(api_client)response=api_instance.update_incident_type(incident_type_id=INCIDENT_TYPE_DATA_ID,body=body)print(response)
# Update an incident type returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.unstable_operations["v2.update_incident_type".to_sym]=trueendapi_instance=DatadogAPIClient::V2::IncidentsAPI.new# there is a valid "incident_type" in the systemINCIDENT_TYPE_DATA_ATTRIBUTES_NAME=ENV["INCIDENT_TYPE_DATA_ATTRIBUTES_NAME"]INCIDENT_TYPE_DATA_ID=ENV["INCIDENT_TYPE_DATA_ID"]body=DatadogAPIClient::V2::IncidentTypePatchRequest.new({data:DatadogAPIClient::V2::IncidentTypePatchData.new({id:INCIDENT_TYPE_DATA_ID,attributes:DatadogAPIClient::V2::IncidentTypeUpdateAttributes.new({name:"Security Incident-updated",}),type:DatadogAPIClient::V2::IncidentTypeType::INCIDENT_TYPES,}),})papi_instance.update_incident_type(INCIDENT_TYPE_DATA_ID,body)
// Update an incident type returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_incidents::IncidentsAPI;usedatadog_api_client::datadogV2::model::IncidentTypePatchData;usedatadog_api_client::datadogV2::model::IncidentTypePatchRequest;usedatadog_api_client::datadogV2::model::IncidentTypeType;usedatadog_api_client::datadogV2::model::IncidentTypeUpdateAttributes;#[tokio::main]asyncfnmain(){// there is a valid "incident_type" in the system
letincident_type_data_id=std::env::var("INCIDENT_TYPE_DATA_ID").unwrap();letbody=IncidentTypePatchRequest::new(IncidentTypePatchData::new(IncidentTypeUpdateAttributes::new().name("Security Incident-updated".to_string()),incident_type_data_id.clone(),IncidentTypeType::INCIDENT_TYPES,));letmutconfiguration=datadog::Configuration::new();configuration.set_unstable_operation_enabled("v2.UpdateIncidentType",true);letapi=IncidentsAPI::with_config(configuration);letresp=api.update_incident_type(incident_type_data_id.clone(),body).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
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
/**
* Update an incident type returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.updateIncidentType"]=true;constapiInstance=newv2.IncidentsApi(configuration);// there is a valid "incident_type" in the system
constINCIDENT_TYPE_DATA_ID=process.env.INCIDENT_TYPE_DATA_IDasstring;constparams: v2.IncidentsApiUpdateIncidentTypeRequest={body:{data:{id: INCIDENT_TYPE_DATA_ID,attributes:{name:"Security Incident-updated",},type:"incident_types",},},incidentTypeId: INCIDENT_TYPE_DATA_ID,};apiInstance.updateIncidentType(params).then((data: v2.IncidentTypeResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));