3rd year Embedded systems & Software project by @Thilini98, @thanujan96 and @DrMadhushan
For fundamental knowledge sharing
API stands for Application Programming Interface. An API is a software intermediary that allows two applications to talk to each other. In other words, an API is the messenger that delivers your request to the provider that you’re requesting it from and then delivers the response back to you.
An API defines functionalities that are independent of their respective implementations, which allows those implementations and definitions to vary without compromising each other. Therefore, a good API makes it easier to develop a program by providing the building blocks.
Application programming interfaces consist of two components:
In our applcation we will be having both authenticated API requests and APIs for public use.
APIs that will return the data related to the users about their orders.
APIs used in backend that facilitate admins to add, delete or update the information about components and equipments in maker space.
APIs used in order to manage and monitor the orders made by students
API requests that need not to be authentcated.
host/api/auth/login -> email,pass(data)
host/api/auth/user -> token(auth header)
Return the details of the logged in user.
host/api/auth/orders -> token(auth header)
Return the deatils of the orders that have been placed by the user. This will indicate wether the orders are accepted or they are still in progressing stage or weher we can pick them up. This respose will include all the orders that made by the user.
host/api/auth/orders/{orderid} -> token(auth header)
Returns the specific details corresponding to one specific order that has been placed by the user.
host/api/user/orders/id/opt/number -> returns true if it’s same as the otp
This request is used once the user received the op and need to pick up their package.