-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.http
82 lines (58 loc) · 1.47 KB
/
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
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
POST http://localhost:3333/users
Content-Type: application/json
{
"name":"John Smith",
"email": "[email protected]",
"password": "123456"
}
###
POST http://localhost:3333/sessions Content-Type: application/json
{
"email": "[email protected]",
"password": "123456"
}
###
POST http://localhost:3333/rooms
Content-Type: application/json
{
"name": "Room adkjaskdjd",
"capacity": 10,
"location": "floor 2",
"resources": ["whiteboard", "table", "projetor"]
}
###
PUT http://localhost:3333/rooms/84b3f2da-f846-4b3c-8f22-43a614173146
Content-Type: application/json
{
"name": "Room modified 1",
"capacity": 1,
"location": "floor 1",
"resources": ["whiteboard", "table", "projetor"]
}
###
DELETE http://localhost:3333/rooms/fa7b15a3-f2b4-4c1f-a7ec-eb42b23d949c
Content-Type: application/json
###
POST http://localhost:3333/rooms/f572bd3c-9698-4f89-84f5-5fd5245ba118/periods
Content-Type: application/json
{
"startDate": "2024-08-19T12:00:00.870Z",
"endDate": "2024-08-19T16:00:00.870Z"
}
###
POST http://localhost:3333/rooms/f572bd3c-9698-4f89-84f5-5fd5245ba118/reservations
Content-Type: application/json
{
"userId": "5f909a4e-df2c-491d-81ff-5e77215c5b69",
"periodId": "984fd886-d116-451b-949f-7fb04766f95f"
}
###
POST http://localhost:3333/reservations/5f909a4e-df2c-491d-81ff-5e77215c5b69/cancel
Content-Type: application/json
{
}
###
GET http://localhost:3333/reservations/users/5f909a4e-df2c-491d-81ff-5e77215c5b69
Content-Type: application/json
{
}