Events

Last updated 13 days ago

This document covers basics of events that are generated by HyperTrack. HyperTrack POSTs events to your server in real-time via webhook URL, Kinesis stream, Firestore, or via any other delivery mechanism that works for you.

Webhook setup

To start receiving events, you need to:

  1. Set up a Webhook URL on your server. If you haven’t yet set up your own Webhook URL endpoint, you can create a test URL on https://webhook.site to test the incoming messages.

  2. Visit HyperTrack Dashboard to add the above URL, and choose the type of event that you want to be sent on that URL.

Other consumption endpoints

If you want to consume these events via Kinesis stream, Firestore, or via any other delivery mechanism, please reach out to us at help@hypertrack.com.

Event format

Every event that is published by HyperTrack has the following format. The data JSON within the event changes depending on the type of the event.

PROPERTY

TYPE

DESCRIPTION

id

UUID string

Unique identifier for the event object. E.g., 1f70cb91-5e6c-401e-8a13-fe9645b5ec0d

device_id

UUID string

Identifier for the device. E.g., b7e6c312-cd4b-4336-b350-88d0c677c3a2

type

String

Event type. Could be location.change , activity.change,health.change, or status.change

data

JSON

JSON containing information about the event

recorded_at

ISO datetime string

Timestamp of when the event occurred. E.g., 2018-06-22T06:52:46+00:00

GraphQL subscriptions

Subscription name : subscribeToLiveDeviceEvents

GraphQL endpoints
Schema

Link to the GraphQL playground : https://staging-graphql.hypertrack.com/playground

Authentication

You need to pass the authentication token in the header as:

"x-token" : token <token>

The authentication token can be generated using the authentication API

post
Authentication API

https://api.hypertrack.com/
auth/v1/authenticate
Request
Response
Path Parameters
scope
required
string
"consumption"
200: OK
{
"token_type": "Bearer",
"access_token": "<token>",
"account_id": "<account_id>"