| Method | Path | Returns |
|---|---|---|
| GET | /items | 200 — array of all items |
| GET | /items/:id | 200 — one item, or 404 |
| POST | /items | 201 — new item with id, or 400 |
| PUT | /items/:id | 200 — updated item, or 404 / 400 |
| DELETE | /items/:id | 204 — no content, or 404 |
Base URL is https://test.howincloud.com/<your-name>/api. So your full list endpoint is for example
https://test.howincloud.com/shamil/api/items.
{
"id": 1,
"name": "Chicken Biriyani",
"price": 220,
"image": "https://images.unsplash.com/photo-...",
"description": "Aromatic basmati rice ..."
}
On POST and PUT, send name, price, image and optionally description.
The server assigns the id. image is a URL string — no file uploads.
fetch('https://test.howincloud.com/shamil/api/items')
.then(r => r.json())
.then(items => console.log(items));
fetch('https://test.howincloud.com/shamil/api/items', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
name: 'Paneer Tikka',
price: 220,
image: 'https://example.com/paneer.jpg',
description: 'Smoky grilled paneer cubes'
})
}).then(r => r.json()).then(console.log);
fetch('https://test.howincloud.com/shamil/api/items/3', {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
name: 'Margherita Pizza',
price: 280,
image: 'https://example.com/pizza.jpg',
description: 'Updated price'
})
}).then(r => r.json()).then(console.log);
fetch('https://test.howincloud.com/shamil/api/items/3', { method: 'DELETE' })
.then(r => console.log(r.status)); // 204 on success
200 | OK — data returned |
201 | Created — new item saved (POST) |
204 | No Content — deleted (DELETE) |
400 | Bad Request — missing or invalid fields |
404 | Not Found — bad URL or id doesn't exist |
500 | Server error — tell your lead if you see this |
.filter() / .map(), never by re-fetching.
Each intern has an isolated dataset. Calls to /shamil/api/... do not affect /shibili/api/... or /milan/api/....
The data persists across server restarts.