-
Notifications
You must be signed in to change notification settings - Fork 1
API routes
Ivo Karagyozov edited this page Aug 8, 2016
·
6 revisions
Users connected
- POST /api/users - Create new user
- GET /api/users - Get all users
- PUT /api/users/:id - Update the given user
- DELETE /api/users/:id - Delete the given user
- GET /api/users/:id - Get user with the given id
- POST /api/users/:id/vehicles - Add new vehicle to the given user's vehicles
- GET /api/users/:id/vehicles - Get all vehicles of the given user
- GET /api/users/:userId/vehicles/:vehicleId - Get the given vehicle from the given user
- DELETE /api/users/:userId/vehicles/:vehicleId - Delete the given vehicle from the given user
- GET /api/users/:id/routes - Get all routes of the given user
- GET /api/users/:id/addresses - Get all addresses of the given user
- POST /api/users/:id/addresses - Add new address to the given user
- GET /api/users/:userId/addresses/:addressId - Get the given address for the given user
- DELETE /api/users/:userId/addresses/:addressId - Delete the given address from the given user
- GET /api/users/:id/groups - Get all groups of the given user
- GET /api/users/:userId/groups/:groupId - Get the given group of the given user
- DELETE /api/users/:userId/groups/:groupId - Remove given group from the given user
Groups connected
- POST /api/groups - Create a new group
- GET /api/groups - Get all groups
- GET /api/groups/:id - Get group with the given id
- PUT /api/groups/:id - Update the given group
- DELETE /api/groups/:id - Delete the given group
- GET /api/groups/:id/users - Get all users in the given group
- GET /api/groups/:id/routes - Get all routes in the given group
Routes connected
- POST /api/routes - Create a new route
- GET /api/routes - Get all routes
- GET /api/routes/:id - Get the route with the given id
- PUT /api/routes/:id - Update the given route
- DELETE /api/routes/:id - Delete the given route
- GET /api/routes/:id/passengers - Get all passengers for the given route
- POST /api/routes/:id/passengers - Add new passenger to the given route
- DELETE /api/routes/:routeId/passengers/:passengerId - Delete given passenger from the given route