-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.http
More file actions
35 lines (27 loc) · 859 Bytes
/
api.http
File metadata and controls
35 lines (27 loc) · 859 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
### Get all movies
GET http://localhost:1234/movies
### Get movie by id
GET http://localhost:1234/movies/bc97f4da-95fb-11ee-b556-a0481ce92853
### Get movie by genre
GET http://localhost:1234/movies?genre=Crime
### Create a movie
POST http://localhost:1234/movies
Content-Type: application/json
{
"id": "5ad1a235-0d9c-410a-b32b-220d91689a08",
"title": "Inception",
"year": 2010,
"director": "Christopher Nolan",
"duration": 148,
"poster": "https://m.media-amazon.com/images/I/91Rc8cAmnAL._AC_UF1000,1000_QL80_.jpg",
"genre": ["Action", "Adventure", "Sci-Fi"],
"rate": 8.8
}
### Delete a movie by id
DELETE http://localhost:1234/movies/1d662c2c-9628-11ee-befb-a0481ce92853
### update year of movie (updates a field)
PATCH http://localhost:1234/movies/-9628-11ee-befb-a0481ce92853
Content-Type: application/json
{
"year": 2020
}