-
Notifications
You must be signed in to change notification settings - Fork 1
REST API
The single page web application is located at /index.html.
The REST interface is located at /api. You need to authenticate first to get a token than must be provided when using the other endpoints in the API. The following headers must be set:
Authorization: Bearer <token>
Content-Type: application/json
Accept: application/json
All keys in the URL, request or response bodies are 64 bit integers written as a string of 16 hex characters, i.e. 0123456789ABCDEF.
All dates are UTC timestamp represented as a string of date and time with a zero offset time zone designator Z, i.e. 2020-11-23T13:25:26.273041154Z.
Authenticates a user using the provided username and password and returns a token to be used for all the other endpoints in the API.
POST /api/authenticate
{ "username":"<username>",
"password":"<password>"}
The response body contains:
{"username":"<username>",
"email": "<emailaddress>,
"token": "<token>",
"userid": "<user key>"}
Where the token is to be used for the authorization header.
Returns with the geographical item as JSON.
The PUT body contains the fields on the item that is to be updated. The item_key points to the item.
The POST body contains the item as JSON and the item is returned with the item_key added.
The POST body contains the selection filters and a list of items returned as JSON.