feat: day 29
This commit is contained in:
48
webseite/backend/api.rest
Normal file
48
webseite/backend/api.rest
Normal file
@@ -0,0 +1,48 @@
|
||||
# BROWSE Products
|
||||
|
||||
GET http://127.0.0.1:8000/api/products
|
||||
|
||||
###
|
||||
|
||||
# READ Product
|
||||
|
||||
GET http://127.0.0.1:8000/api/products/c38913d4-9524-461f-85d2-525241166e8e
|
||||
|
||||
|
||||
###
|
||||
|
||||
# ADD Product
|
||||
|
||||
POST http://127.0.0.1:8000/api/products
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"name": "Testproduct",
|
||||
"price": 9.99
|
||||
}
|
||||
|
||||
###
|
||||
|
||||
# UPDATE Product
|
||||
|
||||
PUT http://127.0.0.1:8000/api/products
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"_id": "940c316b-518c-4a18-b1f6-328e010eef4d",
|
||||
"name": "Testproduct Updated",
|
||||
"price": 123.22
|
||||
}
|
||||
|
||||
###
|
||||
|
||||
# DELETE Product
|
||||
|
||||
DELETE http://127.0.0.1:8000/api/products/940c316b-518c-4a18-b1f6-328e010eef4d
|
||||
Content-Type: application/json
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user