Hypertrack api library

This library contains methods to fetch Hypertrack data for each entities.


# dependencies
npm install ht-utility rxjs
npm install ht-models --dev
# package
npm install ht-api


For browsers, the library exports global object htApi which exposes the entity specific methods. For ES6 and above, the properties and methods can be directly imported as required.


All the apis are available throught HtApi class. It needs to be initalized using HyperTrack toke, which will be passed with every api calls for authenticatication.


var api = new htApi.HtApi(token);

api.users.index({ordering: '-last_recorded_at'}).subscribe(function(users) {

import {HtApi} from "ht-api";
import {Page, IUser} from "ht-models";

const api = HtApi(token);

api.users.index({ordering: '-last_recorded_at'}).subscribe((users: Page<IUser>) {




Users entity is exposed by users property on HtApi class

var api = new htApi.HtApi(token);
var usersApi = api.users
import {HtApi} from "ht-api";

const api = HtApi(token);
const usersApi = api.users
List of users
  • usersApi.index(query?: object) => Observable<Page<IUser>>
List of users with analytics data
  • usersApi.analytics(query?: object) => Observable<Page<IUserAnalytics>>
User data
  • usersApi.get(id: string) => Observable<IUser>
Users summary data
  • usersApi.summary(query: object) => Observable<IUserListSummary>
Users placeline
  • usersApi.placeline(id: string, query?: object) => Observable<IUserData>


Actions entity is exposed by actions property on HtApi class

var api = new htApi.HtApi(token);
var actionsApi = api.actions
import {HtApi} from "ht-api";

const api = HtApi(token);
const actionsApi = api.actions
List of
  • actionsApi.index(query?: object) => Observable<Page<IUser>>
List of actions with analytics data
  • actionsApi.analytics(query?: object) => Observable<Page<IUserAnalytics>>
User data
  • actionsApi.get(id: string) => Observable<IUser>
Actions summary data
  • actionsApi.summary(query: object) => Observable<IUserListSummary>
Actions graph
  • usersApi.graph(query?: object) => Observable<IActionStatusGraph[]>


Groups entity is exposed by groups property on HtApi class

var api = new htApi.HtApi(token);
var groupsApi = api.groups
import {HtApi} from "ht-api";

const api = HtApi(token);
const groupsApi = api.groups
List of groups
  • groupsApi.index(query?: object) => Observable<Page<IUser>>
Group data
  • groupsApi.get(id: string) => Observable<IUser>
Children groups of a group
  • groupsApi.children(parentGroupId: string) => Observable<Page<IGroup>>
Root groups (groups with no parent)

results matching ""

    No results matching ""