Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.
Brent Blanckaert edited this page Mar 11, 2023 · 15 revisions

API

All endpoints are under the /api url.
Miro with all API Endpoints:
https://miro.com/app/board/uXjVPg7IgSc=/?share_link_id=718216349886

Buildings

GET /building/{buildingID}

Get building info

Params:
auth Authorization token

Returns:
Building with given buildingID


GET /building/{buildingID}/owners

Get owners of building

Params:
auth Authorization token

Returns:
List with all owners of building with given buildingID


POST /building

Add new building

Params:
auth Authorization token
todo building info

Returns:


PUT /building/{buildingID}

Update building information

Params:

Returns:


PUT /building/{buildingID}/owner/{userID}

Add user as owner

Params:

Returns:


DELETE /building/{buildingID}

Delete building

Params:

Returns:


DELETE /building/{buildingID}/owner/{userID}

Delete user as owner

Params:

Returns:

User

GET /user/{userID}

Return user information by id

Params:

Returns:


GET /user

Return user information by auth token

Params:

Returns:


GET /user/buildings

Return all owned buildings

Params:

Returns:


POST /user/auth

Log in

Params:

Returns:


POST /user

Add new user

Params:

Returns:


PUT /user/{userID}

Update user information

Params:

Returns:


DELETE /user/{userID}

Delete user

Params:

Returns:

Tour

GET /tour/{tourID}

Return tour by id

Params:

Returns:
Returns the tour from the giving tourID.


GET /tour/{tourID}/buildings

Return buildings in tour (in order)

Params:

Returns:


POST /tour

Add a new tour

Params:
name Name of the tour, region ID of the region

Returns:
id ID of the new tour


POST /tour/{tourID}

Add new tour version of existing tour

Params:

Returns:
id ID of the new tour


PUT /tour/{tourID}

Update tour information

Params:

Returns:


DELETE /tour/{tourID}

Delete tour (and all previous versions?)

Params:

Returns:

Schedule

GET /schedule/{scheduleID}

Return schedule by id

Params:

Returns:


GET /schedule

Return schedule for logged in user

Params:

Returns:


POST /tour/{tourID}/schedule

Add new schedule to tour

Params:

Returns:


PUT /schedule/{scheduleID}

Update schedule information

Params:

Returns:


DELETE /schedule/{scheduleID}

Delete Schedule

Params:

Returns:

Visit

GET /visit/{visitID}

Return visit by id

Params:

Returns:


GET /visit/{visitID}/photos

Return images linked to visit

Params:

Returns:


POST /building/{buildingID}/visit

Add new visit to building with id

Params:

Returns:


POST /visit/{visitID}/photo

Add new image to visit

Params:

Returns:


PUT /visit/{visitID}

Update visit information

Params:

Returns:


DELETE /visit/{visitID}

Delete visit

Params:

Returns:


Photo

GET /photo/{photoID}

Return photo by id

Params:

Returns:


PUT /photo/{photoID}

Update image information

Params:

Returns:


DELETE /photo/{photoID}

Delete image

Params:

Returns:

Clone this wiki locally