This is a simple REST API built with Actix Web that supports CRUD operations with an in-memory data store.
Start the API server:
cargo run
By default, the server will be running at http://127.0.0.1:8080
.
GET /items
[
{
"id": "item-id-1",
"name": "Item Name",
"quantity": 10
},
{
"id": "item-id-2",
"name": "Another Item",
"quantity": 5
}
]
GET /items/{id}
{
"id": "item-id",
"name": "Item Name",
"quantity": 10
}
POST /items
{
"name": "New Item",
"quantity": 12
}
{
"id": "newly-generated-id",
"name": "New Item",
"quantity": 12
}
DELETE /items/{id}
Status: 200 OK
Licensed under the MIT License.