For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/ko/api/latest/on-call/set-on-call-team-routing-rules.md. A documentation index is available at /llms.txt.
Language
Datadog site
주의이 제품은 선택한 Datadog 사이트에서 지원되지 않습니다. (US2-FED).

On-call 팀 라우팅 규칙 설정

PUThttps://api.datadoghq.com/api/v2/on-call/teams/{team_id}/routing-ruleshttps://api.us3.datadoghq.com/api/v2/on-call/teams/{team_id}/routing-ruleshttps://api.us5.datadoghq.com/api/v2/on-call/teams/{team_id}/routing-ruleshttps://api.datadoghq.eu/api/v2/on-call/teams/{team_id}/routing-ruleshttps://api.ap1.datadoghq.com/api/v2/on-call/teams/{team_id}/routing-ruleshttps://api.ap2.datadoghq.com/api/v2/on-call/teams/{team_id}/routing-ruleshttps://api.uk1.datadoghq.com/api/v2/on-call/teams/{team_id}/routing-ruleshttps://api.ddog-gov.com/api/v2/on-call/teams/{team_id}/routing-ruleshttps://api.us2.ddog-gov.com/api/v2/on-call/teams/{team_id}/routing-rules

개요

팀의 On-Call 라우팅 규칙을 설정합니다.

This endpoint requires the on_call_write permission.

인수

경로 파라미터

이름
유형
설명
team_id [required]
string

The team ID

쿼리 문자열

이름
유형
설명
include
string

Comma-separated list of included relationships to be returned. Allowed values: rules, rules.policy.

요청

Body Data (required)

항목
유형
설명
data
object

데이터 페이로드를 포함하여 팀 라우팅 규칙을 생성하거나 업데이트하라는 요청을 나타냅니다.

응답

OK

Represents a complete set of team routing rules, including data and optionally included related resources.

항목
유형
설명
data
object

Represents the top-level data object for team routing rules, containing the ID, relationships, and resource type.

included
[<oneOf>]

Provides related routing rules or other included resources.

코드 예시

Set On-Call team routing rules returns "OK" response
# Path parameters
export team_id="27590dae-47be-4a7d-9abf-8f4e45124020"

# 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 PUT "https://api.${DD_SITE}/api/v2/on-call/teams/${team_id}/routing-rules" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "rules": [
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low"
            }
          ],
          "query": "tags.service:time_restrictions",
          "time_restriction": {
            "time_zone": "Europe/Paris",
            "restrictions": [
              {
                "end_day": "monday",
                "end_time": "17:00:00",
                "start_day": "monday",
                "start_time": "09:00:00"
              },
              {
                "end_day": "tuesday",
                "end_time": "17:00:00",
                "start_day": "tuesday",
                "start_time": "09:00:00"
              }
            ]
          }
        },
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low",
              "ack_timeout_minutes": 30,
              "support_hours": {
                "time_zone": "Europe/Paris",
                "restrictions": [
                  {
                    "end_day": "wednesday",
                    "end_time": "17:00:00",
                    "start_day": "wednesday",
                    "start_time": "09:00:00"
                  },
                  {
                    "end_day": "thursday",
                    "end_time": "17:00:00",
                    "start_day": "thursday",
                    "start_time": "09:00:00"
                  }
                ]
              }
            }
          ],
          "query": "tags.service:support_hours_and_acknowledgment_timeout"
        },
        {
          "policy_id": "ab000000-0000-0000-0000-000000000000",
          "query": "tags.service:legacy_policy_definition",
          "urgency": "low"
        },
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low"
            }
          ],
          "query": ""
        }
      ]
    },
    "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
    "type": "team_routing_rules"
  }
}
EOF
# Path parameters
export team_id="27590dae-47be-4a7d-9abf-8f4e45124020"

# 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 PUT "https://api.${DD_SITE}/api/v2/on-call/teams/${team_id}/routing-rules" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "rules": [
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low"
            }
          ],
          "query": "tags.service:time_restrictions",
          "time_restriction": {
            "time_zone": "Europe/Paris",
            "restrictions": [
              {
                "end_day": "monday",
                "end_time": "17:00:00",
                "start_day": "monday",
                "start_time": "09:00:00"
              },
              {
                "end_day": "tuesday",
                "end_time": "17:00:00",
                "start_day": "tuesday",
                "start_time": "09:00:00"
              }
            ]
          }
        },
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low",
              "ack_timeout_minutes": 30,
              "support_hours": {
                "time_zone": "Europe/Paris",
                "restrictions": [
                  {
                    "end_day": "wednesday",
                    "end_time": "17:00:00",
                    "start_day": "wednesday",
                    "start_time": "09:00:00"
                  },
                  {
                    "end_day": "thursday",
                    "end_time": "17:00:00",
                    "start_day": "thursday",
                    "start_time": "09:00:00"
                  }
                ]
              }
            }
          ],
          "query": "tags.service:support_hours_and_acknowledgment_timeout"
        },
        {
          "policy_id": "ab000000-0000-0000-0000-000000000000",
          "query": "tags.service:legacy_policy_definition",
          "urgency": "low"
        },
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low"
            }
          ],
          "query": ""
        }
      ]
    },
    "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
    "type": "team_routing_rules"
  }
}
EOF
# Path parameters
export team_id="27590dae-47be-4a7d-9abf-8f4e45124020"

# 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 PUT "https://api.${DD_SITE}/api/v2/on-call/teams/${team_id}/routing-rules" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "rules": [
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low"
            }
          ],
          "query": "tags.service:time_restrictions",
          "time_restriction": {
            "time_zone": "Europe/Paris",
            "restrictions": [
              {
                "end_day": "monday",
                "end_time": "17:00:00",
                "start_day": "monday",
                "start_time": "09:00:00"
              },
              {
                "end_day": "tuesday",
                "end_time": "17:00:00",
                "start_day": "tuesday",
                "start_time": "09:00:00"
              }
            ]
          }
        },
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low",
              "ack_timeout_minutes": 30,
              "support_hours": {
                "time_zone": "Europe/Paris",
                "restrictions": [
                  {
                    "end_day": "wednesday",
                    "end_time": "17:00:00",
                    "start_day": "wednesday",
                    "start_time": "09:00:00"
                  },
                  {
                    "end_day": "thursday",
                    "end_time": "17:00:00",
                    "start_day": "thursday",
                    "start_time": "09:00:00"
                  }
                ]
              }
            }
          ],
          "query": "tags.service:support_hours_and_acknowledgment_timeout"
        },
        {
          "policy_id": "ab000000-0000-0000-0000-000000000000",
          "query": "tags.service:legacy_policy_definition",
          "urgency": "low"
        },
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low"
            }
          ],
          "query": ""
        }
      ]
    },
    "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
    "type": "team_routing_rules"
  }
}
EOF
# Path parameters
export team_id="27590dae-47be-4a7d-9abf-8f4e45124020"

# 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 PUT "https://api.${DD_SITE}/api/v2/on-call/teams/${team_id}/routing-rules" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "rules": [
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low"
            }
          ],
          "query": "tags.service:time_restrictions",
          "time_restriction": {
            "time_zone": "Europe/Paris",
            "restrictions": [
              {
                "end_day": "monday",
                "end_time": "17:00:00",
                "start_day": "monday",
                "start_time": "09:00:00"
              },
              {
                "end_day": "tuesday",
                "end_time": "17:00:00",
                "start_day": "tuesday",
                "start_time": "09:00:00"
              }
            ]
          }
        },
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low",
              "ack_timeout_minutes": 30,
              "support_hours": {
                "time_zone": "Europe/Paris",
                "restrictions": [
                  {
                    "end_day": "wednesday",
                    "end_time": "17:00:00",
                    "start_day": "wednesday",
                    "start_time": "09:00:00"
                  },
                  {
                    "end_day": "thursday",
                    "end_time": "17:00:00",
                    "start_day": "thursday",
                    "start_time": "09:00:00"
                  }
                ]
              }
            }
          ],
          "query": "tags.service:support_hours_and_acknowledgment_timeout"
        },
        {
          "policy_id": "ab000000-0000-0000-0000-000000000000",
          "query": "tags.service:legacy_policy_definition",
          "urgency": "low"
        },
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low"
            }
          ],
          "query": ""
        }
      ]
    },
    "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
    "type": "team_routing_rules"
  }
}
EOF
# Path parameters
export team_id="27590dae-47be-4a7d-9abf-8f4e45124020"

# 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 PUT "https://api.${DD_SITE}/api/v2/on-call/teams/${team_id}/routing-rules" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "rules": [
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low"
            }
          ],
          "query": "tags.service:time_restrictions",
          "time_restriction": {
            "time_zone": "Europe/Paris",
            "restrictions": [
              {
                "end_day": "monday",
                "end_time": "17:00:00",
                "start_day": "monday",
                "start_time": "09:00:00"
              },
              {
                "end_day": "tuesday",
                "end_time": "17:00:00",
                "start_day": "tuesday",
                "start_time": "09:00:00"
              }
            ]
          }
        },
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low",
              "ack_timeout_minutes": 30,
              "support_hours": {
                "time_zone": "Europe/Paris",
                "restrictions": [
                  {
                    "end_day": "wednesday",
                    "end_time": "17:00:00",
                    "start_day": "wednesday",
                    "start_time": "09:00:00"
                  },
                  {
                    "end_day": "thursday",
                    "end_time": "17:00:00",
                    "start_day": "thursday",
                    "start_time": "09:00:00"
                  }
                ]
              }
            }
          ],
          "query": "tags.service:support_hours_and_acknowledgment_timeout"
        },
        {
          "policy_id": "ab000000-0000-0000-0000-000000000000",
          "query": "tags.service:legacy_policy_definition",
          "urgency": "low"
        },
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low"
            }
          ],
          "query": ""
        }
      ]
    },
    "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
    "type": "team_routing_rules"
  }
}
EOF
# Path parameters
export team_id="27590dae-47be-4a7d-9abf-8f4e45124020"

# 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 PUT "https://api.${DD_SITE}/api/v2/on-call/teams/${team_id}/routing-rules" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "rules": [
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low"
            }
          ],
          "query": "tags.service:time_restrictions",
          "time_restriction": {
            "time_zone": "Europe/Paris",
            "restrictions": [
              {
                "end_day": "monday",
                "end_time": "17:00:00",
                "start_day": "monday",
                "start_time": "09:00:00"
              },
              {
                "end_day": "tuesday",
                "end_time": "17:00:00",
                "start_day": "tuesday",
                "start_time": "09:00:00"
              }
            ]
          }
        },
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low",
              "ack_timeout_minutes": 30,
              "support_hours": {
                "time_zone": "Europe/Paris",
                "restrictions": [
                  {
                    "end_day": "wednesday",
                    "end_time": "17:00:00",
                    "start_day": "wednesday",
                    "start_time": "09:00:00"
                  },
                  {
                    "end_day": "thursday",
                    "end_time": "17:00:00",
                    "start_day": "thursday",
                    "start_time": "09:00:00"
                  }
                ]
              }
            }
          ],
          "query": "tags.service:support_hours_and_acknowledgment_timeout"
        },
        {
          "policy_id": "ab000000-0000-0000-0000-000000000000",
          "query": "tags.service:legacy_policy_definition",
          "urgency": "low"
        },
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low"
            }
          ],
          "query": ""
        }
      ]
    },
    "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
    "type": "team_routing_rules"
  }
}
EOF
# Path parameters
export team_id="27590dae-47be-4a7d-9abf-8f4e45124020"

# 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 PUT "https://api.${DD_SITE}/api/v2/on-call/teams/${team_id}/routing-rules" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "rules": [
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low"
            }
          ],
          "query": "tags.service:time_restrictions",
          "time_restriction": {
            "time_zone": "Europe/Paris",
            "restrictions": [
              {
                "end_day": "monday",
                "end_time": "17:00:00",
                "start_day": "monday",
                "start_time": "09:00:00"
              },
              {
                "end_day": "tuesday",
                "end_time": "17:00:00",
                "start_day": "tuesday",
                "start_time": "09:00:00"
              }
            ]
          }
        },
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low",
              "ack_timeout_minutes": 30,
              "support_hours": {
                "time_zone": "Europe/Paris",
                "restrictions": [
                  {
                    "end_day": "wednesday",
                    "end_time": "17:00:00",
                    "start_day": "wednesday",
                    "start_time": "09:00:00"
                  },
                  {
                    "end_day": "thursday",
                    "end_time": "17:00:00",
                    "start_day": "thursday",
                    "start_time": "09:00:00"
                  }
                ]
              }
            }
          ],
          "query": "tags.service:support_hours_and_acknowledgment_timeout"
        },
        {
          "policy_id": "ab000000-0000-0000-0000-000000000000",
          "query": "tags.service:legacy_policy_definition",
          "urgency": "low"
        },
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low"
            }
          ],
          "query": ""
        }
      ]
    },
    "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
    "type": "team_routing_rules"
  }
}
EOF
# Path parameters
export team_id="27590dae-47be-4a7d-9abf-8f4e45124020"

# 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 PUT "https://api.${DD_SITE}/api/v2/on-call/teams/${team_id}/routing-rules" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "rules": [
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low"
            }
          ],
          "query": "tags.service:time_restrictions",
          "time_restriction": {
            "time_zone": "Europe/Paris",
            "restrictions": [
              {
                "end_day": "monday",
                "end_time": "17:00:00",
                "start_day": "monday",
                "start_time": "09:00:00"
              },
              {
                "end_day": "tuesday",
                "end_time": "17:00:00",
                "start_day": "tuesday",
                "start_time": "09:00:00"
              }
            ]
          }
        },
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low",
              "ack_timeout_minutes": 30,
              "support_hours": {
                "time_zone": "Europe/Paris",
                "restrictions": [
                  {
                    "end_day": "wednesday",
                    "end_time": "17:00:00",
                    "start_day": "wednesday",
                    "start_time": "09:00:00"
                  },
                  {
                    "end_day": "thursday",
                    "end_time": "17:00:00",
                    "start_day": "thursday",
                    "start_time": "09:00:00"
                  }
                ]
              }
            }
          ],
          "query": "tags.service:support_hours_and_acknowledgment_timeout"
        },
        {
          "policy_id": "ab000000-0000-0000-0000-000000000000",
          "query": "tags.service:legacy_policy_definition",
          "urgency": "low"
        },
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low"
            }
          ],
          "query": ""
        }
      ]
    },
    "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
    "type": "team_routing_rules"
  }
}
EOF
# Path parameters
export team_id="27590dae-47be-4a7d-9abf-8f4e45124020"

# 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 PUT "https://api.${DD_SITE}/api/v2/on-call/teams/${team_id}/routing-rules" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "rules": [
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low"
            }
          ],
          "query": "tags.service:time_restrictions",
          "time_restriction": {
            "time_zone": "Europe/Paris",
            "restrictions": [
              {
                "end_day": "monday",
                "end_time": "17:00:00",
                "start_day": "monday",
                "start_time": "09:00:00"
              },
              {
                "end_day": "tuesday",
                "end_time": "17:00:00",
                "start_day": "tuesday",
                "start_time": "09:00:00"
              }
            ]
          }
        },
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low",
              "ack_timeout_minutes": 30,
              "support_hours": {
                "time_zone": "Europe/Paris",
                "restrictions": [
                  {
                    "end_day": "wednesday",
                    "end_time": "17:00:00",
                    "start_day": "wednesday",
                    "start_time": "09:00:00"
                  },
                  {
                    "end_day": "thursday",
                    "end_time": "17:00:00",
                    "start_day": "thursday",
                    "start_time": "09:00:00"
                  }
                ]
              }
            }
          ],
          "query": "tags.service:support_hours_and_acknowledgment_timeout"
        },
        {
          "policy_id": "ab000000-0000-0000-0000-000000000000",
          "query": "tags.service:legacy_policy_definition",
          "urgency": "low"
        },
        {
          "actions": [
            {
              "type": "escalation_policy",
              "policy_id": "ab000000-0000-0000-0000-000000000000",
              "urgency": "low"
            }
          ],
          "query": ""
        }
      ]
    },
    "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
    "type": "team_routing_rules"
  }
}
EOF