1+ {
2+ "info" : {
3+ "_postman_id" : " 0a362e15-a9cb-49f7-bec7-d9ae7272d0a4" ,
4+ "name" : " API" ,
5+ "schema" : " https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
6+ },
7+ "item" : [
8+ {
9+ "name" : " API Version" ,
10+ "request" : {
11+ "method" : " GET" ,
12+ "header" : [],
13+ "url" : {
14+ "raw" : " {{BaseUrl}}" ,
15+ "host" : [
16+ " {{BaseUrl}}"
17+ ]
18+ }
19+ },
20+ "response" : []
21+ },
22+ {
23+ "name" : " Create User" ,
24+ "request" : {
25+ "method" : " POST" ,
26+ "header" : [],
27+ "body" : {
28+ "mode" : " raw" ,
29+ "raw" : " {\r\n \" Email\" : \" akash@gmail.com\" ,\r\n \" FirstName\" : \" Akash \" ,\r\n \" LastName\" : \" Jadhav\" ,\r\n \" Password\" : \" Test@123\"\r\n }" ,
30+ "options" : {
31+ "raw" : {
32+ "language" : " json"
33+ }
34+ }
35+ },
36+ "url" : {
37+ "raw" : " {{BaseUrl}}/users" ,
38+ "host" : [
39+ " {{BaseUrl}}"
40+ ],
41+ "path" : [
42+ " users"
43+ ]
44+ }
45+ },
46+ "response" : []
47+ },
48+ {
49+ "name" : " user login" ,
50+ "event" : [
51+ {
52+ "listen" : " test" ,
53+ "script" : {
54+ "exec" : [
55+ " pm.test(\" Status code is 200\" , function () {\r " ,
56+ " pm.response.to.have.status(200);\r " ,
57+ " });\r " ,
58+ " pm.test(\" Body matches string\" , function () {\r " ,
59+ " pm.expect(pm.response.text()).to.include(\" AccessToken\" );\r " ,
60+ " });\r " ,
61+ " var jsonData = pm.response.json();\r " ,
62+ " pm.collectionVariables.set(\" AccessToken\" , jsonData.Data.entity.AccessToken);"
63+ ],
64+ "type" : " text/javascript"
65+ }
66+ }
67+ ],
68+ "request" : {
69+ "method" : " POST" ,
70+ "header" : [],
71+ "body" : {
72+ "mode" : " raw" ,
73+ "raw" : " {\r\n \" Email\" : \" Kiran.kharade@yopmail.com\" ,\r\n \" Password\" : \" Test@123\"\r\n }" ,
74+ "options" : {
75+ "raw" : {
76+ "language" : " json"
77+ }
78+ }
79+ },
80+ "url" : {
81+ "raw" : " {{BaseUrl}}/auth/login" ,
82+ "host" : [
83+ " {{BaseUrl}}"
84+ ],
85+ "path" : [
86+ " auth" ,
87+ " login"
88+ ]
89+ }
90+ },
91+ "response" : []
92+ },
93+ {
94+ "name" : " user get by id" ,
95+ "protocolProfileBehavior" : {
96+ "disableBodyPruning" : true
97+ },
98+ "request" : {
99+ "method" : " GET" ,
100+ "header" : [
101+ {
102+ "key" : " authorization" ,
103+ "value" : " Bearer {{AccessToken}}" ,
104+ "type" : " text"
105+ }
106+ ],
107+ "body" : {
108+ "mode" : " raw" ,
109+ "raw" : " {\r\n \" Email\" : \" Kiran.kharade@yopmail.com\" ,\r\n \" Password\" : \" Test@123\"\r\n }" ,
110+ "options" : {
111+ "raw" : {
112+ "language" : " json"
113+ }
114+ }
115+ },
116+ "url" : {
117+ "raw" : " {{BaseUrl}}/users/15ee7f17-43c6-46e9-a19b-f82440ef8011" ,
118+ "host" : [
119+ " {{BaseUrl}}"
120+ ],
121+ "path" : [
122+ " users" ,
123+ " 15ee7f17-43c6-46e9-a19b-f82440ef8011"
124+ ]
125+ }
126+ },
127+ "response" : []
128+ }
129+ ],
130+ "event" : [
131+ {
132+ "listen" : " prerequest" ,
133+ "script" : {
134+ "type" : " text/javascript" ,
135+ "exec" : [
136+ " "
137+ ]
138+ }
139+ },
140+ {
141+ "listen" : " test" ,
142+ "script" : {
143+ "type" : " text/javascript" ,
144+ "exec" : [
145+ " "
146+ ]
147+ }
148+ }
149+ ],
150+ "variable" : [
151+ {
152+ "key" : " BaseUrl" ,
153+ "value" : " http://localhost:7272/api/v1" ,
154+ "type" : " string"
155+ },
156+ {
157+ "key" : " AccessToken" ,
158+ "value" : " " ,
159+ "type" : " string"
160+ }
161+ ]
162+ }
0 commit comments