CTC PULL (Data Pump)

Data Pump is a first-in-first-out (FIFO) queue used to download all events received in a CTC account. It is typically how telematics applications download event data from CTC in real time.

The use case described here is to log in to CTC using an existing user’s credentials, create a Data Pump queue, and use that queue to retrieve event data from the account by polling the Data Pump APIs.

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.