Research RestAPI
License and Copyright Notice
By submitting this issue or commenting on this issue, or contributing any content to this issue, you certify under the Developer Certificate of Origin that the content you post may be licensed under GPLv3 (for code) or CC-BY-SA 4.0 International (for non-code content).
What is the goal or the problem, and why is it important?
The goal of this issue to obtain a better understanding of RESTful APIs. RESTful APIs utilize HTTP requests to access and use data, which poses significant interest as a communication tool to use for this module and other modules due to the need for interaction(s) between PlaceOrder and ViewOrder.
How are you going to achieve the goal or solve the problem?
Online resources such as Youtube videos, tutorial websites, articles and free online courses will be helpful in exploring the concept and use of RESTful APIs.
What will be produced as a result of this effort and where will it live on GitLab?
- A list of URLs to the resources found in a comment on this issue.
Give a justification of weight or due date.
This issue is assigned a weight of 8, which is equivalent to one sprint cycle. One sprint cycle should be an appropriate amount of time for the assignee to gain a foundation into RESTful APIs and begin tentative creation of an API.
Who will do it, and what will they do?
@JohnTesta will be assigned to work on this issue.
What was the outcome?
- What is RESTful API?
-
Helpful link: https://www.redhat.com/en/topics/api/what-is-a-rest-api
-
First, an API is an Application Program Interface, it takes a structured request and provides a structured response
- A good analogy is a waiter at a restaurant, he takes an order from the customer (the software), brings it to the kitchen (the server), and brings back the correct meal.
-
REST, or REpresentational State Transfer, is an architectural style for designing networked applications using mainly HTTP to access and use data.
- Very versatile, can be used by virtually any programming language.
-
HTTP Methods
- GET: Retrieve data from a specified resource
- POST: Submit data to be processed to a specified resource
- PUT: Update a specified resource
- DELETE: Delete a specified resource
- These are the 4 main methods, the others aren’t used as much
- HEAD: Same as get but does not return a body
- OPTIONS: Returns the supported HTTP methods
- PATCH: Update partial resources
- These are the 4 main methods, the others aren’t used as much
-
Endpoints
- The URL the HTTP requests are sent to
- Example: GET https://mysite.com/api/users
- Returns a list of the users
- Example: GET https://mysite.com/api/users
- The URL the HTTP requests are sent to
-
Most of this information is from this very helpful video https://www.youtube.com/watch?v=Q-BpqyOT3a8
-
This video shows how to implement a RESTful api from scratch with Node.js and MongoDB so it may be helpful to refer to this video since our module is being built from scratch. https://www.youtube.com/watch?v=vjf774RKrLc&t (Got this video from Place Order’s research RESTful api issue)
-
Template Version 1.0.0
`