This repository has been archived by the owner on Jul 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi-requests.http
73 lines (57 loc) · 1.63 KB
/
api-requests.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
### list all
GET http://localhost:8080/api/v1/work-shifts
Content-Type: application/json
### list all by start time and end time.
GET http://localhost:8080/api/v1/work-shifts?startTime=2020-01-01T00:00:00&endTime=2020-01-02T23:23:59
Content-Type: application/json
### list all by start time.
GET http://localhost:8080/api/v1/work-shifts?startTime=2020-01-03T23:23:59
Content-Type: application/json
### create 1
POST http://localhost:8080/api/v1/work-shifts
Content-Type: application/json
{
"startTime": "2020-01-01T00:00:00",
"endTime": "2020-01-01T23:59:57"
}
### create - fail - start time is before end time.
POST http://localhost:8080/api/v1/work-shifts
Content-Type: application/json
{
"startTime": "2020-01-01T00:00:01",
"endTime": "2020-01-01T00:00:00"
}
### create - fail - overlaps with another work shift.
POST http://localhost:8080/api/v1/work-shifts
Content-Type: application/json
{
"startTime": "2020-01-01T23:59:57",
"endTime": "2020-01-02T00:00:00"
}
### create 2
POST http://localhost:8080/api/v1/work-shifts
Content-Type: application/json
{
"startTime": "2020-01-02T00:00:00",
"endTime": "2020-01-02T23:59:57"
}
### create 3
POST http://localhost:8080/api/v1/work-shifts
Content-Type: application/json
{
"startTime": "2019-12-30T00:00:00",
"endTime": "2019-12-30T23:59:57"
}
### update
PUT http://localhost:8080/api/v1/work-shifts/1
Content-Type: application/json
{
"startTime": "2020-01-01T00:00:00",
"endTime": "2020-01-01T23:00:00"
}
### view
GET http://localhost:8080/api/v1/work-shifts/2
Content-Type: application/json
### delete
DELETE http://localhost:8080/api/v1/work-shifts/1
Content-Type: application/json