v3

latestOpenAPI 3.0.12026-07-31240345599.7 KB
Routing rules

Create routing rule

Creates a routing rule with the given properties.

post/api/{cloudId}/v1/teams/{teamId}/routing-rules

Path parameters

teamIdstring required

Identifier of the routing rules owning team.

Request body

namestring

Name of the routing rule.

orderinteger

The order of the team routing rule within the rules. Order value is actually the index of the team routing rule whose minimum value is 0 and whose maximum value is n-1 (number of team routing rules is n).

timezonestring

Timezone of team routing rule. If timezone field is not given, account timezone is used as default.

Example request

{
  "name": "My Empty Rule",
  "order": 1,
  "criteria": {
    "type": "match-all"
  },
  "notify": {
    "type": "none"
  }
}

Response

Returned if the request is successful.

idstring

Identifier of the routing rule.

namestring

Name of the routing rule.

isDefaultboolean

Indicates whether given routing rule is default or not.

orderinteger

The order of the team routing rule within the rules. Order value is actually the index of the team routing rule whose minimum value is 0 and whose maximum value is n-1 (number of team routing rules is n).

timezonestring

Timezone of team routing rule. If timezone field is not given, account timezone is used as default.

Example response

{
  "id": "4292c912-12ac-4ac0-b195-9484fbb98c5c",
  "name": "My Primary Routing Rule",
  "isDefault": "true",
  "criteria": {
    "type": "match-any-condition",
    "conditions": [
      {
        "field": "message",
        "operation": "matches",
        "expectedValue": "my critical alert"
      }
    ]
  },
  "timezone": "Europe/Istanbul",
  "timeRestriction": {
    "type": "weekday-and-time-of-day",
    "restrictions": [
      {
        "startDay": "monday",
        "endDay": "friday",
        "startHour": 13,
        "endHour": 18,
        "startMin": 0,
        "endMin": 0
      }
    ]
  },
  "order": 0,
  "notify": {
    "id": "d2acfc54-a145-451e-a963-ffbc089baea1",
    "type": "escalation"
  }
}