For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/api/latest/on-call/create-on-call-schedule-overrides.md. A documentation index is available at /llms.txt.
Language
Datadog site
CAUTIONThis product is not supported for your selected Datadog site. (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

Overview

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

Path Parameters

Name
Type
Description
schedule_id [required]
string

The ID of the schedule.

Query Strings

Name
Type
Description
include
string

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

Request

Body Data (required)

Field
Type
Description
data [required]
[object]

A list of on-call schedule overrides to create.

Response

Created

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

Field
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.

Code Example

# 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": "2024-01-08T02:53:01.000000000Z",
        "start": "2024-01-07T02:53:01.000000000Z"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "00000000-aba1-0000-0000-000000000000",
            "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": "2024-01-08T02:53:01.000000000Z",
        "start": "2024-01-07T02:53:01.000000000Z"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "00000000-aba1-0000-0000-000000000000",
            "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": "2024-01-08T02:53:01.000000000Z",
        "start": "2024-01-07T02:53:01.000000000Z"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "00000000-aba1-0000-0000-000000000000",
            "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": "2024-01-08T02:53:01.000000000Z",
        "start": "2024-01-07T02:53:01.000000000Z"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "00000000-aba1-0000-0000-000000000000",
            "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": "2024-01-08T02:53:01.000000000Z",
        "start": "2024-01-07T02:53:01.000000000Z"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "00000000-aba1-0000-0000-000000000000",
            "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": "2024-01-08T02:53:01.000000000Z",
        "start": "2024-01-07T02:53:01.000000000Z"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "00000000-aba1-0000-0000-000000000000",
            "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": "2024-01-08T02:53:01.000000000Z",
        "start": "2024-01-07T02:53:01.000000000Z"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "00000000-aba1-0000-0000-000000000000",
            "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": "2024-01-08T02:53:01.000000000Z",
        "start": "2024-01-07T02:53:01.000000000Z"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "00000000-aba1-0000-0000-000000000000",
            "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": "2024-01-08T02:53:01.000000000Z",
        "start": "2024-01-07T02:53:01.000000000Z"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "00000000-aba1-0000-0000-000000000000",
            "type": "users"
          }
        }
      },
      "type": "overrides"
    }
  ]
}
EOF