Skip to content

CyrilSLi/haxmas-day4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Dec 16, 2025
826fa4b · · Dec 16, 2025

History

3 Commits
Dec 16, 2025
Dec 16, 2025
Dec 16, 2025
Dec 16, 2025
Dec 16, 2025
Dec 16, 2025
Dec 16, 2025
Dec 16, 2025

Repository files navigation

haxmas-day4

API to store and categorize links of bus photos.

All methods accept the application/json content type. All non-GET methods return a non-zero number if it has modified the database.

Endpoints

GET /photos

Get all photos.

GET /photos/{id}

Get a specific photo by its ID.

GET /photos/model/{model}

Get all photos of a specific bus model.

POST /photos

Add a new photo. The required fields are:

  • fleetnum: fleet number
  • route: bus route (optional)
  • model: bus model
  • year: year of manufacture
  • url: URL of the photo

POST /photos/{id}/info

Update the fields of a specific photo by its ID (see above for required fields).

POST /photos/{id}/url

Update or remove (replace with a placeholder) the URL of a specific photo by its ID. The required field is url.

DELETE /photos/{id}

Delete a specific photo by its ID.