-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser-requests.http
More file actions
101 lines (79 loc) · 2.16 KB
/
Copy pathuser-requests.http
File metadata and controls
101 lines (79 loc) · 2.16 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
### Admin Login
POST http://localhost:8080/api/v1/auth/login
Authorization: Basic admin Admin123.
Content-Type: application/json
> {%
client.global.set("auth_token", response.body.accessToken);
%}
### User Login
POST http://localhost:8080/api/v1/auth/login
Authorization: Basic user1 User123.
Content-Type: application/json
> {%
client.global.set("auth_token", response.body.accessToken);
%}
### Create User Successfully
POST http://localhost:8080/api/v1/users
Authorization: Bearer {{auth_token}}
Content-Type: application/json
{
"username": "user3456",
"password": "User123.",
"role": 0
}
### Create User Bad Request Username already exists
POST http://localhost:8080/api/v1/users
Content-Type: application/json
{
"username": "admin",
"password": "User123.",
"role": 0
}
### Create User Bad Request Argument Not Valid
POST http://localhost:8080/api/v1/users
Content-Type: application/json
{
"username": "us",
"password": "User",
"role": 0
}
### Get User Successfully
GET http://localhost:8080/api/v1/users/1
Authorization: Bearer {{auth_token}}
### Get User Not Found
GET http://localhost:8080/api/v1/users/999
Authorization: Bearer {{auth_token}}
### Update User Successfully
PUT http://localhost:8080/api/v1/users/2
Authorization: Bearer {{auth_token}}
Content-Type: application/json
{
"password": "User123.",
"role": 0,
"status": 0
}
### Update User Not Found
PUT http://localhost:8080/api/v1/users/999
Authorization: Bearer {{auth_token}}
Content-Type: application/json
{
"password": "User123.",
"role": 0,
"status": 0
}
### Delete User Successfully
DELETE http://localhost:8080/api/v1/users/83
Authorization: Bearer {{auth_token}}
### Delete User Not Found
DELETE http://localhost:8080/api/v1/users/999
Authorization: Bearer {{auth_token}}
### Get All Users Successfully
GET http://localhost:8080/api/v1/users?page=0,size=10
Authorization: Bearer {{auth_token}}
### Get User By Username
GET http://localhost:8080/api/v1/users/username/user1
Authorization: Bearer {{auth_token}}
### Get User By Username Not Found
GET http://localhost:8080/api/v1/users/username/user999
Authorization: Bearer {{auth_token}}
### Get User By Username Bad Request