Create an incident impact field
https://api.datadoghq.com/api/v2/incidents/config/impact-fieldshttps://api.us3.datadoghq.com/api/v2/incidents/config/impact-fieldshttps://api.us5.datadoghq.com/api/v2/incidents/config/impact-fieldshttps://api.datadoghq.eu/api/v2/incidents/config/impact-fieldshttps://api.ap1.datadoghq.com/api/v2/incidents/config/impact-fieldshttps://api.ap2.datadoghq.com/api/v2/incidents/config/impact-fieldshttps://api.uk1.datadoghq.com/api/v2/incidents/config/impact-fieldshttps://api.ddog-gov.com/api/v2/incidents/config/impact-fieldshttps://api.us2.ddog-gov.com/api/v2/incidents/config/impact-fieldsPrésentation
Create an impact field for incidents.
OAuth apps require the incident_settings_write authorization scope to access this endpoint.
Requête
Body Data (required)
Impact field payload.
data [required]Impact field data in a create request.
attributes [required]Attributes for creating an impact field.
display_name [required]The display name of the impact field.
field_choicesThe choices for dropdown or multiselect fields.
descriptionThe description of the choice.
display_name [required]The display name of the choice.
value [required]The value of the choice.
field_type [required]The type of an impact field.
dropdown, text, textarray, metrictag, number, datetime, multiselectname [required]The normalized name of the impact field (used as identifier).
tag_keyThe tag key associated with the field (for metrictag type).
relationships [required]Relationships for an impact field create request.
incident_type [required]Relationship to an incident type.
data [required]Relationship to incident type object.
id [required]The incident type's ID.
type [required]Incident type resource type.
incident_typesincident_typestype [required]Impact field resource type.
impact_fields{
"data": {
"attributes": {
"display_name": "Customer Impact Scope",
"field_choices": [
{
"description": "Affects all customers",
"display_name": "Critical",
"value": "critical"
}
],
"field_type": "dropdown",
"name": "customer_impact_scope",
"tag_key": "env"
},
"relationships": {
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}
},
"type": "impact_fields"
}
}Réponse
Created
Response with a single impact field.
data [required]Impact field data in a response.
attributes [required]Attributes of an impact field in a response.
display_name [required]The display name of the impact field.
field_choicesThe choices for dropdown or multiselect fields.
descriptionThe description of the choice.
display_name [required]The display name of the choice.
value [required]The value of the choice.
field_type [required]The type of an impact field.
dropdown, text, textarray, metrictag, number, datetime, multiselectname [required]The normalized name of the impact field.
tag_keyThe tag key associated with the field.
id [required]The impact field identifier.
relationshipsRelationships for an impact field.
created_by_userRelationship to user.
data [required]Relationship to user object.
id [required]A unique identifier that represents the user.
type [required]Users resource type.
usersusersincident_typeRelationship to an incident type.
data [required]Relationship to incident type object.
id [required]The incident type's ID.
type [required]Incident type resource type.
incident_typesincident_typeslast_modified_by_userRelationship to user.
data [required]Relationship to user object.
id [required]A unique identifier that represents the user.
type [required]Users resource type.
usersuserstype [required]Impact field resource type.
impact_fieldsincludedIncluded related resources.
attributesAttributes of user object returned by the API.
emailEmail of the user.
handleHandle of the user.
iconURL of the user's icon.
nameName of the user.
uuidUUID of the user.
idID of the user.
typeUsers resource type.
usersusers{
"data": {
"attributes": {
"display_name": "Customer Impact Scope",
"field_choices": [
{
"description": "Affects all customers",
"display_name": "Critical",
"value": "critical"
}
],
"field_type": "dropdown",
"name": "customer_impact_scope",
"tag_key": "env"
},
"id": "00000000-0000-0000-0000-000000000000",
"relationships": {
"created_by_user": {
"data": {
"id": "00000000-0000-0000-2345-000000000000",
"type": "users"
}
},
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
},
"last_modified_by_user": {
"data": {
"id": "00000000-0000-0000-2345-000000000000",
"type": "users"
}
}
},
"type": "impact_fields"
},
"included": [
{
"attributes": {
"email": "string",
"handle": "string",
"icon": "string",
"name": "string",
"uuid": "string"
},
"id": "string",
"type": "users"
}
]
}Bad Request
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Unauthorized
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Forbidden
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Too many requests
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Exemple de code
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/config/impact-fields" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"display_name": "Customer Impact Scope",
"field_choices": [
{
"description": "Affects all customers",
"display_name": "All Customers",
"value": "all_customers"
},
{
"description": "Affects some customers",
"display_name": "Some Customers",
"value": "some_customers"
}
],
"field_type": "dropdown",
"name": "customer_impact_scope"
},
"relationships": {
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}
},
"type": "impact_fields"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/config/impact-fields" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"display_name": "Customer Impact Scope",
"field_choices": [
{
"description": "Affects all customers",
"display_name": "All Customers",
"value": "all_customers"
},
{
"description": "Affects some customers",
"display_name": "Some Customers",
"value": "some_customers"
}
],
"field_type": "dropdown",
"name": "customer_impact_scope"
},
"relationships": {
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}
},
"type": "impact_fields"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/config/impact-fields" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"display_name": "Customer Impact Scope",
"field_choices": [
{
"description": "Affects all customers",
"display_name": "All Customers",
"value": "all_customers"
},
{
"description": "Affects some customers",
"display_name": "Some Customers",
"value": "some_customers"
}
],
"field_type": "dropdown",
"name": "customer_impact_scope"
},
"relationships": {
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}
},
"type": "impact_fields"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/config/impact-fields" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"display_name": "Customer Impact Scope",
"field_choices": [
{
"description": "Affects all customers",
"display_name": "All Customers",
"value": "all_customers"
},
{
"description": "Affects some customers",
"display_name": "Some Customers",
"value": "some_customers"
}
],
"field_type": "dropdown",
"name": "customer_impact_scope"
},
"relationships": {
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}
},
"type": "impact_fields"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/config/impact-fields" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"display_name": "Customer Impact Scope",
"field_choices": [
{
"description": "Affects all customers",
"display_name": "All Customers",
"value": "all_customers"
},
{
"description": "Affects some customers",
"display_name": "Some Customers",
"value": "some_customers"
}
],
"field_type": "dropdown",
"name": "customer_impact_scope"
},
"relationships": {
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}
},
"type": "impact_fields"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/config/impact-fields" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"display_name": "Customer Impact Scope",
"field_choices": [
{
"description": "Affects all customers",
"display_name": "All Customers",
"value": "all_customers"
},
{
"description": "Affects some customers",
"display_name": "Some Customers",
"value": "some_customers"
}
],
"field_type": "dropdown",
"name": "customer_impact_scope"
},
"relationships": {
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}
},
"type": "impact_fields"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/config/impact-fields" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"display_name": "Customer Impact Scope",
"field_choices": [
{
"description": "Affects all customers",
"display_name": "All Customers",
"value": "all_customers"
},
{
"description": "Affects some customers",
"display_name": "Some Customers",
"value": "some_customers"
}
],
"field_type": "dropdown",
"name": "customer_impact_scope"
},
"relationships": {
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}
},
"type": "impact_fields"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/config/impact-fields" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"display_name": "Customer Impact Scope",
"field_choices": [
{
"description": "Affects all customers",
"display_name": "All Customers",
"value": "all_customers"
},
{
"description": "Affects some customers",
"display_name": "Some Customers",
"value": "some_customers"
}
],
"field_type": "dropdown",
"name": "customer_impact_scope"
},
"relationships": {
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}
},
"type": "impact_fields"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/config/impact-fields" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"display_name": "Customer Impact Scope",
"field_choices": [
{
"description": "Affects all customers",
"display_name": "All Customers",
"value": "all_customers"
},
{
"description": "Affects some customers",
"display_name": "Some Customers",
"value": "some_customers"
}
],
"field_type": "dropdown",
"name": "customer_impact_scope"
},
"relationships": {
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}
},
"type": "impact_fields"
}
}
EOF