-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.http
76 lines (58 loc) · 1.92 KB
/
test.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
### GET All Users
GET http://localhost:8080/admin/user
Authorization: Bearer 123456
### Create User
POST http://localhost:8080/admin/user
Authorization: Bearer 123456
Content-Type: application/x-www-form-urlencoded
username=user1&password=senha1
### Update User
PUT http://localhost:8080/admin/user
Authorization: Bearer 123456
Content-Type: application/x-www-form-urlencoded
username=user1&newpassword=newsenha1
### Delete User
DELETE http://localhost:8080/admin/user
Authorization: Bearer 123456
Content-Type: application/x-www-form-urlencoded
username=user1
### Get All Files
## Bearer Token - base64(username:password)
GET http://localhost:8080/user/file
Authorization: Bearer dXNlcjE6c2VuaGEx
### Upload File
## Bearer Token - base64(username:password)
POST http://localhost:8080/user/file
Authorization: Bearer dXNlcjE6c2VuaGEx
Content-Type: multipart/form-data
file=@file.txt
### Download File
## Bearer Token - base64(username:password)
GET http://localhost:8080/user/file/{fileId}
Authorization: Bearer dXNlcjE6c2VuaGEx
### Delete File
## Bearer Token - base64(username:password)
DELETE http://localhost:8080/user/file/{fileId}
Authorization: Bearer dXNlcjE6c2VuaGEx
### Get File Metadata
## Bearer Token - base64(username:password)
GET http://localhost:8080/user/file/{fileId}/metadata
Authorization: Bearer dXNlcjE6c2VuaGEx
### Get Public File
GET http://localhost:8080/pub/{filename}
### Get Public Files
## Bearer Token - base64(username:password)
GET http://localhost:8080/user/pub
Authorization: Bearer dXNlcjE6c2VuaGEx
### Add Public File
## Bearer Token - base64(username:password)
POST http://localhost:8080/user/pub
Authorization: Bearer dXNlcjE6c2VuaGEx
Content-Type: application/x-www-form-urlencoded
filename=file.txt
### Delete Public File
## Bearer Token - base64(username:password)
DELETE http://localhost:8080/user/pub
Authorization: Bearer dXNlcjE6c2VuaGEx
Content-Type: application/x-www-form-urlencoded
filename=file.txt