-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.http
36 lines (29 loc) · 877 Bytes
/
api.http
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
### Recuperar todas las películas
GET http://localhost:1234/movies
### Recuperar una película por id
GET http://localhost:1234/movies/dcdd0fad-a94c-4810-8acc-5f108d3b18c3
### Recuperar todas las películas por un género
GET http://localhost:1234/movies?genre=ACTION
### Crear una película con POST
POST http://localhost:1234/movies
Content-Type: application/json
{
"sql": "SELECT * FROM users",
"title": "Create The Godfather",
"year": 1975,
"director": "Francis Ford Coppola",
"duration": 175,
"poster": "https://img.fruugo.com/product/4/49/14441494_max.jpg",
"genre": [
"Crime",
"Drama"
]
}
### Borrar una película
DELETE http://localhost:1234/movies/dcdd0fad-a94c-4810-8acc-5f108d3b18c3
### Actualizar una película
PATCH http://localhost:1234/movies/dcdd0fad-a94c-4810-8acc-5f108d3b18c3
Content-Type: application/json
{
"year": 1900
}