This repository has been archived by the owner on Dec 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
API list
Arvid Sandin edited this page Mar 1, 2022
·
3 revisions
Adds a report to the database
Request type: POST
Content-Type: application/x-www-form-urlencoded
URL: /send-report
Request body:
{
longitude: number
latitude: number
auroraRating: integer 0-5
userID: integer
}
- 200 OK:
- true if report is added to the database
- false otherwise
- 400 Bad request. An error message is returned
- 500 Server error. An error occured in the server. No further information is given.
Get all the reports from the database posted in the last 6 hours
Request type: GET
URL: /get-reports
- 200 OK. A list of the reports are returned. Each report contains the following data:
"id": 11,
timestamp: Datetime
rating: number
image: null
latitude: number
longitude: number
- 500 Server error. An error occured in the server. No further information is given.
Get the latest overlay with aurora data
Request type: GET
URL: /latest.png
- 200 OK. The image is returned
- 404 Not found. The file latest.png does not exist at the moment