For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/fr/api/latest/report-schedules/toggle-a-report-schedule.md. A documentation index is available at /llms.txt.
Language
Datadog site

Toggle a report schedule

PATCHhttps://api.datadoghq.com/api/v2/reporting/schedule/{schedule_uuid}/togglehttps://api.us3.datadoghq.com/api/v2/reporting/schedule/{schedule_uuid}/togglehttps://api.us5.datadoghq.com/api/v2/reporting/schedule/{schedule_uuid}/togglehttps://api.datadoghq.eu/api/v2/reporting/schedule/{schedule_uuid}/togglehttps://api.ap1.datadoghq.com/api/v2/reporting/schedule/{schedule_uuid}/togglehttps://api.ap2.datadoghq.com/api/v2/reporting/schedule/{schedule_uuid}/togglehttps://api.uk1.datadoghq.com/api/v2/reporting/schedule/{schedule_uuid}/togglehttps://api.ddog-gov.com/api/v2/reporting/schedule/{schedule_uuid}/togglehttps://api.us2.ddog-gov.com/api/v2/reporting/schedule/{schedule_uuid}/toggle

Présentation

Activate or pause a report schedule by setting its status to active or inactive. Requires a reporting write permission appropriate to the targeted resource type and schedule ownership.

Arguments

Paramètres du chemin

Name
Type
Description
schedule_uuid [required]
string

The unique identifier of the report schedule to toggle.

Requête

Body Data (required)

Champ
Type
Description
data [required]
object

The JSON:API data object for a report schedule toggle request.

Réponse

OK

Response containing a single report schedule.

Champ
Type
Description
data [required]
object

The JSON:API data object representing a report schedule.

included
[<oneOf>]

Related resources included with the report schedule, such as the author.

Exemple de code

Toggle a report schedule
# Path parameters
export schedule_uuid="11111111-2222-3333-4444-555555555555"

# 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 PATCH "https://api.${DD_SITE}/api/v2/reporting/schedule/${schedule_uuid}/toggle" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "status": "inactive"
    },
    "type": "schedule"
  }
}
EOF
# Path parameters
export schedule_uuid="11111111-2222-3333-4444-555555555555"

# 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 PATCH "https://api.${DD_SITE}/api/v2/reporting/schedule/${schedule_uuid}/toggle" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "status": "inactive"
    },
    "type": "schedule"
  }
}
EOF
# Path parameters
export schedule_uuid="11111111-2222-3333-4444-555555555555"

# 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 PATCH "https://api.${DD_SITE}/api/v2/reporting/schedule/${schedule_uuid}/toggle" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "status": "inactive"
    },
    "type": "schedule"
  }
}
EOF
# Path parameters
export schedule_uuid="11111111-2222-3333-4444-555555555555"

# 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 PATCH "https://api.${DD_SITE}/api/v2/reporting/schedule/${schedule_uuid}/toggle" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "status": "inactive"
    },
    "type": "schedule"
  }
}
EOF
# Path parameters
export schedule_uuid="11111111-2222-3333-4444-555555555555"

# 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 PATCH "https://api.${DD_SITE}/api/v2/reporting/schedule/${schedule_uuid}/toggle" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "status": "inactive"
    },
    "type": "schedule"
  }
}
EOF
# Path parameters
export schedule_uuid="11111111-2222-3333-4444-555555555555"

# 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 PATCH "https://api.${DD_SITE}/api/v2/reporting/schedule/${schedule_uuid}/toggle" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "status": "inactive"
    },
    "type": "schedule"
  }
}
EOF
# Path parameters
export schedule_uuid="11111111-2222-3333-4444-555555555555"

# 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 PATCH "https://api.${DD_SITE}/api/v2/reporting/schedule/${schedule_uuid}/toggle" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "status": "inactive"
    },
    "type": "schedule"
  }
}
EOF
# Path parameters
export schedule_uuid="11111111-2222-3333-4444-555555555555"

# 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 PATCH "https://api.${DD_SITE}/api/v2/reporting/schedule/${schedule_uuid}/toggle" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "status": "inactive"
    },
    "type": "schedule"
  }
}
EOF
# Path parameters
export schedule_uuid="11111111-2222-3333-4444-555555555555"

# 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 PATCH "https://api.${DD_SITE}/api/v2/reporting/schedule/${schedule_uuid}/toggle" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "status": "inactive"
    },
    "type": "schedule"
  }
}
EOF