improved

Webhooks - Changing the format from Hub metadata events

πŸ’₯ Breaking change

As a part of improving and introducing a major update on our Webhook service, we've updated the payload format for hub-meta-data-feed events. The main change is that the value of the "data" key is now an array instead of an object. The reason for this change is to;

  1. Improve consistency between the event types, as all other events follow this format
  2. Allow more data to be sent in one Webhook, to reduce the amount of events you receive.

Here, is the updated the payload posted from the new webhook system.

{
  "id": "cca4e4c8-da9d-4e82-98e0-d997adff5f8a",
  "type": "airthings-webhook-cloudevent-hub-meta-data-feed",
  "source": "https://dashboard.airthings.com/integrations/webhooks/3ae27258-314e-41ae-98ca-ae1702eea68d?version=v2",
  "dataContentType": "application/json",
  "labels": {},
  "data": [
    {
      "serialNumber": "2820006349",
      "recorded": "2023-07-05T13:09:43",
      "lastSeenDevices": [
        "2969013284",
        "3110004513",
        "2920016285",
        "2930117404"
      ],
      "devices": {
        "2930117404": {
          "lastSeen": 1688562583,
          "rssi": -46,
          "type": "wavePlus"
        },
        "3110004513": {
          "lastSeen": 1688562583,
          "rssi": -51,
          "type": "spaceCo2Mini"
        },
        "2969013284": {
          "lastSeen": 1688562583,
          "rssi": -81,
          "type": "viewPlusBusiness"
        },
        "2920016285": {
          "lastSeen": 1688562583,
          "rssi": -76,
          "type": "waveMini"
        }
      },
      "connectionType": "cellular"
    }
  ],
  "time": "2023-07-05T13:09:43.673535",
  "specVersion": "0.2"
}

πŸ“ Documentation

We have updated the documentation of Webhook Event Types with the latest payload change (see above) regarding Hub Metadata feed.