Skip to content

Example JSON message for webhook destination

The following is an example JSON message sent to a webhook destination.

{
  "id": "AAAABg6X6wV4Sv-3-zQ7kcxJaqg=",
  "tenant": "YOUR-TENANT-NAME",
  "timestamp": 1628612762112,
  "rule": {
    "name": "test-rule-2",
    "trigger_names": [
      "test-trigger-event-1"
    ],
    "destination_names": [
      "test-webhook-1"
    ],
    "message": "Message content",
    "enabled": true,
    "repeat_interval": 3600
  },
  "trigger": {
    "name": "test-trigger-event-1",
    "type": {
      "TriggerType": {
        "Event": {
          "query": {
            "clause": {
              "Clause": {
                "And": {
                  "clauses": [
                    {
                      "Clause": {
                        "Equals": {
                          "field": "severity",
                          "value": {
                            "Value": {
                              "StringVal": "critical"
                            }
                          }
                        }
                      }
                    },
                    {
                      "Clause": {
                        "Equals": {
                          "field": "status",
                          "value": {
                            "Value": {
                              "StringVal": "open"
                            }
                          }
                        }
                      }
                    },
                    {
                      "Clause": {
                        "Equals": {
                          "field": "source",
                          "value": {
                            "Value": {
                              "StringVal": "my.simple.app.one"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "destination": {
    "name": "test-webhook-1",
    "type": {
      "DestinationType": {
        "Webhook": {
          "url": "YOUR-WEBHOOK-URL"
        }
      }
    }
  },
  "context": {
    "Context": {
      "Event": {
        "id": "AAAABfIrtGYvfx6V1S-AyN7buRc=",
        "tenant": "YOUR-TENANT-NAME",
        "timestamp": 1628612716000,
        "name": "test-event-3",
        "dimensions": {
          "source": {
            "Value": {
              "StringVal": "my.simple.app.one"
            }
          },
          "source-type": {
            "Value": {
              "StringVal": "com.example.simple"
            }
          }
        },
        "metadata": {
          "_zen_applied_policy": {
            "scalars": [
              {
                "Value": {
                  "StringVal": "default:INGEST:com.example.simple-event-effective.ingest:de0ba1dd"
                }
              }
            ]
          },
          "_zen_clientid": {
            "scalars": [
              {
                "Value": {
                  "StringVal": "dCcYQMIIpi0e3JRhtH4MDSbAq9ItRRP3"
                }
              }
            ]
          },
          "_zen_direct_entity_id": {
            "scalars": [
              {
                "Value": {
                  "StringVal": "AAAAA53hEnMFlJGP7yjZG4BpZbs="
                }
              }
            ]
          },
          "_zen_entityIds": {
            "scalars": [
              {
                "Value": {
                  "StringVal": "AAAAA53hEnMFlJGP7yjZG4BpZbs="
                }
              }
            ]
          }
        },
        "summary": "Event created for entity one",
        "severity": 5,
        "status": 1
      }
    }
  }
}