Closed nesh170 closed 7 years ago
Get all Items:- GET http://localhost:8000/item Returns all the items
Create a new Item:- POST http://localhost:8000/item
{
"name": "siva",
"quantity": 2,
"model_number": "12344567",
"description": "This is super lit",
"location": "Hudson",
"tags": [{"tag": "first tag"}, {"tag": "second tag"}]
}
Get detailed Item:- GET http://localhost:8000/item/'id'
Delete detailed Item:- DELETE http://localhost:8000/item/'id'
Update detailed Item:- PATCH http://localhost:8000/item/'id'
{
"name": "siva",
"quantity": 2,
"model_number": "12344567",
"description": "This is super lit",
"location": "Hudson"
}
If you leave out any attribute in the JSON it will not be updated :D so nothing is required. Tags cannot be updated
Create a new Tag POST http://localhost:8000/item/tag/
{
"item": 1,
"tag": "kamehameha"
}
item is the item id
Delete a Tag DELETE http://localhost:8000/item/tag/'id'
Merged :D
Create 👍