-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.http
More file actions
36 lines (30 loc) · 774 Bytes
/
example.http
File metadata and controls
36 lines (30 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
### List all stocks
GET http://127.0.0.1:8000/stocks
### Create a stock
POST http://127.0.0.1:8000/stocks
Content-Type: application/json
{
"symbol": "AAPL",
"company_name": "Apple Inc.",
"sector": "Technology",
"target_price": 210.5,
"personal_score": 9,
"thesis": "Strong ecosystem and recurring revenue.",
"is_favorite": true
}
### Get a stock by id
GET http://127.0.0.1:8000/stocks/1
### Update a stock
PUT http://127.0.0.1:8000/stocks/1
Content-Type: application/json
{
"symbol": "MSFT",
"company_name": "Microsoft Corporation",
"sector": "Technology",
"target_price": 455.0,
"personal_score": 10,
"thesis": "Cloud growth and diversified business lines.",
"is_favorite": false
}
### Delete a stock
DELETE http://127.0.0.1:8000/stocks/1