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/on-call/create-on-call-schedule-overrides.md. A documentation index is available at /llms.txt.
Language
Datadog site
ATTENTIONCe produit n'est pas pris en charge par le site Datadog que vous avez sélectionné. (US2-FED).

Create On-Call schedule overrides

POSThttps://api.datadoghq.com/api/v2/on-call/schedules/{schedule_id}/overrideshttps://api.us3.datadoghq.com/api/v2/on-call/schedules/{schedule_id}/overrideshttps://api.us5.datadoghq.com/api/v2/on-call/schedules/{schedule_id}/overrideshttps://api.datadoghq.eu/api/v2/on-call/schedules/{schedule_id}/overrideshttps://api.ap1.datadoghq.com/api/v2/on-call/schedules/{schedule_id}/overrideshttps://api.ap2.datadoghq.com/api/v2/on-call/schedules/{schedule_id}/overrideshttps://api.uk1.datadoghq.com/api/v2/on-call/schedules/{schedule_id}/overrideshttps://api.ddog-gov.com/api/v2/on-call/schedules/{schedule_id}/overrideshttps://api.us2.ddog-gov.com/api/v2/on-call/schedules/{schedule_id}/overrides

Présentation

Create one or more overrides for the specified On-Call schedule.

This endpoint requires any of the following permissions:

  • on_call_respond
  • on_call_write

Arguments

Paramètres du chemin

Name
Type
Description
schedule_id [required]
string

The ID of the schedule.

Chaînes de requête

Name
Type
Description
include
string

Comma-separated list of included relationships to be returned. Allowed values: user, overridden_user, user.color.

Requête

Body Data (required)

Champ
Type
Description
data [required]
[object]

A list of on-call schedule overrides to create.

Réponse

Created

The on-call schedule overrides that were created, and any related included resources (such as users).

Champ
Type
Description
data [required]
[object]

The on-call schedule overrides that were created.

included
[<oneOf>]

Related resources referenced in the overrides' relationships, such as users.

Exemple de code

Create On-Call schedule overrides returns "Created" response
# Path parameters
export schedule_id="3653d3c6-0c75-11ea-ad28-fb5701eabc7d"

# 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/on-call/schedules/${schedule_id}/overrides" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "attributes": {
        "end": "2021-11-12T11:11:11+00:00",
        "start": "2021-11-11T11:11:11+00:00"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "string",
            "type": "users"
          }
        }
      },
      "type": "overrides"
    }
  ]
}
EOF
# Path parameters
export schedule_id="3653d3c6-0c75-11ea-ad28-fb5701eabc7d"

# 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/on-call/schedules/${schedule_id}/overrides" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "attributes": {
        "end": "2021-11-12T11:11:11+00:00",
        "start": "2021-11-11T11:11:11+00:00"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "string",
            "type": "users"
          }
        }
      },
      "type": "overrides"
    }
  ]
}
EOF
# Path parameters
export schedule_id="3653d3c6-0c75-11ea-ad28-fb5701eabc7d"

# 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/on-call/schedules/${schedule_id}/overrides" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "attributes": {
        "end": "2021-11-12T11:11:11+00:00",
        "start": "2021-11-11T11:11:11+00:00"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "string",
            "type": "users"
          }
        }
      },
      "type": "overrides"
    }
  ]
}
EOF
# Path parameters
export schedule_id="3653d3c6-0c75-11ea-ad28-fb5701eabc7d"

# 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/on-call/schedules/${schedule_id}/overrides" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "attributes": {
        "end": "2021-11-12T11:11:11+00:00",
        "start": "2021-11-11T11:11:11+00:00"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "string",
            "type": "users"
          }
        }
      },
      "type": "overrides"
    }
  ]
}
EOF
# Path parameters
export schedule_id="3653d3c6-0c75-11ea-ad28-fb5701eabc7d"

# 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/on-call/schedules/${schedule_id}/overrides" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "attributes": {
        "end": "2021-11-12T11:11:11+00:00",
        "start": "2021-11-11T11:11:11+00:00"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "string",
            "type": "users"
          }
        }
      },
      "type": "overrides"
    }
  ]
}
EOF
# Path parameters
export schedule_id="3653d3c6-0c75-11ea-ad28-fb5701eabc7d"

# 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/on-call/schedules/${schedule_id}/overrides" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "attributes": {
        "end": "2021-11-12T11:11:11+00:00",
        "start": "2021-11-11T11:11:11+00:00"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "string",
            "type": "users"
          }
        }
      },
      "type": "overrides"
    }
  ]
}
EOF
# Path parameters
export schedule_id="3653d3c6-0c75-11ea-ad28-fb5701eabc7d"

# 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/on-call/schedules/${schedule_id}/overrides" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "attributes": {
        "end": "2021-11-12T11:11:11+00:00",
        "start": "2021-11-11T11:11:11+00:00"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "string",
            "type": "users"
          }
        }
      },
      "type": "overrides"
    }
  ]
}
EOF
# Path parameters
export schedule_id="3653d3c6-0c75-11ea-ad28-fb5701eabc7d"

# 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/on-call/schedules/${schedule_id}/overrides" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "attributes": {
        "end": "2021-11-12T11:11:11+00:00",
        "start": "2021-11-11T11:11:11+00:00"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "string",
            "type": "users"
          }
        }
      },
      "type": "overrides"
    }
  ]
}
EOF
# Path parameters
export schedule_id="3653d3c6-0c75-11ea-ad28-fb5701eabc7d"

# 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/on-call/schedules/${schedule_id}/overrides" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "attributes": {
        "end": "2021-11-12T11:11:11+00:00",
        "start": "2021-11-11T11:11:11+00:00"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "string",
            "type": "users"
          }
        }
      },
      "type": "overrides"
    }
  ]
}
EOF