conference lunch move company map contacts lindholmen lindholmen 2 travel info

You are here

Code example

Code example on how the API could be used.

API request with curl

The following is an example on how to (with the help of curl) get the GPS position of the bus with VIN number 001.

First we need to get ahold of the username/password from the registration.

Then we need to generate t1 and t2, that is the start and end point of the measurement. Those values must be in milli seconds from 1970-01-01 00:00:00 UTC, which can be generated with the date utility in Linux.

$ date +%s -d "5 seconds ago"

$ date +%s

Observe that the result from date must be multiplied with 1000 in order to get milli seconds and that <username:password> needs to be encoded to base64.

These values, together with the base URL (, is then used in the following request.

$ curl -X GET -H "Authorization: Basic <username:password>" '<base-url>?dgw=Ericsson$Vin_Num_001&sensorSpec=Ericsson$GPS&t1=<t1>&t2=<t2>'