-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.http
More file actions
41 lines (34 loc) · 946 Bytes
/
api.http
File metadata and controls
41 lines (34 loc) · 946 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
37
38
39
40
41
### Recuperar todas las peliculas
GET http://localhost:1234/movies
### Recuperar una pelicula por id
GET http://localhost:1234/movies/659f385489315fe811052bf0
### Recuperar todas las peliculas por un género
GET http://localhost:1234/movies?genre=Sci-Fi
### Crear una pelicula con POST
POST http://localhost:1234/movies
Content-Type: application/json
{
"title": "The Godfather",
"year": 1975,
"director": "Francis Ford Coppola",
"duration": 175,
"poster": "https://img.fruugo.com/product/4/49/14441494_max.jpg",
"genre": [
"Crime",
"Drama"
],
"rate": 7.8
}
### Eliminar una pelicula
DELETE http://localhost:1234/movies/e91faf50-b0e5-11ee-94bd-fc4596977167
### Actualizar una parte de la pelicula
PATCH http://localhost:1234/movies/e91faf50-b0e5-11ee-94bd-fc4596977167
Content-Type: application/json
{
"year": 1975,
"rate": 8.5,
"genre": [
"Drama",
"Crime"
]
}