Introduction

Airship’s Real-Time Data Streaming API exposes a stream of events describing a user’s experience within a mobile app or browser. Events reflect user action, automated device responses to their environment (e.g., encountering a beacon), and experience-changing actions initiated by app/site publishers, such as sending a push notification.

To consume the event stream, you must issue an authenticated request including a starting point for the stream and optional filter and subset specifications.

The event data is delivered as newline-delimited JSON, with each event on its own line. The accept header should be set to application/vnd.urbanairship+x-ndjson; version=3;. Each event contains an offset that denotes its location on the stream. If a client disconnects for any reason, it should reconnect with instructions to start at the last offset it successfully processed, to avoid missing any data. For each app key authorized to use Real-Time Data Streaming, Airship stores 7 days or 100 GB worth of data, whichever comes first.

Libraries

Airship maintains open source server libraries to support your integrations with our APIs in multiple languages. Click below for library documentation.

Base URL

Select the domain associated with your Airship project.

  • https://connect.urbanairship.com - The North American base URL for Airship's Real-Time Data Streaming API
  • https://connect.asnapieu.com - The European base URL for Airship's Real-Time Data Streaming API

Authentication

For additional information, including steps for creating bearer tokens and OAuth client credentials, see Airship API Security. See also the Airship API Authorization Reference.

  • Basic Auth (Master) HTTP (basic)
    Authorization header containing the word Basic followed by a space and a Base64-encoded string generated from your App Key and Master Secret in appKey:masterSecret format. For example, Basic YXBwX2tleTptYXN0ZXJfc2VjcmV0. This security type is only accepted by the Compliance endpoint.
  • Bearer Token HTTP (bearer)
    Authorization header containing the word Bearer followed by a space and a bearer token, which can be obtained from Airship when configuring a direct integration. Tokens can be revoked at will.