Skip to content

Commit ee8c55a

Browse files
committed
Add Postman file
Postman for testing the app
1 parent 1a9a5f4 commit ee8c55a

File tree

1 file changed

+370
-0
lines changed

1 file changed

+370
-0
lines changed
Lines changed: 370 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,370 @@
1+
{
2+
"info": {
3+
"_postman_id": "eca7bb42-5f2c-4c53-8053-685fc985c3d2",
4+
"name": "Todo-Golang Cloud",
5+
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
6+
"_exporter_id": "31517562"
7+
},
8+
"item": [
9+
{
10+
"name": "User",
11+
"item": [
12+
{
13+
"name": "createUser",
14+
"request": {
15+
"method": "POST",
16+
"header": [],
17+
"body": {
18+
"mode": "raw",
19+
"raw": "{\r\n \"name\": {{name}},\r\n \"pass\": {{pass}}\r\n}",
20+
"options": {
21+
"raw": {
22+
"language": "json"
23+
}
24+
}
25+
},
26+
"url": {
27+
"raw": "{{path}}/user/register",
28+
"host": [
29+
"{{path}}"
30+
],
31+
"path": [
32+
"user",
33+
"register"
34+
]
35+
}
36+
},
37+
"response": []
38+
},
39+
{
40+
"name": "login",
41+
"protocolProfileBehavior": {
42+
"disableBodyPruning": true
43+
},
44+
"request": {
45+
"method": "GET",
46+
"header": [],
47+
"body": {
48+
"mode": "raw",
49+
"raw": "{\r\n \"name\": {{name}},\r\n \"pass\": {{pass}}\r\n}",
50+
"options": {
51+
"raw": {
52+
"language": "json"
53+
}
54+
}
55+
},
56+
"url": {
57+
"raw": "{{path}}/login",
58+
"host": [
59+
"{{path}}"
60+
],
61+
"path": [
62+
"login"
63+
]
64+
}
65+
},
66+
"response": []
67+
},
68+
{
69+
"name": "getAllUser",
70+
"request": {
71+
"method": "GET",
72+
"header": [],
73+
"url": {
74+
"raw": "{{path}}/user/all",
75+
"host": [
76+
"{{path}}"
77+
],
78+
"path": [
79+
"user",
80+
"all"
81+
]
82+
}
83+
},
84+
"response": []
85+
},
86+
{
87+
"name": "getUserByID",
88+
"request": {
89+
"method": "GET",
90+
"header": [],
91+
"url": {
92+
"raw": "{{path}}/user/{{userID}}",
93+
"host": [
94+
"{{path}}"
95+
],
96+
"path": [
97+
"user",
98+
"{{userID}}"
99+
]
100+
}
101+
},
102+
"response": []
103+
},
104+
{
105+
"name": "updateUser",
106+
"request": {
107+
"method": "PUT",
108+
"header": [],
109+
"body": {
110+
"mode": "raw",
111+
"raw": "{\r\n \"name\": {{nameUpdate}},\r\n \"pass\": {{passUpdate}}\r\n}",
112+
"options": {
113+
"raw": {
114+
"language": "json"
115+
}
116+
}
117+
},
118+
"url": {
119+
"raw": "{{path}}/user",
120+
"host": [
121+
"{{path}}"
122+
],
123+
"path": [
124+
"user"
125+
]
126+
}
127+
},
128+
"response": []
129+
},
130+
{
131+
"name": "deleteUser",
132+
"request": {
133+
"method": "DELETE",
134+
"header": [],
135+
"url": {
136+
"raw": "{{path}}/user",
137+
"host": [
138+
"{{path}}"
139+
],
140+
"path": [
141+
"user"
142+
]
143+
}
144+
},
145+
"response": []
146+
},
147+
{
148+
"name": "logout",
149+
"protocolProfileBehavior": {
150+
"disableBodyPruning": true
151+
},
152+
"request": {
153+
"method": "GET",
154+
"header": [],
155+
"body": {
156+
"mode": "raw",
157+
"raw": "{\r\n \"name\": {{name}},\r\n \"pass\": {{pass}}\r\n}",
158+
"options": {
159+
"raw": {
160+
"language": "json"
161+
}
162+
}
163+
},
164+
"url": {
165+
"raw": "{{path}}/logout",
166+
"host": [
167+
"{{path}}"
168+
],
169+
"path": [
170+
"logout"
171+
]
172+
}
173+
},
174+
"response": []
175+
}
176+
]
177+
},
178+
{
179+
"name": "Todo",
180+
"item": [
181+
{
182+
"name": "createTodo",
183+
"request": {
184+
"method": "POST",
185+
"header": [],
186+
"body": {
187+
"mode": "raw",
188+
"raw": "{\r\n \"todo\": {{todo}}\r\n}",
189+
"options": {
190+
"raw": {
191+
"language": "json"
192+
}
193+
}
194+
},
195+
"url": {
196+
"raw": "{{path}}/todo",
197+
"host": [
198+
"{{path}}"
199+
],
200+
"path": [
201+
"todo"
202+
]
203+
}
204+
},
205+
"response": []
206+
},
207+
{
208+
"name": "getAllTodo",
209+
"request": {
210+
"method": "GET",
211+
"header": [],
212+
"url": {
213+
"raw": "{{path}}/todo/all",
214+
"host": [
215+
"{{path}}"
216+
],
217+
"path": [
218+
"todo",
219+
"all"
220+
]
221+
}
222+
},
223+
"response": []
224+
},
225+
{
226+
"name": "getTodoByUserID",
227+
"request": {
228+
"method": "GET",
229+
"header": [],
230+
"url": {
231+
"raw": "{{path}}/todo",
232+
"host": [
233+
"{{path}}"
234+
],
235+
"path": [
236+
"todo"
237+
]
238+
}
239+
},
240+
"response": []
241+
},
242+
{
243+
"name": "updateTodo",
244+
"request": {
245+
"method": "PUT",
246+
"header": [],
247+
"body": {
248+
"mode": "raw",
249+
"raw": "{\r\n \"todo\": {{todo}},\r\n \"isDone\": {{isDone}}\r\n}",
250+
"options": {
251+
"raw": {
252+
"language": "json"
253+
}
254+
}
255+
},
256+
"url": {
257+
"raw": "{{path}}/todo",
258+
"host": [
259+
"{{path}}"
260+
],
261+
"path": [
262+
"todo"
263+
]
264+
}
265+
},
266+
"response": []
267+
},
268+
{
269+
"name": "deleteTodo",
270+
"request": {
271+
"method": "DELETE",
272+
"header": [],
273+
"body": {
274+
"mode": "raw",
275+
"raw": "",
276+
"options": {
277+
"raw": {
278+
"language": "json"
279+
}
280+
}
281+
},
282+
"url": {
283+
"raw": "{{path}}/todo/{{todoID}}",
284+
"host": [
285+
"{{path}}"
286+
],
287+
"path": [
288+
"todo",
289+
"{{todoID}}"
290+
]
291+
}
292+
},
293+
"response": []
294+
}
295+
]
296+
}
297+
],
298+
"event": [
299+
{
300+
"listen": "prerequest",
301+
"script": {
302+
"type": "text/javascript",
303+
"exec": [
304+
"// let varPass = pm.collectionVariables.get(\"pass\");",
305+
"// let varName = pm.collectionVariables.get(\"name\");",
306+
"",
307+
"// for(i=0; i<5;I++){",
308+
"// pm.collectionVariables.set(\"variableName\", myVar);",
309+
"// }"
310+
]
311+
}
312+
},
313+
{
314+
"listen": "test",
315+
"script": {
316+
"type": "text/javascript",
317+
"exec": [
318+
""
319+
]
320+
}
321+
}
322+
],
323+
"variable": [
324+
{
325+
"key": "path",
326+
"value": "http://8.219.130.79:80",
327+
"type": "string"
328+
},
329+
{
330+
"key": "userID",
331+
"value": "1",
332+
"type": "string"
333+
},
334+
{
335+
"key": "todoID",
336+
"value": "1",
337+
"type": "string"
338+
},
339+
{
340+
"key": "name",
341+
"value": "\"dummyNama_1\"",
342+
"type": "string"
343+
},
344+
{
345+
"key": "nameUpdate",
346+
"value": "\"dummyNamaUpdate_1\"",
347+
"type": "string"
348+
},
349+
{
350+
"key": "pass",
351+
"value": "\"dummyPass_1\"",
352+
"type": "string"
353+
},
354+
{
355+
"key": "passUpdate",
356+
"value": "\"dummyPassUpdate_1\"",
357+
"type": "string"
358+
},
359+
{
360+
"key": "todo",
361+
"value": "\"read a book_1\"",
362+
"type": "string"
363+
},
364+
{
365+
"key": "isDone",
366+
"value": "true",
367+
"type": "string"
368+
}
369+
]
370+
}

0 commit comments

Comments
 (0)