Open a compliance event stream
Changed onOpens a stream delivering events proving data-safety regulation compliance for email and SMS channel-related events (registration, unsubscription, etc.).
Unlike a standard event stream, a compliance event stream uses basic authorization, like API calls to https://go.urbanairship.com/api.
Request
- Base URLhttps://connect.urbanairship.com
- AuthHTTP basic
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
The application key.
The app key for the project you want to return compliance events for.
Request body
Response
The response to a successful request is an unending stream of newline-delimited JSON. Each non-empty line in the response represents a single compliance event. Unlike events in a normal event stream, this endpoint returns events of the compliance type, and is open to SMS and email customers. As long as the connection is open, Airship will continue to write to the event stream.
If a stream records no events for a period of time, the API will write a blank line (a single newline character) to the connection to prevent it from being closed for inactivity. If the enable_offset_updates field in the request is true, then the blank line is replaced with an OFFSET_UPDATE event. These events have no body or device field, and always have occurred and processed times indicating when they were sent. The offset field will contain the offset of the last event considered for inclusion in the stream whether or not it was actually sent. This may be useful to track position in the stream when using a filter which removes much of it.
You should not store these events; they will be different for every connection even if requests are identical. OFFSET_UPDATE events are not subject to filters, and are delivered even if not specified in the list of events you want to return. You should always check the type field before handling any delivered event.
If you do not receive data or new line characters for ninety seconds, close the connection and reconnect.
Changes
- breaking
added to the
response propertyoneOflist for the response status - info
added the optional property
///to the response with the status
- breaking
- info
added
subschema #1subschema #2to the response bodyallOflist for the response status - info
removed
subschema #1subschema #2from the response bodyallOflist for the response status
- info