This page provides the documentation of the Dragonfly Logger REST API.

1 – Logger API

The logger is currently accessible at the address https://logger.accuware.com/. All the routes detailed below should be requested at this address. Of course, all these requests need to be authenticated with your Accuware credentials.

1.1 – GET the list of dates that have some data

Returns the dates DD/MM/YYYY that have data for:

the current month

the two previous months.

the two next months.

NOTE: the {year} identifier has four digits, and that the {month} identifier has two digits.

Due to the high amount of data storage required, the logger stores all the results on a Amazon S3 database at the end of every day. This means that the way to get to the final output is a bit tricky, as it will differ depending on if the request is made for previous days, or if it is made for the current day.

Anyway, in both cases, the final output is an array of JSON, and every JSON element of this array corresponds to the position of a device at a specific time.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

[

{

"mac":"macAddress1",

"device_status":

{

...

},

"position":

{

"siteId":"1001",

"levelId":0,

....

},

"udo":

{

...

},

"utc_offset_min":-420,

"timezone_label":"America/Los_Angeles",

...

},

{

"mac":"macAddress2",

"device_status":

{

...

},

"position":

{

"siteId":"1001",

"levelId":0,

....

},

"udo":

{

...

},

"utc_offset_min":-420,

"timezone_label":"America/Los_Angeles",

...

}

]

For the previous days

For previous days, the output is a small JSON which contains a temporary link to our S3 database. At this link, there is the final JSON which contains all the data for the day in the format detailed above.

1

2

{"url":"https://s3.amazonaws.com/url_to_json.json.gz"}

Please note that contrary to what the link suggests, the data at this URL is uncompressed, so it is a plain text JSON.

For today

For the current day, the data is still available directly on the logger. Thus, the final JSON is directly returned in the format detailed above. However, considering the size of the JSON being returned and to avoid overload of the logger, the output is compressed with gzip.

1.3 – DELETE all the historical locations

Delete all the history date for the provided sites. User must be very careful when using this request, as the action cannot be undone.

1

2

DELETE/api/v1/dragonfly/sites/{siteId}/deleteData

The output is expected to be a confirmation JSON.

1

{"status":"success"}

1

2

POST/api/v1/dragonfly/sites/{siteId}/pushDevice

The input is a JSON device position object. It can be formatted as followed.

NOTE: the fields alt, defining the device altitude, and utc_offset_min, defining the timezone offset with UTC, are optional.