Skip to content
sapiezynski edited this page Oct 8, 2013 · 24 revisions

/connector_raw/v1/

Currently, data from three sources are made available: call logs, sms, location, bluetooth, and wifi. They all take the same API parameters, the differences are in the available and returned fields of the data.

params

bearer_token: the auth token of the user/researcher

decrypted={True/False}: Whether the data should be decrypted. Currently there is no possibility of obtaining

fields=fieldname1,fieldname2,...: Which fields should be returned. If none are specified, the default fields for the respective data source are returned.

order={-1/1}: order of sorting by data.TIMESTAMP; -1 for descending (newest first), 1 for ascending (oldest first)

start_date={TIMEINSECONDS}: return responses newer than TIMEINSECONDS

end_date={TIMEINSECONDS}: return responses older than TIMEINSECONDS

limit: how many documents to return. Defaults to 1000. Specifying more than 1000 will have no effect.

users: specify the list of users for which the documents will be returned. The final list of users is the intersection of this list and and the list of allowed users (depending on the role of the querying party)

callback: specify the name of the function that will handle the incoming data (see JSONP)

format: specify the format of the output. Available options: pretty, json, csv. CSV only works with the default set of fields! Setting to json will return a pure text json, setting to pretty generates an HTML page where the json object is printed with padding

dummy: returns an empty array if authentication was successful

sample response

{"meta": {"status": {"status": "OK","code": 200,"desc": ""}}, "results":[]}

errors

401 - authentication error, wrong token

400 - malformed request, probably a wrong api parameter

500 - internal server error, the request caused a DB crash, please report to pisa@dtu.dk along with the exact call that caused the error

Default fields

location/

_id, user, data.TIMESTAMP, data.LOCATION.geojson.coordinates, data.LOCATION.mProvider, data.LOCATION.mAccuracy

bluetooth/

_id, user, data.TIMESTAMP, data.DEVICES.android_bluetooth_device_extra_DEVICE.mAddress, data.DEVICES.android_bluetooth_device_extra_NAME, data.DEVICES.android_bluetooth_device_extra_CLASS.mClass, data.DEVICES.android_bluetooth_device_extra_RSSI

wifi/

_id, user, data.TIMESTAMP, data.SCAN_RESULTS.BSSID, data.SCAN_RESULTS.SSID, data.SCAN_RESULTS.level

sms/

_id, user, data.TIMESTAMP, data.read, data.type, data.address

calllog/

_id, user, data.TIMESTAMP, data.duration, data.type, data.name, data.number

Clone this wiki locally