-
Notifications
You must be signed in to change notification settings - Fork 17
/
MySpot.http
96 lines (73 loc) · 1.58 KB
/
MySpot.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@url = http://localhost:5000
@reservationId = 00000000-0000-0000-0000-000000000001
@parkingSpotId = 00000000-0000-0000-0000-000000000001
@userId = 00000000-0000-0000-0000-000000000001
###
GET {{url}}/users
###
GET {{url}}/users/{{userId}}
###
POST {{url}}/users
Content-Type: application/json
{
"email": "[email protected]",
"username": "user1",
"password": "secret",
"fullName": "John Doe",
"role": "user"
}
###
# @name sign_in
POST {{url}}/users/sign-in
Content-Type: application/json
{
"email": "[email protected]",
"password": "secret"
}
###
@accessToken = {{sign_in.response.body.$.accessToken}}
###
GET {{url}}/users/me
Authorization: Bearer {{accessToken}}
###
GET {{url}}/parking-spots
###
POST {{url}}/parking-spots/{{parkingSpotId}}/reservations/vehicle
Authorization: Bearer {{accessToken}}
Content-Type: application/json
{
"parkingSpotId": "{{parkingSpotId}}",
"date": "2022-04-26",
"licencePlate": "XYZ123"
}
###
POST {{url}}/parking-spots/reservations/cleaning
Content-Type: application/json
{
"date": "2022-04-26"
}
###
PUT {{url}}/parking-spots/reservations/{{reservationId}}
Content-Type: application/json
{
"licencePlate": "XYZ1234"
}
###
DELETE {{url}}/parking-spots/reservations/{{reservationId}}
###
GET {{url}}/api/users/me
Authorization: Bearer {{accessToken}}
###
GET {{url}}/api/users/{{userId}}
Authorization: Bearer {{accessToken}}
###
###
POST {{url}}/api/users
Content-Type: application/json
{
"email": "[email protected]",
"username": "user1",
"password": "secret",
"fullName": "John Doe",
"role": "user"
}