# 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](https://github.com/ndjson/ndjson-spec), 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.


## Base URL {#servers}

Select the domain associated with your Airship project.

| URL | Description |
|-----|-------------|
| `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 {#security}

### Basic Auth (Master) {#security-basicAuth}

Type: `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 {#security-bearerAuth}

Type: `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](/docs/guides/reports/real-time-data-streaming/). Tokens can be revoked at will.

