Retrieving Events with Data Pump

The following steps are required to use Data Pump:

  1. Log in to CTC using the login interface. The authorization token returned is good for 60 minutes from the last successful API call. Data Pump endpoints calls are executed periodically. After you are authenticated, the Data Pump calls will refresh the authentication token time, preventing the need to log in again indefinitely (barring interruptions).

  2. Execute the GET /events endpoint to create a new data queue. Queues begin empty, and subsequent events for all devices in that account will be added to the queue. Queued events will download the next time the GET /events endpoint is executed. Note that you can't download events received prior to a queue’s creation using Data Pump. The Results Services API has a longer storage lifetime and may be useful to find events that occurred before you created the queue. See Results Services use cases.

  3. Periodically poll for new events using the GET /events/count endpoint. Reasonable polling intervals will vary by application. Some applications can poll every few seconds, whereas others will have to poll faster to keep up with traffic.

  4. When events are available, download them using the GET /events endpoint.