Create alert

post/v2/environments/{environmentId}/alerts
Page View

Alert endpoints allow you to review or manage traffic alert rules, which monitor your integrations for healthy traffic. Learn about alerts.

There are two types of traffic alert rules: No Traffic or Error Threshold.

You can retrieve an alert rule, as well as create, update, or delete it. Alternatively, you can retrieve a list of alert rules. An alert rule response contains details about any related subscription links.

You can also retrieve a subscription link for an alert rule, as well as create, pause, or delete it.

Create alert

Create a traffic alert rule for a specific environment within a Redox organization. You can specify the details for the traffic alert rule via API or the Redox dashboard (create a traffic alert rule in the dashboard).

This endpoint allows you to create one alert rule at a time. To create multiple alert rules, you can create your own script and programmatically create a batch of alerts in an environment.

Request parameters and payload

cURL request example

bash
1
curl 'https://api.redoxengine.com/platform/v2/environments/{environmentId}/alerts' \
2
--request POST \
3
--header 'Authorization: Bearer $API_TOKEN' \
4
--header 'accept: application/json' \
5
--header 'content-type: application/json' \
6
--data '{
7
"name": "My important alert",
8
"alertType": {
9
"code": "no-traffic"
10
},
11
"alertConfiguration": {
12
"alertLookbackISODuration": "PT12H"
13
},
14
"notification": {
15
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
16
"type": {
17
"code": "no-traffic"
18
},
19
"configuration": {
20
"to": [
21
"exampleEmail@example.com"
22
]
23
}
24
},
25
"ignoreDaysOfWeek": [
26
"SATURDAY"
27
],
28
"ignoreHolidays": false,
29
"timeZone": "America/Adak"
30
}'

Path Parameters

  • environmentId
    required, string

    Identifies the specific environment that you're operating in or on behalf of.

Request Body Schema

    Contains the fields that you can populate to create a new alert.

  • name
    required, string

    Displays the name of the alert.

  • alertType
    required, object

    Specifies the type of alert.

    • code
      string

      Describes the alert type.

      Possible Values: no-traffic, error-threshold
  • alertConfiguration
    required, 

    Contains the alert configuration fields for the specified type of traffic alert rule.

      Defines the conditions of a No Traffic alert rule, which monitors a subscription for no completed traffic during a designated time frame.

    • alertLookbackISODuration
      string

      Specifies the ISO duration or time range that the traffic alert rule should evaluate for the trigger condition. For example, whether the condition is met in the most recent 2 hours.

  • notification
    required, object

    Contains the notification configuration fields for the specified type of traffic alert rule.

    • id
      string

      Displays the unique identifier of this notification configuration.

      Format: uuid
    • type
      object

      Specifies the type of alert.

      • code
        string

        Describes the alert type.

        Possible Values: no-traffic, error-threshold
    • configuration
      object

      Contains the configuration field for the traffic alert rule.

      • to
        Array of string

        Defines the list of email addresses that a notification is sent to whenever the traffic alert rule is either triggered or resolved. At least one email must be listed.

  • ignoreDaysOfWeek
    Array of string

    Designates the weekend days of the week that your organization won't receive notifications for this alert if triggered.

    Possible Values: SATURDAY, SUNDAY
  • ignoreHolidays
    boolean

    Indicates whether your organization will receive notifications for this alert on holidays, as specified by Redox.

  • timeZone
    nullable, string

    Indicates the time zone that will be used for ignored days. Redox doesn't send alert notifications on ignored days. Set to null if you want to use the default time zone, which is the time zone designated by your connection's organization settings. If not designated, U.S. Central time will be the default instead.

    Possible Values: America/Adak, America/Anchorage, America/Chicago, America/Denver, America/Edmonton, America/Halifax, America/Los_Angeles, America/New_York, America/Phoenix, America/Regina, America/St_Johns, America/Toronto, America/Vancouver, America/Winnipeg, Pacific/Honolulu, UTC

Response fields and example

Example payload generated from schema
1
{
2
"meta": {
3
"version": "1.0.0"
4
},
5
"payload": {
6
"alert": {
7
"id": "dc5d2a43-df19-459c-b14f-450584ce1c55",
8
"name": "My important alert",
9
"environment": {
10
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
11
},
12
"organization": {
13
"id": 122,
14
"name": "string"
15
},
16
"alertType": {
17
"code": "no-traffic"
18
},
19
"alertConfiguration": {
20
"alertLookbackISODuration": "PT12H"
21
},
22
"notification": {
23
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
24
"type": {
25
"code": "no-traffic"
26
},
27
"configuration": {
28
"to": [
29
"exampleEmail@example.com"
30
]
31
}
32
},
33
"ignoreDaysOfWeek": [
34
"SATURDAY"
35
],
36
"ignoreHolidays": false,
37
"timeZone": "America/Adak",
38
"alertLinks": [
39
{
40
"id": "dc5d2a43-df19-459c-b14f-450584ce1c55",
41
"assignment": {
42
"id": "1ee1d994-652f-44b5-9342-4b3e8b9918ee",
43
"kind": "alert"
44
},
45
"subscription": {
46
"id": "8675309",
47
"dataModel": "PatientAdmin",
48
"source": {
49
"id": "1ee1d994-652f-44b5-9342-4b3e8b9918ee",
50
"name": "string"
51
},
52
"destination": {
53
"id": "39a858ea-4474-4d04-b37e-88862fe4054d",
54
"name": "string"
55
},
56
"serviceRegion": "AWS_USA_EAST_1"
57
},
58
"connectingOrganization": {
59
"id": 122,
60
"name": "string"
61
},
62
"latestStatus": {
63
"code": "triggered",
64
"timestamp": "2024-04-28T19:17:16.719Z"
65
},
66
"environment": {
67
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
68
},
69
"createdAt": "2024-04-25T18:17:16.719Z",
70
"createdBy": {
71
"id": 0,
72
"name": "string",
73
"email": "string"
74
},
75
"updatedAt": "2024-04-25T18:17:16.719Z",
76
"updatedBy": {
77
"id": 0,
78
"name": "string",
79
"email": "string"
80
}
81
}
82
],
83
"createdAt": "2024-04-25T18:17:16.719Z",
84
"createdBy": {
85
"id": 0,
86
"name": "string",
87
"email": "string"
88
},
89
"updatedAt": "2024-04-25T18:17:16.719Z",
90
"updatedBy": {
91
"id": 0,
92
"name": "string",
93
"email": "string"
94
}
95
}
96
}
97
}
  • meta
    object
    • version
      string

      Lists the major and minor version number for the format of the returned payload. The payload format or shape may change between minor versions, like including additional or extended fields in later versions. We include the version data in each response so that you have the option to handle the signaled differences.

  • payload
    object
    • alert
      object

      Contains the related details and links for the specified alert.

      • id
        string

        Displays the unique identifier of the link for a given alert.

        Format: uuid
      • name
        string

        Displays the name of the alert.

      • environment
        object

        Contains metadata about the environment within the associated Redox organization.

        • id
          string

          Contains the unique identifier of the Redox environment.

          Format: uuid
      • organization
        object

        Contains metadata about the Redox organization.

        • id
          number

          Contains the unique identifier of the Redox organization.

        • name
          nullable, string

          Contains the human-readable name of the Redox organization.

      • alertType
        object

        Specifies the type of alert.

        • code
          string

          Describes the alert type.

          Possible Values: no-traffic, error-threshold
      • alertConfiguration

        Contains the alert configuration fields for the specified type of traffic alert rule.

          Defines the conditions of a No Traffic alert rule, which monitors a subscription for no completed traffic during a designated time frame.

        • alertLookbackISODuration
          string

          Specifies the ISO duration or time range that the traffic alert rule should evaluate for the trigger condition. For example, whether the condition is met in the most recent 2 hours.

      • notification
        object

        Contains the notification configuration fields for the specified type of traffic alert rule.

        • id
          string

          Displays the unique identifier of this notification configuration.

          Format: uuid
        • type
          object

          Specifies the type of alert.

          • code
            string

            Describes the alert type.

            Possible Values: no-traffic, error-threshold
        • configuration
          object

          Contains the configuration field for the traffic alert rule.

          • to
            Array of string

            Defines the list of email addresses that a notification is sent to whenever the traffic alert rule is either triggered or resolved. At least one email must be listed.

      • ignoreDaysOfWeek
        Array of string

        Designates the weekend days of the week that your organization won't receive notifications for this alert if triggered.

        Possible Values: SATURDAY, SUNDAY
      • ignoreHolidays
        boolean

        Indicates whether your organization will receive notifications for this alert on holidays, as specified by Redox.

      • timeZone
        nullable, string

        Indicates the time zone that will be used for ignored days. Redox doesn't send alert notifications on ignored days. Set to null if you want to use the default time zone, which is the time zone designated by your connection's organization settings. If not designated, U.S. Central time will be the default instead.

        Possible Values: America/Adak, America/Anchorage, America/Chicago, America/Denver, America/Edmonton, America/Halifax, America/Los_Angeles, America/New_York, America/Phoenix, America/Regina, America/St_Johns, America/Toronto, America/Vancouver, America/Winnipeg, Pacific/Honolulu, UTC
      • Contains any links related to this alert.

        • id
          string

          Displays the unique identifier of the link for a specified alert.

          Format: uuid
        • assignment
          object

          Specifies the alert this link is assigned to.

          • id
            string

            Contains the unique identifier of the alert.

          • kind
            string

            Identifies what kind of link is assigned.

            Value: alert
        • subscription
          object

          Identifies the subscription that the alert is linked to.

          • id
            number

            Contains the unique identifier of subscription.

          • dataModel
            string

            Identifies the Redox data model that the link applies to.

          • source
            object

            Specifies the source of the subscription that the alert is linked to.

            • id
              string

              Contains the unique identifier of the source.

            • name
              nullable, string

              Displays the human-readable name of the source.

          • destination
            object

            Specifies the destination of the subscription that the alert is linked to.

            • id
              string

              Contains the unique identifier of the destination.

            • name
              nullable, string

              Displays the human-readable name of the destination.

          • serviceRegion
            string

            Identifies the region that the subscription is operating in.

            Possible Values: AWS_USA_EAST_1, AWS_CAN_CENTRAL, GCP_USA_CENTRAL_1
        • connectingOrganization
          object

          Specifies the organization the asset is connected to when the subscription relates to a partner organization.

          • id
            number

            Contains the unique identifier of the Redox organization.

          • name
            nullable, string

            Contains the human-readable name of the Redox organization.

        • latestStatus
          object

          Contains the code and timestamp for the current status of the alert for this link.

          • code
            string

            Describes the current status of the alert.

            Possible Values: triggered, okay, paused, unknown
          • timestamp
            string

            Contains date and time for the current status update.

        • environment
          object

          Contains metadata about the environment within the associated Redox organization.

          • id
            string

            Contains the unique identifier of the Redox environment.

            Format: uuid
        • createdAt
          string

          Displays the date and time that the asset was originally created in ISO 8601 format.

        • createdBy
          object

          Contains the metadata about the user who created the asset.

          • id
            number

            Contains the unique identifier of the user.

          • name
            nullable, string

            Displays the user's full name.

          • email
            nullable, string

            Displays the user's email address.

        • updatedAt
          string

          Displays the date and time that the asset was last updated in ISO 8601 format.

        • updatedBy
          object

          Contains the metadata about the user who last updated the asset.

          • id
            number

            Contains the unique identifier of the user.

          • name
            nullable, string

            Displays the user's full name.

          • email
            nullable, string

            Displays the user's email address.

      • createdAt
        string

        Displays the date and time that the asset was originally created in ISO 8601 format.

      • createdBy
        object

        Contains the metadata about the user who created the asset.

        • id
          number

          Contains the unique identifier of the user.

        • name
          nullable, string

          Displays the user's full name.

        • email
          nullable, string

          Displays the user's email address.

      • updatedAt
        string

        Displays the date and time that the asset was last updated in ISO 8601 format.

      • updatedBy
        object

        Contains the metadata about the user who last updated the asset.

        • id
          number

          Contains the unique identifier of the user.

        • name
          nullable, string

          Displays the user's full name.

        • email
          nullable, string

          Displays the user's email address.