Resource URL: /platform/<<version=3>>/event/alert-conditions

    Overview: This resource applies the standard collection pattern to alert
              conditions.

     Methods: GET, POST, DELETE

********************************************************************************

Method GET: List all alert conditions.

       URL: GET /platform/<<version=3>>/event/alert-conditions

Query arguments:
       sort=<string> The field that will be used for sorting.
channel_ids=<string> Return only conditions for the specified channel:
     limit=<integer> Return no more than this many results at once (see resume).
          dir=<enum> Where <enum> is one of ASC, DESC.  The direction of the
                     sort.
     resume=<string> Continue returning results from previous call using this
                     token (token should come from the previous call, resume
                     cannot be used with other options).

GET response body schema:
{
  "type": "object", 
  "properties": {
    "alert-conditions": {
      "items": {
        "type": "object", 
        "description": "Specifies under what conditions and over which channel an alert should be sent", 
        "properties": {
          "name": {
            "type": "string", 
            "description": "Unique identifier."
          }, 
          "channel_ids": {
            "items": {
              "type": "integer"
            }, 
            "type": "array", 
            "description": "Channels for alert"
          }, 
          "interval": {
            "type": "integer", 
            "description": "Required with ONGOING condition only, period in seconds between alerts of ongoing conditions"
          }, 
          "eventgroup_ids": {
            "items": {
              "type": "string"
            }, 
            "type": "array", 
            "description": "Event Group IDs to be alerted"
          }, 
          "severities": {
            "items": {
              "enum": [
                "emergency", 
                "critical", 
                "warning", 
                "information"
              ], 
              "type": "string"
            }, 
            "type": "array", 
            "description": "Severities to be alerted"
          }, 
          "transient": {
            "type": "integer", 
            "description": "Any eventgroup lasting less than this many seconds is deemed transient and will not generate alerts under this condition."
          }, 
          "limit": {
            "type": "integer", 
            "description": "Required with NEW EVENTS condition only, limits the number of alerts sent as events are added"
          }, 
          "categories": {
            "items": {
              "type": "string"
            }, 
            "type": "array", 
            "description": "Event Group categories to be alerted"
          }, 
          "id": {
            "type": "string", 
            "description": "Unique identifier."
          }, 
          "condition": {
            "enum": [
              "NEW", 
              "NEW EVENTS", 
              "ONGOING", 
              "SEVERITY INCREASE", 
              "SEVERITY DECREASE", 
              "RESOLVED"
            ], 
            "type": "string", 
            "description": "Trigger condition for alert"
          }
        }
      }, 
      "type": "array"
    }, 
    "total": {
      "type": "integer", 
      "description": "Total number of items available."
    }, 
    "resume": {
      "type": [
        "string", 
        "null"
      ], 
      "description": "Continue returning results from previous call using this token (token should come from the previous call, resume cannot be used with other options)."
    }
  }
}

********************************************************************************

Method POST: Create a new alert condition.

        URL: POST /platform/<<version=3>>/event/alert-conditions

There are no query arguments for this method.

Required POST request body fields:
name, channel_ids, condition

POST request body schema:
{
  "type": "object", 
  "description": "Specifies under what conditions and over which channel an alert should be sent", 
  "properties": {
    "name": {
      "required": true, 
      "type": "string", 
      "description": "Unique identifier."
    }, 
    "channel_ids": {
      "items": {
        "type": "integer"
      }, 
      "required": true, 
      "type": "array", 
      "description": "Channels for alert"
    }, 
    "interval": {
      "type": "integer", 
      "description": "Required with ONGOING condition only, period in seconds between alerts of ongoing conditions"
    }, 
    "eventgroup_ids": {
      "items": {
        "type": "string"
      }, 
      "type": "array", 
      "description": "Event Group IDs to be alerted"
    }, 
    "severities": {
      "items": {
        "enum": [
          "emergency", 
          "critical", 
          "warning", 
          "information"
        ], 
        "type": "string"
      }, 
      "type": "array", 
      "description": "Severities to be alerted"
    }, 
    "transient": {
      "type": "integer", 
      "description": "Any eventgroup lasting less than this many seconds is deemed transient and will not generate alerts under this condition."
    }, 
    "limit": {
      "type": "integer", 
      "description": "Required with NEW EVENTS condition only, limits the number of alerts sent as events are added"
    }, 
    "categories": {
      "items": {
        "type": "string"
      }, 
      "type": "array", 
      "description": "Event Group categories to be alerted"
    }, 
    "id": {
      "type": "string", 
      "description": "Unique identifier."
    }, 
    "condition": {
      "enum": [
        "NEW", 
        "NEW EVENTS", 
        "ONGOING", 
        "SEVERITY INCREASE", 
        "SEVERITY DECREASE", 
        "RESOLVED"
      ], 
      "type": "string", 
      "description": "Trigger condition for alert", 
      "required": true
    }
  }
}

POST response body schema:
{
  "type": "object", 
  "properties": {
    "id": {
      "required": true, 
      "type": "string", 
      "description": "ID of created item that can be used to refer to item in the collection-item resource path."
    }
  }
}

********************************************************************************

Method DELETE: Bulk delete of alert conditions.

          URL: DELETE /platform/<<version=3>>/event/alert-conditions

Query arguments:
channel`=<string> Delete only conditions for this channel

There is no response body for this method.
