Represents a complete set of team routing rules, including data and optionally included related resources.
Expand All
Field
Type
Description
data
object
Represents the top-level data object for team routing rules, containing the ID, relationships, and resource type.
id
string
Specifies the unique identifier of this team routing rules record.
relationships
object
Specifies relationships for team routing rules, including rule references.
rules
object
Holds references to a set of routing rules in a relationship.
data
[object]
An array of references to the routing rules associated with this team.
id [required]
string
Specifies the unique identifier for the related routing rule.
type [required]
enum
Indicates that the resource is of type 'team_routing_rules'.
Allowed enum values: team_routing_rules
default: team_routing_rules
type [required]
enum
Team routing rules resource type.
Allowed enum values: team_routing_rules
default: team_routing_rules
included
[ <oneOf>]
Provides related routing rules or other included resources.
Option 1
object
Represents a routing rule, including its attributes, relationships, and unique identifier.
attributes
object
Defines the configurable attributes of a routing rule, such as actions, query, time restriction, and urgency.
actions
[ <oneOf>]
Specifies the list of actions to perform when the routing rule matches.
Option 1
object
Sends a message to a Slack channel.
channel [required]
string
The channel ID.
type [required]
enum
Indicates that the action is a send Slack message action.
Allowed enum values: send_slack_message
default: send_slack_message
workspace [required]
string
The workspace ID.
Option 2
object
Sends a message to a Microsoft Teams channel.
channel [required]
string
The channel ID.
team [required]
string
The team ID.
tenant [required]
string
The tenant ID.
type [required]
enum
Indicates that the action is a send Microsoft Teams message action.
Allowed enum values: send_teams_message
default: send_teams_message
Option 3
object
Triggers a Workflow Automation.
handle [required]
string
The handle of the Workflow Automation to trigger.
type [required]
enum
Indicates that the action triggers a Workflow Automation.
Allowed enum values: workflow
default: workflow
Option 4
object
Triggers an escalation policy.
ack_timeout_minutes
int64
The number of minutes before an acknowledged page is re-triggered.
policy_id [required]
string
The ID of the escalation policy to route to.
support_hours
object
Support hours during which the escalation policy will be executed. Outside of these hours, the escalation policy will be on hold and triggered once the next support hours window starts. This is mutually exclusive with the top-level time_restriction field on the routing rule.
restrictions
[object]
The list of support hours time windows.
end_day
enum
A day of the week.
Allowed enum values: monday,tuesday,wednesday,thursday,friday,saturday,sunday
end_time
string
Specifies the ending time for this restriction.
start_day
enum
A day of the week.
Allowed enum values: monday,tuesday,wednesday,thursday,friday,saturday,sunday
start_time
string
Specifies the starting time for this restriction.
time_zone [required]
string
The time zone in which the support hours are expressed.
type [required]
enum
Indicates that the action pages an escalation policy. This action can be set once per routing rule item, and is mutually exclusive with the top-level policy_id field on the routing rule.
Allowed enum values: escalation_policy
default: escalation_policy
urgency
enum
Specifies the level of urgency for a routing rule (low, high, or dynamic).
Allowed enum values: low,high,dynamic
query
string
Defines the query or condition that triggers this routing rule.
time_restriction
object
Time restrictions during which the routing rule is active. Outside of these hours, the rule does not match and routing continues to subsequent rules. This is mutually exclusive with the action-level support_hours field.
restrictions [required]
[object]
Defines the list of time-based restrictions.
end_day
enum
A day of the week.
Allowed enum values: monday,tuesday,wednesday,thursday,friday,saturday,sunday
end_time
string
Specifies the ending time for this restriction.
start_day
enum
A day of the week.
Allowed enum values: monday,tuesday,wednesday,thursday,friday,saturday,sunday
start_time
string
Specifies the starting time for this restriction.
time_zone [required]
string
Specifies the time zone applicable to the restrictions.
urgency
enum
Specifies the level of urgency for a routing rule (low, high, or dynamic).
Allowed enum values: low,high,dynamic
id
string
Specifies the unique identifier of this routing rule.
relationships
object
Specifies relationships for a routing rule, linking to associated policy resources.
policy
object
Defines the relationship that links a routing rule to a policy.
data
object
Represents the policy data reference, containing the policy's ID and resource type.
id [required]
string
Specifies the unique identifier of the policy.
type [required]
enum
Indicates that the resource is of type 'policies'.
Allowed enum values: policies
default: policies
type [required]
enum
Team routing rules resource type.
Allowed enum values: team_routing_rules
"""
Get On-Call team routing rules returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.on_call_apiimportOnCallApiconfiguration=Configuration()withApiClient(configuration)asapi_client:api_instance=OnCallApi(api_client)response=api_instance.get_on_call_team_routing_rules(team_id="27590dae-47be-4a7d-9abf-8f4e45124020",)print(response)
# Get On-Call team routing rules returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::OnCallAPI.newpapi_instance.get_on_call_team_routing_rules("27590dae-47be-4a7d-9abf-8f4e45124020")
// Get On-Call team routing rules returns "OK" responsepackagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewOnCallApi(apiClient)resp,r,err:=api.GetOnCallTeamRoutingRules(ctx,"27590dae-47be-4a7d-9abf-8f4e45124020",*datadogV2.NewGetOnCallTeamRoutingRulesOptionalParameters())iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `OnCallApi.GetOnCallTeamRoutingRules`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `OnCallApi.GetOnCallTeamRoutingRules`:\n%s\n",responseContent)}
// Get On-Call team routing rules returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_on_call::GetOnCallTeamRoutingRulesOptionalParams;usedatadog_api_client::datadogV2::api_on_call::OnCallAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=OnCallAPI::with_config(configuration);letresp=api.get_on_call_team_routing_rules("27590dae-47be-4a7d-9abf-8f4e45124020".to_string(),GetOnCallTeamRoutingRulesOptionalParams::default(),).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Get On-Call team routing rules returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.OnCallApi(configuration);constparams: v2.OnCallApiGetOnCallTeamRoutingRulesRequest={teamId:"27590dae-47be-4a7d-9abf-8f4e45124020",};apiInstance.getOnCallTeamRoutingRules(params).then((data: v2.TeamRoutingRules)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));