Update documentation
[integration.git] / test / postman / 07_Declare_owningEntity_LineOfBusiness_project_platform.postman_collection.json
1 {
2   "info": {
3     "_postman_id": "4d04e8e7-d495-4dcc-a800-1cf4ab643403",
4     "name": "07_Declare_owningEntity_LineOfBusiness_project_platform",
5     "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
6   },
7   "item": [
8     {
9       "name": "Declare owningEntity in VID",
10       "event": [
11         {
12           "listen": "test",
13           "script": {
14             "id": "0643260b-1c9a-450e-aa72-ac2115244a97",
15             "exec": [
16               "pm.test(\"Status code is 200\", function () {",
17               "    pm.response.to.have.status(200);",
18               "});",
19               ""
20             ],
21             "type": "text/javascript"
22           }
23         }
24       ],
25       "request": {
26         "method": "POST",
27         "header": [
28           {
29             "key": "Content-Type",
30             "value": "application/json"
31           },
32           {
33             "key": "Accept-Encoding",
34             "value": "gzip, deflate"
35           }
36         ],
37         "body": {
38           "mode": "raw",
39           "raw": "{\n    \"options\": [\"{{owning_entity_name}}\"]\n}"
40         },
41         "url": {
42           "raw": "{{url-vid}}/vid/maintenance/category_parameter/owningEntity",
43           "host": [
44             "{{url-vid}}"
45           ],
46           "path": [
47             "vid",
48             "maintenance",
49             "category_parameter",
50             "owningEntity"
51           ]
52         }
53       },
54       "response": []
55     },
56     {
57       "name": "declare Owning-Entity in AAI",
58       "request": {
59         "method": "PUT",
60         "header": [
61           {
62             "key": "Authorization",
63             "value": "Basic QUFJOkFBSQ=="
64           },
65           {
66             "key": "X-FromAppId",
67             "value": "AAI"
68           },
69           {
70             "key": "Accept",
71             "value": "application/json"
72           },
73           {
74             "key": "X-TransactionId",
75             "value": "get_aai_subscr"
76           },
77           {
78             "key": "Content-Type",
79             "value": "application/json"
80           }
81         ],
82         "body": {
83           "mode": "raw",
84           "raw": "{\n    \"owning-entity-name\": \"{{owning_entity_name}}\",\n    \"owning-entity-id\": \"{{owning_entity_id}}\"\n}"
85         },
86         "url": {
87           "raw": "{{url-aai}}/aai/v13/business/owning-entities/owning-entity/{{owning_entity_id}}",
88           "host": [
89             "{{url-aai}}"
90           ],
91           "path": [
92             "aai",
93             "v13",
94             "business",
95             "owning-entities",
96             "owning-entity",
97             "{{owning_entity_id}}"
98           ]
99         }
100       },
101       "response": []
102     },
103     {
104       "name": "Get owning-entities",
105       "event": [
106         {
107           "listen": "test",
108           "script": {
109             "id": "294b8cb1-67a3-435d-817f-7fd5497183db",
110             "exec": [
111               "pm.test(\"Status code is 200\", function () {",
112               "    pm.response.to.have.status(200);",
113               "});",
114               "",
115               "var jsonData = pm.response.json();",
116               "var oe_found = false;",
117               "for (var i = 0; i < jsonData[\"owning-entity\"].length; i++) { ",
118               "   if (jsonData[\"owning-entity\"][i][\"owning-entity-name\"] === pm.environment.get(\"owning_entity\")) {",
119               "       oe_found = true;",
120               "       pm.environment.set(\"auto_owning_entity_id\", \"\"+jsonData[\"owning-entity\"][i][\"owning-entity-id\"]+\"\");",
121               "   }",
122               "}",
123               "tests[\"Owning-Entity \"+pm.environment.get(\"owning_entity\")+\" found and id saved\"] = oe_found === true;"
124             ],
125             "type": "text/javascript"
126           }
127         }
128       ],
129       "request": {
130         "method": "GET",
131         "header": [
132           {
133             "key": "Authorization",
134             "value": "Basic QUFJOkFBSQ=="
135           },
136           {
137             "key": "X-FromAppId",
138             "value": "AAI"
139           },
140           {
141             "key": "Accept",
142             "value": "application/json"
143           },
144           {
145             "key": "X-TransactionId",
146             "value": "get_aai_subscr"
147           },
148           {
149             "key": "Content-Type",
150             "value": "application/json"
151           }
152         ],
153         "body": {
154           "mode": "raw",
155           "raw": ""
156         },
157         "url": {
158           "raw": "{{url-aai}}/aai/v16/business/owning-entities",
159           "host": [
160             "{{url-aai}}"
161           ],
162           "path": [
163             "aai",
164             "v16",
165             "business",
166             "owning-entities"
167           ]
168         }
169       },
170       "response": []
171     },
172     {
173       "name": "Declare platform",
174       "event": [
175         {
176           "listen": "test",
177           "script": {
178             "id": "6d0d2a8b-b756-4386-9113-d39722218bf5",
179             "exec": [
180               "pm.test(\"Status code is 200\", function () {",
181               "    pm.response.to.have.status(200);",
182               "});"
183             ],
184             "type": "text/javascript"
185           }
186         }
187       ],
188       "request": {
189         "method": "POST",
190         "header": [
191           {
192             "key": "Content-Type",
193             "value": "application/json"
194           }
195         ],
196         "body": {
197           "mode": "raw",
198           "raw": "{\n    \"options\": [\"{{platform}}\"]\n}"
199         },
200         "url": {
201           "raw": "{{url-vid}}/vid/maintenance/category_parameter/platform",
202           "host": [
203             "{{url-vid}}"
204           ],
205           "path": [
206             "vid",
207             "maintenance",
208             "category_parameter",
209             "platform"
210           ]
211         }
212       },
213       "response": []
214     },
215     {
216       "name": "Declare lineOfBusiness",
217       "event": [
218         {
219           "listen": "test",
220           "script": {
221             "id": "e177b994-db59-4b13-b003-b6fc0dda6907",
222             "exec": [
223               "pm.test(\"Status code is 200\", function () {",
224               "    pm.response.to.have.status(200);",
225               "});"
226             ],
227             "type": "text/javascript"
228           }
229         }
230       ],
231       "request": {
232         "method": "POST",
233         "header": [
234           {
235             "key": "Content-Type",
236             "value": "application/json"
237           }
238         ],
239         "body": {
240           "mode": "raw",
241           "raw": "{\n    \"options\": [\"{{lineofbusiness}}\"]\n}"
242         },
243         "url": {
244           "raw": "{{url-vid}}/vid/maintenance/category_parameter/lineOfBusiness",
245           "host": [
246             "{{url-vid}}"
247           ],
248           "path": [
249             "vid",
250             "maintenance",
251             "category_parameter",
252             "lineOfBusiness"
253           ]
254         }
255       },
256       "response": []
257     },
258     {
259       "name": "Declare project",
260       "event": [
261         {
262           "listen": "test",
263           "script": {
264             "id": "a5eb2421-a949-44f9-a8f7-786b672aede3",
265             "exec": [
266               "pm.test(\"Status code is 200\", function () {",
267               "    pm.response.to.have.status(200);",
268               "});"
269             ],
270             "type": "text/javascript"
271           }
272         }
273       ],
274       "request": {
275         "method": "POST",
276         "header": [
277           {
278             "key": "Content-Type",
279             "value": "application/json"
280           }
281         ],
282         "body": {
283           "mode": "raw",
284           "raw": "{\n    \"options\": [\"{{project}}\"]\n}"
285         },
286         "url": {
287           "raw": "{{url-vid}}/vid/maintenance/category_parameter/project",
288           "host": [
289             "{{url-vid}}"
290           ],
291           "path": [
292             "vid",
293             "maintenance",
294             "category_parameter",
295             "project"
296           ]
297         }
298       },
299       "response": []
300     }
301   ]
302 }