-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrest.http
127 lines (106 loc) · 2.7 KB
/
rest.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
// Users
###
POST http://localhost:8090/user/new
content-type:application/json
{
"username":"super",
"password":"super",
"role":"super"
}
###
POST http://localhost:8090/user/login
content-type:application/json
{
"username":"aditya",
"password":"aditya"
}
//End of USER
//Platforms
###
POST http://localhost:8090/platform/add
content-type: application/json
{
"station_name":"Lucknow",
"station_code":"LKO"
}
###
PUT http://localhost:8090/platform/modify/65c8a093199c9e67148e089d
content-type: application/json
{
"station_name":"Deoria",
"station_code":"DEOS"
}
###
GET http://localhost:8090/platform/getAll
###
GET http://localhost:8090/platform/getById/65c8a093199c9e67148e089d
###
DELETE http://localhost:8090/platform/delete/65c8a093199c9e67148e089d
###
//End Of Platforms
//Assets
###
POST http://localhost:8090/asset/add
content-type: application/json
{
"asset_code": "ast9999",
"asset_name": "Water Cooler",
"description": "Voltas Water Cooler",
"purchase_date": "2024-12-30T00:00:00.000Z",
"maintenance_life": 260,
"expiration_date":"2026-12-30T00:00:00.000Z"
}
###
PUT http://localhost:8090/asset/modify/65c8a34a15f19129dad151c2
content-type: application/json
{
"asset_code": "ast999E1",
"asset_name": "Water Cooler",
"description": "Voltas Water Cooler",
"purchase_date": "2024-12-30T00:00:00.000Z",
"maintenance_life": 260,
"expiration_date":"2026-12-30T00:00:00.000Z"
}
###
GET http://localhost:8090/asset/getAll
###
GET http://localhost:8090/asset/getById/65c8a34a15f19129dad151c2
###
DELETE http://localhost:8090/asset/delete/65c8a34a15f19129dad151c2
###
//End Of Asset
//Allotment
###
POST http://localhost:8090/allotment/add
content-type: application/json
{
"station_name":"Gorakhpur",
"station_code":"GKP",
"asset_code":"ast99",
"asset_name":"Water Cooler",
"description":"Voltas Water Cooler",
"allotment_date":"2025-12-31T00:00:00.000+00:00",
"maintenance_due_date":"2026-12-17T00:00:00.000+00:00",
"expiration_date": "2026-12-30T00:00:00.000+00:00"
}
###
PUT http://localhost:8090/allotment/modify/65c8a3a315f19129dad151c9
content-type: application/json
{
"station_name":"Gorakhpur",
"station_code":"GKP",
"asset_code":"ast99",
"asset_name":"Water Cooler",
"description":"Voltas Water Cooler",
"allotment_date":"2024-12-31T00:00:00.000+00:00",
"maintenance_due_date":"2025-12-17T00:00:00.000+00:00",
"expiration_date": "2026-12-30T00:00:00.000+00:00"
}
###
GET http://localhost:8090/allotment/getAll
###
GET http://localhost:8090/allotment/getById/65c8a3a315f19129dad151c9
###
DELETE http://localhost:8090/allotment/delete/65c70a747cfabf8d855d05a5
###
//End of Allotment