Configure Real-Time Data Streaming Webhooks
Integrate with Real-Time Data Streaming using webhooks to pass user-level events to your backend systems.
Webhook integrations are not recommended for high volume applications. Processing time at the client can cause events to back up, resulting a significantly delayed event stream. Contact Airship Sales or Support for help scoping the right Real-Time Data Streaming integration to support your application.
This integration is similar to a Direct Integration. The difference between the two is that:
With webhooks, you tell us where to send the events by providing a URL, headers, and authorization info.
With a direct integration, you control when you pull data from the raw data stream and filter the data according to the needs of the system that consumes it.
What is a Webhook?
A webhook is a custom HTTP callback, generally triggered by an event or action initiated by a user, service, or application. When the event occurs, the originating application notifies the specified URL configured for the webhook.
Webhooks are popular with web developers because they can be configured to trigger all manner of events from system to system, enabling real-time workflows across the web and your internal systems.
Enable Data Streaming Webhooks
- Go to Settings » Project Configuration and click Manage for Real-Time Data Streaming.
- Under Real-Time Data Streaming, click Webhooks. Previously configured integrations are listed under Enabled Integrations.
- Enter a user-friendly name and description.
- Enter the HTTPS endpoint URL you want your events POSTed to.
Note The host must support HTTPS. Query parameters are supported in this field.
- Add a key/value for the custom header to be sent with the request URL. Click Add another to add an additional custom header.
- Select event types.
- Click Save.
Example Event
POST https://example.com HTTP/1.1
Content-Length: 799
Content-Type: application/json; charset=UTF-8
Custom-Header1: Value1
Custom-Header2: Value2
Authorization: Basic dXNhcj0wYXNzd29yZA==
{
"id":"7e7f5990-d277-4636-b22c-912cb2ca2ec9",
"offset":"1245924",
"occurred":"2016-12-08T21:27:01.125Z",
"processed":"2016-12-08T21:27:03.000Z",
"device":{
"ios_channel":"1819298f-065f-46f1-81a0-1fea91f65ce7",
"attributes":{
"locale_variant":"",
"app_version":"1.2.3",
"device_model":"x86_64",
"connection_type":"WIFI",
"app_package_name":"com.company.app",
"iana_timezone":"America/Los_Angeles",
"push_opt_in":"false",
"locale_country_code":"US",
"device_os":"10.1",
"locale_timezone":"-28800",
"locale_language_code":"en",
"location_enabled":"true",
"background_push_enabled":"false",
"ua_sdk_version":"8.0.1",
"location_permission":"ALWAYS_ALLOWED"
}
},
"body":{
"name":"finished_game",
"session_id":"e025bde1-f974-42fa-a925-aca7054218dc",
"properties":{
"game_name":"snaps",
"game_score":1000
}
},
"type":"CUSTOM"
}
Categories