-
Notifications
You must be signed in to change notification settings - Fork 1
RESTful services documentation
Yichen Wu edited this page Mar 18, 2021
·
33 revisions
TODO: double-check the outputs!!!
See the http status codes there: https://www.restapitutorial.com/httpstatuscodes.html
Request type |
Endpoints | Method Name | Method Description | Inputs | Outputs |
GET | /appointment/id /appointment/id/ |
getAppointment | get an appointment by ID |
|
|
GET | /appointments/person/id /appointments/person/id/ |
getAppointmentHistory | get all appointments for a given customer |
|
|
PUT | /appointment/id /appointment/id/ |
editAppointment | edit a given appointment |
|
|
DELETE | /appointment/id /appointment/id/ |
deleteAppointment | delete a gievn appointment |
|
|
POST | /appointment /appointment/ |
createAppointment | create a new appointment in the datebase |
|
|
POST | /appointmentNoShow/id /appointmentNoShow/id/ |
enterNoShow | declare no show for a given appointment |
|
|
Request type |
Endpoints | Method Name | Method Description | Inputs | Outputs |
GET | /business/id /business/id/ |
getBusiness | get the requested business |
|
|
POST | /business /business/ |
createBusiness | create new business in the database |
|
|
PUT | /business/id /business/id/ |
updateBusiness | updates business information |
|
|
DELETE | /business/id /business/id/ |
deleteBusiness | deletes the business from the system |
|
|
Request type |
Endpoints | Method Name | Method Description | Inputs | Outputs |
GET | /person/customer/email /person/customer/email/ |
getCustomer | get a customer by |
|
|
GET | /bookableServices /bookableServices/ |
getTechnician | get a technician by | - |
|
GET | /bookableServices /bookableServices/ |
getAdministrator | get an administrator by | - |
|
GET | /bookableServices /bookableServices/ |
getOwner | get an owner by | - |
|
PUT | /bookableService/name /bookableService/name/ |
updateCustomer | edit the information of a customer |
|
|
PUT | /bookableService/name /bookableService/name/ |
updateTechnician | edit the information of a technician |
|
|
PUT | /bookableService/name /bookableService/name/ |
updateAdministrator | edit the information of an administrator |
|
|
PUT | /bookableService/name /bookableService/name/ |
updateOwner | edit the information of an owner |
|
|
DELETE | /bookableService/name /bookableService/name/ |
deleteCustomer | delete the account for a given customer | @PathVariable("name") String name: the name of the bookable service to be deleted |
|
DELETE | /bookableService/name /bookableService/name/ |
deleteTechnician | delete the account for a given technician | @PathVariable("name") String name: the name of the bookable service to be deleted |
|
DELETE | /bookableService/name /bookableService/name/ |
deleteAdministrator | delete the account for a given administrator | @PathVariable("name") String name: the name of the bookable service to be deleted |
|
DELETE | /bookableService/name /bookableService/name/ |
deleteOwner | delete the account for a given owner | @PathVariable("name") String name: the name of the bookable service to be deleted |
|
POST | /person/customer/register /person/customer/register/ |
createCustomer | create a new customer account in the datebase | @RequestBody CustomerDto customerDto:the customer account that want to be created |
|
POST | /person/customer/login /person/customer/login/ |
loginCustomer | login to an existing customer account | @RequestBody CustomerDto customerDto:the customer account that want to be logged in |
|
POST | /person/technician/register /person/technician/register/ |
createTechnician | create a new technician account in the datebase | @RequestBody TechnicianDto technicianDto:the technician account that want to be created |
|
POST | /person/technician/login person/technician/login/ |
loginTechnician | login to an existing technician account | @RequestBody TechnicianDto technicianDto:the technician account that want to be logged in |
|
POST | /person/administrator/register /person/administrator/register/ |
createAdministrator | create a new administrator account in the datebase | @RequestBody AdministratorDto administratorDto:the administrator account that want to be created |
|
POST | /person/administrator/login /person/administrator/login |
loginAdministrator | login to an existing administrator account | @RequestBody AdministratorDto administratorDto:the administrator account that want to be logged in |
|
POST | /person/owner/register /person/owner/register/ |
createOwnerr | create a new owner account in the datebase | @RequestBody OwnerDto ownerDto:the owner account that want to be created |
|
POST | /person/owner/login /person/owner/login |
loginOwner | login to an existing owner account | @RequestBody OwnerDto ownerDto:the owner account that want to be logged in |
|
//////////// CONTINUE
Request type |
Endpoints | Method Name | Method Description | Inputs | Outputs |
GET | /bookableService/name /bookableService/name/ |
getBookableService | get the requested bookable service |
|
|
GET | /bookableServices /bookableServices/ |
getAllBookableServices | get all bookable services in the repair shop | - |
|
POST | /bookableService /bookableService/ |
createBookableService | create new bookable service in the database |
|
|
PUT | /business/id /business/id/ |
updateBusiness | updates business information |
|
|
DELETE | /business/id /business/id/ |
deleteBusiness | deletes the business from the system |
|
|
Request type |
Endpoints | Method Name | Method Description | Inputs | Outputs |
GET | /business/id /business/id/ |
getBusiness | get the requested business |
|
|
POST | /business /business/ |
createBusiness | create new business in the database |
|
|
PUT | /business/id /business/id/ |
updateBusiness | updates business information |
|
|
DELETE | /business/id /business/id/ |
deleteBusiness | deletes the business from the system |
|
|