Skip to content
Florian Schmidt edited this page Mar 21, 2016 · 1 revision

This is work in progress and subject to change in the near future! Use with caution!

This section describes how to upload and retrieve locations for one or multiple teams

Get all locations for a team

Everyone can access a list of all locations for a specific team at a specific event.

sample request

GET /event/EVENTID/team/TEAMID/location/ HTTP/1.1
Host: yourdomain.org
Connection: close

This returns a list of locations for the team with id TEAMID at the event with id EVENTID

sample response

[
  {
    "latitude": 0.0,
    "longitude": 1.1
  },
  {
    "latitude": 0.0,
    "longitude": 1.1
  },
  {
    "latitude": 0.0,
    "longitude": 1.1
  }
]

Get all locations for all teams of an event

Everyone can access a full list of all locations for all teams participating at a specific event

sample request

GET /event/EVENTID/team/locations/ HTTP/1.1
Content-Type: application/json
Host: yourdomain.org
Connection: close

sample response

[
  {
    "latitude": 0.0,
    "longitude": 1.1
  },
  {
    "latitude": 0.0,
    "longitude": 1.1
  },
  {
    "latitude": 0.0,
    "longitude": 1.1
  }
]

Upload a location for a team

Only a user who is a participant and is part of a team can upload a location on behalf of this team. Therefore he needs to be authorised.

sample request

POST /event/EVENTID/team/TEAMID/location/ HTTP/1.1
Authorization: Bearer YOURACCESSTOKEN
Content-Type: application/json
Host: yourdomain.org
Connection: close
Content-Length: 32

{"latitude":0.0,"longitude":1.1}

sample response (201 CREATED)

{
  "latitude": 0.0,
  "longitude": 1.1
}