Skip to content

Getting Data from the Database

eamonnmag edited this page Sep 17, 2014 · 42 revisions

All data in the database can be retrieved from the API as JSON. In fact, all the visualizations are driven by the very same APIs (especially for aggregate information).

API giving access to all RAW data.

The pattern for retrieving data is very simple.

To get all records, the URL is formed as /data-sub/api/<data_type>/?format=json

To get a single record, the URL is formed as /data-sub/api/<data_type>/<id>/?format=json

The available data types are:

  • loginsession (Login sessions) - Get all (/data-sub/api/loginsession/?format=json). Get a single record (/data-sub/api/loginsession/1/?format=json)

  • employee (Employees) get all (/data-sub/api/employee/?format=json) | get a single record (/data-sub/api/employee/1/?format=json)

  • communications (Email/Web Communications) get all (/data-sub/api/communications/?format=json) | get a single record (/data-sub/api/communications/1/?format=json)

  • devices (Device Insertions) get all (/data-sub/api/device/?format=json) | get a single record (/data-sub/api/device/1/?format=json)

  • contract (Employee Contracts) get all (/data-sub/api/contract/?format=json) | get a single record (/data-sub/api/contract/1/?format=json)

Clone this wiki locally