Skip to content
EightSQ edited this page Nov 25, 2017 · 3 revisions

Documentation of available server API hooks

/locations/

  • GET /locations/daily?date=<integer timestamp>
  • Parameters:
    • string userId (Auth Header)
  • Return:
    • object { day: string , locations: [ { lat: float, long: float } ] }

/entries/

  • GET /entries/by-location?date=23&lat=<float>&long=<float>
  • Parameters:
    • string userId (Auth Header)
  • Return:
    • object { day: string , entries: [ { ip: string, timestamp: integer, uri: string } ] }

/stats/

Get amount of (unique) servers visited

  • GET /stats/servers
  • Parameters:
    • string userId (Auth Header)
  • Return:
    • object { dataPoints: [ { timestamp: integer, serversVisited: integer } ] }

Get most connected countries

  • GET /stats/countries
  • Parameters:
    • string userId (Auth Header)
  • Return:
    • object { data: [ float ], color: [ string (Hex) ], labels: [ string ] }

Upload

Upload tracking data

  • POST /upload
  • Parameters:
    • object data { keys: Array, entries: Array }
    • string userId (Auth Header)
  • Return:
    • 204 No content – empty