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

Mute a host

POSThttps://api.datadoghq.com/api/v1/host/{host_name}/mutehttps://api.us3.datadoghq.com/api/v1/host/{host_name}/mutehttps://api.us5.datadoghq.com/api/v1/host/{host_name}/mutehttps://api.datadoghq.eu/api/v1/host/{host_name}/mutehttps://api.ap1.datadoghq.com/api/v1/host/{host_name}/mutehttps://api.ap2.datadoghq.com/api/v1/host/{host_name}/mutehttps://api.uk1.datadoghq.com/api/v1/host/{host_name}/mutehttps://api.ddog-gov.com/api/v1/host/{host_name}/mutehttps://api.us2.ddog-gov.com/api/v1/host/{host_name}/mute

Overview

Mute a host. Note: This creates a Downtime V2 for the host.

Arguments

Path Parameters

Name
Type
Description
host_name [required]
string

Name of the host to mute.

Request

Body Data (required)

Mute a host request body.

Field
Type
Description
end
int64

POSIX timestamp in seconds when the host is unmuted. If omitted, the host remains muted until explicitly unmuted.

message
string

Message to associate with the muting of this host.

override
boolean

If true and the host is already muted, replaces existing host mute settings.

Response

OK

Response with the list of muted host for your organization.

Field
Type
Description
action
string

Action applied to the hosts.

end
int64

POSIX timestamp in seconds when the host is unmuted.

hostname
string

The host name.

message
string

Message associated with the mute.

Code Example

Mute a host
# Path parameters
export host_name="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/host/${host_name}/mute" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "end": 1579098130,
  "message": "Muting this host for a test!",
  "override": false
}
EOF
# Path parameters
export host_name="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/host/${host_name}/mute" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "end": 1579098130,
  "message": "Muting this host for a test!",
  "override": false
}
EOF
# Path parameters
export host_name="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/host/${host_name}/mute" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "end": 1579098130,
  "message": "Muting this host for a test!",
  "override": false
}
EOF
# Path parameters
export host_name="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/host/${host_name}/mute" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "end": 1579098130,
  "message": "Muting this host for a test!",
  "override": false
}
EOF
# Path parameters
export host_name="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/host/${host_name}/mute" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "end": 1579098130,
  "message": "Muting this host for a test!",
  "override": false
}
EOF
# Path parameters
export host_name="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/host/${host_name}/mute" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "end": 1579098130,
  "message": "Muting this host for a test!",
  "override": false
}
EOF
# Path parameters
export host_name="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/host/${host_name}/mute" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "end": 1579098130,
  "message": "Muting this host for a test!",
  "override": false
}
EOF
# Path parameters
export host_name="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/host/${host_name}/mute" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "end": 1579098130,
  "message": "Muting this host for a test!",
  "override": false
}
EOF
# Path parameters
export host_name="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/host/${host_name}/mute" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "end": 1579098130,
  "message": "Muting this host for a test!",
  "override": false
}
EOF