reading-notes

301 Reading Notes

Class 12 Summary: This class reading is about More CRUD

https://medium.com/geekculture/crud-operations-explained-2a44096e9c88

Which HTTP method would you use to update a record through an API? PUT. This replaces all current data of the target resource.PUT request — /appointments/:id.

Which REST methods require an ID parameter?

GET (retrieve a specific resource) PUT (update a specific resource) PATCH (update a specific resource partially) DELETE (delete a specific resource)

What’s the relationship between REST and CRUD? -Create (POST) -Read (GET) -Update (PUT or PATCH) -Delete (DELETE)

If you had to describe the process of creating a RESTful API in 5 steps, what would they be?

Define the resources and endpoints: The first step in creating a RESTful API is to identify the resources that the API will provide access to and the endpoints that will be used to interact with those resources.

Choose the appropriate HTTP methods: For each endpoint, you will need to choose the appropriate HTTP method (GET, POST, PUT, PATCH, DELETE) for the corresponding CRUD operation (Create, Read, Update, Delete).

Design the request and response format: Design the request and response format for the API, such as the format of the JSON data that will be sent and received.

Implement the server-side logic: Write the server-side code to handle the incoming requests, perform the corresponding CRUD operations, and return the appropriate responses.

Test and document the API: Once the server-side logic is implemented, test the API thoroughly to ensure it’s working as expected and document the API with clear instructions on how to use it.

Source : https://www.youtube.com/watch?v=EzNcBhSv1Wo Source: https://chat.openai.com/chat

Things I want to know more about