-
Notifications
You must be signed in to change notification settings - Fork 15
/
api.http
42 lines (32 loc) · 990 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
37
38
39
40
41
42
# @host = https://devbcn.shuttleapp.rs
@host = http://localhost:8080
@film_id = 6f05e5f2-133c-11ee-be9f-0ab7e0d8c876
### health
GET {{host}}/api/health HTTP/1.1
### create film
POST {{host}}/api/v1/films HTTP/1.1
Content-Type: application/json
{
"title": "Death in Venice",
"director": "Luchino Visconti",
"year": 1971,
"poster": "https://th.bing.com/th/id/R.0d441f68f2182fd7c129f4e79f6a66ef?rik=h0j7Ecvt7NBYrg&pid=ImgRaw&r=0"
}
### update film
PUT {{host}}/api/v1/films HTTP/1.1
Content-Type: application/json
{
"id": "{{film_id}}",
"title": "Death in Venice",
"director": "Benjamin Britten",
"year": 1981,
"poster": "https://image.tmdb.org/t/p/original//tmT12hTzJorZxd9M8YJOQOJCqsP.jpg"
}
### get all films
GET {{host}}/api/v1/films HTTP/1.1
### get film
GET {{host}}/api/v1/films/{{film_id}} HTTP/1.1
### get bad film
GET {{host}}/api/v1/films/356e42a8-e659-406f-98 HTTP/1.1
### delete film
DELETE {{host}}/api/v1/films/{{film_id}} HTTP/1.1