For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/fr/api/latest/monitors/unmute-a-monitor.md. A documentation index is available at /llms.txt.
Language
Datadog site

Réactiver un monitor

POSThttps://api.datadoghq.com/api/v1/monitor/{monitor_id}/unmutehttps://api.us3.datadoghq.com/api/v1/monitor/{monitor_id}/unmutehttps://api.us5.datadoghq.com/api/v1/monitor/{monitor_id}/unmutehttps://api.datadoghq.eu/api/v1/monitor/{monitor_id}/unmutehttps://api.ap1.datadoghq.com/api/v1/monitor/{monitor_id}/unmutehttps://api.ap2.datadoghq.com/api/v1/monitor/{monitor_id}/unmutehttps://api.uk1.datadoghq.com/api/v1/monitor/{monitor_id}/unmutehttps://api.ddog-gov.com/api/v1/monitor/{monitor_id}/unmutehttps://api.us2.ddog-gov.com/api/v1/monitor/{monitor_id}/unmute

Présentation

Réactivez le monitor spécifié

This endpoint requires the monitors_write permission.

OAuth apps require the monitors_write authorization scope to access this endpoint.

Arguments

Paramètres du chemin

Name
Type
Description
monitor_id [required]
integer

The id of the monitor

Chaînes de requête

Name
Type
Description
scope
string

The scope to apply the mute to. For example, if your alert is grouped by {host}, you might mute host:app1.

all_scopes
boolean

Clear muting across all scopes. Default is false.

Réponse

OK

Object describing a monitor.

Champ
Type
Description
assets
[object]

The list of monitor assets tied to a monitor, which represents key links for users to take action on monitor alerts (for example, runbooks).

created
date-time

Timestamp of the monitor creation.

creator
object

Object describing the creator of the shared element.

deleted
date-time

Whether or not the monitor is deleted. (Always null)

draft_status
enum

Indicates whether the monitor is in a draft or published state.

draft: The monitor appears as Draft and does not send notifications. published: The monitor is active and evaluates conditions and notify as configured.

This field is in preview. The draft value is only available to customers with the feature enabled.

Default: published
Allowed enum values: draft, published
id
int64

ID of this monitor.

matching_downtimes
[object]

A list of active v1 downtimes that match this monitor.

message
string

A message to include with notifications for this monitor.

modified
date-time

Last timestamp when the monitor was edited.

multi
boolean

Whether or not the monitor is broken down on different groups.

name
string

The monitor name.

options
object

List of options associated with your monitor.

overall_state
enum

The different states your monitor can be in.

Allowed enum values: Alert, Ignored, No Data, OK, Skipped, Unknown, Warn
priority
int64

Integer from 1 (high) to 5 (low) indicating alert severity.

query [required]
string

The monitor query.

restricted_roles
[string]

A list of unique role identifiers to define which roles are allowed to edit the monitor. The unique identifiers for all roles can be pulled from the Roles API and are located in the data.id field. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. You can use the Restriction Policies API to manage write authorization for individual monitors by teams and users, in addition to roles.

state
object

Wrapper object with the different monitor states.

tags
[string]

Tags associated to your monitor.

type [required]
enum

The type of the monitor. For more information about type, see the monitor options docs.

Allowed enum values: composite, event alert, log alert, metric alert, process alert, query alert, rum alert, service check, synthetics alert, trace-analytics alert
Show 13 moreslo alert, event-v2 alert, audit alert, ci-pipelines alert, ci-tests alert, error-tracking alert, database-monitoring alert, network-performance alert, cost alert, data-quality alert, network-path alert, data-jobs alert, llm-observability alert

Exemple de code

Réactiver un monitor
# Path parameters
export monitor_id="CHANGE_ME"

# 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/v1/monitor/${monitor_id}/unmute" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export monitor_id="CHANGE_ME"

# 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/v1/monitor/${monitor_id}/unmute" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export monitor_id="CHANGE_ME"

# 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/v1/monitor/${monitor_id}/unmute" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export monitor_id="CHANGE_ME"

# 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/v1/monitor/${monitor_id}/unmute" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export monitor_id="CHANGE_ME"

# 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/v1/monitor/${monitor_id}/unmute" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export monitor_id="CHANGE_ME"

# 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/v1/monitor/${monitor_id}/unmute" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export monitor_id="CHANGE_ME"

# 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/v1/monitor/${monitor_id}/unmute" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export monitor_id="CHANGE_ME"

# 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/v1/monitor/${monitor_id}/unmute" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export monitor_id="CHANGE_ME"

# 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/v1/monitor/${monitor_id}/unmute" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"