-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands.txt
69 lines (48 loc) · 1.38 KB
/
commands.txt
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
docker commands
docker-compose up/down
#start a specific docker .yml file
docker-compose -f filename.yml up/down
#######################################
curl commands
#Files upload
curl -X POST -H "Content-Type: multipart/form-data" -F "file=@./movies.csv" http://localhost:8080/api/upload-csv-file
curl -X POST -H "Content-Type: multipart/form-data" -F "file=@./ratings.csv" http://localhost:8080//api/upload-csv-file/ratings
#Data upload
curl -X POST -H "Content-Type: text/plain" --data-binary @./movies_short.csv http://localhost:8080/api/upload-csv-file-1
#JSON add
curl -X POST \
http://localhost:8080/add/movie \
-H 'Content-Type: application/json' \
-d '{
"Id": 1,
"title": "Inception",
"genres": "Sci-Fi"
}'
#JSON DELETE
curl -X DELETE \
http://localhost:8080/delete/movie \
-H 'Content-Type: application/json' \
-d '{
"Id": 1,
"title": "Inception",
"genres": "Sci-Fi"
}'
#JSON update
curl -X PUT \
http://localhost:8080/update/movie \
-H 'Content-Type: application/json' \
-d '{
"Id": 2,
"title": "Toy Story",
"genres": "Adventure"
}'
curl -X GET \
http://localhost:8080/get/movie \
-H 'Content-Type: application/json' \
-d '{
"Id": 2,
"title": "Toy Story",
"genres": "Adventure"
}'
curl -X GET http://localhost:8080/get/movies/genres/Adventure
curl -X GET http://localhost:8080/get/movies/title/Toy%20Story