pyegeria 0.6.2__py3-none-any.whl → 0.6.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. examples/widgets/{catalog_user → cat}/list_projects.py +3 -0
  2. examples/widgets/cli/__init__.py +12 -0
  3. examples/widgets/cli/egeria.py +45 -45
  4. examples/widgets/cli/egeria_cat.py +9 -9
  5. examples/widgets/cli/{egeria_per.py → egeria_my.py} +4 -4
  6. examples/widgets/cli/egeria_ops.py +13 -13
  7. examples/widgets/cli/egeria_tech.py +3 -3
  8. examples/widgets/cli/ops_config.py +2 -0
  9. examples/widgets/{operational → ops}/monitor_engine_activity.py +14 -3
  10. pyegeria/__init__.py +4 -2
  11. pyegeria/_globals.py +1 -0
  12. pyegeria/asset_catalog_omvs.py +24 -29
  13. pyegeria/classification_manager_omvs.py +1830 -0
  14. pyegeria/feedback_manager_omvs.py +4806 -0
  15. {pyegeria-0.6.2.dist-info → pyegeria-0.6.4.dist-info}/METADATA +3 -1
  16. pyegeria-0.6.4.dist-info/RECORD +83 -0
  17. pyegeria-0.6.4.dist-info/entry_points.txt +42 -0
  18. pyegeria/Xfeedback_manager_omvs.py +0 -238
  19. pyegeria-0.6.2.dist-info/RECORD +0 -82
  20. pyegeria-0.6.2.dist-info/entry_points.txt +0 -42
  21. /examples/widgets/{catalog_user → cat}/README.md +0 -0
  22. /examples/widgets/{catalog_user → cat}/__init__.py +0 -0
  23. /examples/widgets/{catalog_user → cat}/get_asset_graph.py +0 -0
  24. /examples/widgets/{catalog_user → cat}/get_collection.py +0 -0
  25. /examples/widgets/{catalog_user → cat}/get_tech_type_elements.py +0 -0
  26. /examples/widgets/{catalog_user → cat}/get_tech_type_template.py +0 -0
  27. /examples/widgets/{catalog_user → cat}/list_assets.py +0 -0
  28. /examples/widgets/{catalog_user → cat}/list_glossary.py +0 -0
  29. /examples/widgets/{catalog_user → cat}/list_tech_types.py +0 -0
  30. /examples/widgets/{catalog_user → cat}/list_todos.py +0 -0
  31. /examples/widgets/{personal → my}/README.md +0 -0
  32. /examples/widgets/{personal → my}/__init__.py +0 -0
  33. /examples/widgets/{personal → my}/list_my_profile.py +0 -0
  34. /examples/widgets/{personal → my}/list_my_roles.py +0 -0
  35. /examples/widgets/{personal → my}/monitor_my_todos.py +0 -0
  36. /examples/widgets/{personal → my}/monitor_open_todos.py +0 -0
  37. /examples/widgets/{personal → my}/my_profile_actions.py +0 -0
  38. /examples/widgets/{operational → ops}/README.md +0 -0
  39. /examples/widgets/{operational → ops}/__init__.py +0 -0
  40. /examples/widgets/{operational → ops}/engine_actions.py +0 -0
  41. /examples/widgets/{operational → ops}/integration_daemon_actions.py +0 -0
  42. /examples/widgets/{operational → ops}/list_catalog_targets.py +0 -0
  43. /examples/widgets/{operational → ops}/load_archive.py +0 -0
  44. /examples/widgets/{operational → ops}/monitor_asset_events.py +0 -0
  45. /examples/widgets/{operational → ops}/monitor_coco_status.py +0 -0
  46. /examples/widgets/{operational → ops}/monitor_gov_eng_status.py +0 -0
  47. /examples/widgets/{operational → ops}/monitor_integ_daemon_status.py +0 -0
  48. /examples/widgets/{operational → ops}/monitor_platform_status.py +0 -0
  49. /examples/widgets/{operational → ops}/monitor_server_list.py +0 -0
  50. /examples/widgets/{operational → ops}/monitor_server_status.py +0 -0
  51. /examples/widgets/{operational → ops}/refresh_integration_daemon.py +0 -0
  52. /examples/widgets/{operational → ops}/restart_integration_daemon.py +0 -0
  53. {pyegeria-0.6.2.dist-info → pyegeria-0.6.4.dist-info}/LICENSE +0 -0
  54. {pyegeria-0.6.2.dist-info → pyegeria-0.6.4.dist-info}/WHEEL +0 -0
@@ -0,0 +1,4806 @@
1
+ """PDX-License-Identifier: Apache-2.0
2
+ Copyright Contributors to the ODPi Egeria project.
3
+
4
+ This module contains an initial version of the feedback_manager_omvs
5
+ module.
6
+
7
+ """
8
+
9
+ import asyncio
10
+ import json
11
+
12
+ # import json
13
+ from pyegeria._client import Client, max_paging_size
14
+ from pyegeria._globals import enable_ssl_check
15
+
16
+
17
+ def jprint(info, comment=None):
18
+ if comment:
19
+ print(comment)
20
+ print(json.dumps(info, indent=2))
21
+
22
+
23
+ def query_seperator(current_string):
24
+ if current_string == "":
25
+ return "?"
26
+ else:
27
+ return "&"
28
+
29
+
30
+ "params are in the form of [(paramName, value), (param2Name, value)] if the value is not None, it will be added to the query string"
31
+
32
+
33
+ def query_string(params):
34
+ result = ""
35
+ for i in range(len(params)):
36
+ if params[i][1] is not None:
37
+ result = f"{result}{query_seperator(result)}{params[i][0]}={params[i][1]}"
38
+ return result
39
+
40
+
41
+ def base_path(fm_client, view_server: str):
42
+ return f"{fm_client.platform_url}/servers/{view_server}/api/open-metadata/feedback-manager"
43
+
44
+
45
+ def extract_relationships_plus(element):
46
+ type_name = element["relatedElement"]["type"]["typeName"]
47
+ guid = element["relationshipHeader"]["guid"]
48
+ properties = element["relationshipProperties"]["propertiesAsStrings"]
49
+ name = element["relatedElement"]["uniqueName"]
50
+ return {"name": name, "typeName": type_name, "guid": guid, "properties": properties}
51
+
52
+
53
+ def extract_related_elements_list(element_list):
54
+ return [extract_relationships_plus(element) for element in element_list]
55
+
56
+
57
+ def related_elements_response(response: dict, detailed_response: bool):
58
+ if detailed_response:
59
+ return response
60
+ else:
61
+ return extract_related_elements_list(response["elementList"])
62
+
63
+
64
+ def element_properties_plus(element):
65
+ props_plus = element["properties"]
66
+ props_plus.update({"guid": element["elementHeader"]["guid"]})
67
+ props_plus.update({"versions": element["elementHeader"]["versions"]})
68
+ return props_plus
69
+
70
+
71
+ def element_property_plus_list(element_list):
72
+ return [element_properties_plus(element) for element in element_list]
73
+
74
+
75
+ def element_response(response: dict, element_type: str, detailed_response: bool):
76
+ if detailed_response:
77
+ return response
78
+ else:
79
+ return element_properties_plus(response[element_type])
80
+
81
+
82
+ def elements_response(response: dict, element_type: str, detailed_response: bool):
83
+ if detailed_response:
84
+ return response
85
+ else:
86
+ return element_property_plus_list(response[element_type])
87
+
88
+
89
+ class FeedbackManager(Client):
90
+ """FeedbackManager is a class that extends the Client class. It
91
+ provides methods to CRUD tags, comments and likes for managed
92
+ elements.
93
+
94
+ Attributes:
95
+
96
+ server_name: str
97
+ The name of the View Server to connect to.
98
+ platform_url : str
99
+ URL of the server platform to connect to
100
+ user_id : str
101
+ The identity of the user calling the method - this sets a
102
+ default optionally used by the methods when the user
103
+ doesn't pass the user_id on a method call.
104
+ user_pwd: str
105
+ The password associated with the user_id. Defaults to None
106
+ verify_flag: bool
107
+ Flag to indicate if SSL Certificates should be verified in the HTTP
108
+ requests.
109
+ Defaults to False.
110
+
111
+ """
112
+
113
+ def __init__(
114
+ self,
115
+ server_name: str,
116
+ platform_url: str,
117
+ token: str = None,
118
+ user_id: str = None,
119
+ user_pwd: str = None,
120
+ verify_flag: bool = enable_ssl_check,
121
+ sync_mode: bool = True,
122
+ ):
123
+ self.admin_command_root: str
124
+ Client.__init__(
125
+ self,
126
+ server_name,
127
+ platform_url,
128
+ user_id=user_id,
129
+ user_pwd=user_pwd,
130
+ token=token,
131
+ async_mode=sync_mode,
132
+ )
133
+
134
+ async def _async_add_comment_reply(
135
+ self,
136
+ element_guid: str,
137
+ comment_guid: str,
138
+ server_name: str = None,
139
+ is_public: bool = True,
140
+ body: dict = {},
141
+ view_service_url_marker: str = None,
142
+ access_service_url_marker: str = None,
143
+ ) -> dict | str:
144
+ """
145
+ Adds a reply to a comment.
146
+
147
+ Parameters
148
+ ----------
149
+ elementGUID
150
+ - String - unique id for the anchor element.
151
+ commentGUID
152
+ - String - unique id for an existing comment. Used to add a reply to a comment.
153
+ serverName
154
+ - name of the server instances for this request.
155
+ isPublic
156
+ - is this visible to other people
157
+ requestBody
158
+ - containing type of comment enum and the text of the comment.
159
+ viewServiceURLMarker
160
+ - optional view service URL marker (overrides accessServiceURLMarker)
161
+ accessServiceURLMarker
162
+ - optional access service URL marker used to identify which back end service to call
163
+
164
+ Returns
165
+ -------
166
+ ElementGUID
167
+
168
+ Raises
169
+ ------
170
+ InvalidParameterException
171
+ one of the parameters is null or invalid or
172
+ PropertyServerException
173
+ There is a problem adding the element properties to the metadata repository or
174
+ UserNotAuthorizedException
175
+ the requesting user is not authorized to issue this request.
176
+ """
177
+ if server_name is None:
178
+ server_name = self.server_name
179
+
180
+ possible_query_params = query_string(
181
+ [
182
+ ("isPublic", is_public),
183
+ ("viewServiceUrlMarker", view_service_url_marker),
184
+ ("accessServiceUrlMarker", access_service_url_marker),
185
+ ]
186
+ )
187
+ url = f"{base_path(self, server_name)}/elements/{element_guid}/comments/{comment_guid}/replies{possible_query_params}"
188
+ response = await self._async_make_request("POST", url, body)
189
+ return response.json()
190
+
191
+ def add_comment_reply(
192
+ self,
193
+ element_guid: str,
194
+ comment_guid: str,
195
+ server_name: str = None,
196
+ is_public: bool = True,
197
+ body: dict = {},
198
+ view_service_url_marker: str = None,
199
+ access_service_url_marker: str = None,
200
+ ) -> dict | str:
201
+ """
202
+ Adds a reply to a comment.
203
+
204
+ Parameters
205
+ ----------
206
+ elementGUID
207
+ - String - unique id for the anchor element.
208
+ commentGUID
209
+ - String - unique id for an existing comment. Used to add a reply to a comment.
210
+ serverName
211
+ - name of the server instances for this request.
212
+ isPublic
213
+ - is this visible to other people
214
+ requestBody
215
+ - containing type of comment enum and the text of the comment.
216
+ viewServiceURLMarker
217
+ - optional view service URL marker (overrides accessServiceURLMarker)
218
+ accessServiceURLMarker
219
+ - optional access service URL marker used to identify which back end service to call
220
+
221
+ Returns
222
+ -------
223
+ ElementGUID
224
+
225
+ Raises
226
+ ------
227
+ InvalidParameterException
228
+ one of the parameters is null or invalid or
229
+ PropertyServerException
230
+ There is a problem adding the element properties to the metadata repository or
231
+ UserNotAuthorizedException
232
+ the requesting user is not authorized to issue this request.
233
+ """
234
+ loop = asyncio.get_event_loop()
235
+ response = loop.run_until_complete(
236
+ self._async_add_comment_reply(
237
+ element_guid,
238
+ comment_guid,
239
+ server_name,
240
+ is_public,
241
+ body,
242
+ view_service_url_marker,
243
+ access_service_url_marker,
244
+ )
245
+ )
246
+ return response
247
+
248
+ loop = asyncio.get_event_loop()
249
+ response = loop.run_until_complete(
250
+ self._async_add_comment_reply(server_name, body)
251
+ )
252
+ return response
253
+
254
+ #
255
+ ## add_comment_to_element implementation
256
+ #
257
+
258
+ async def _async_add_comment_to_element(
259
+ self,
260
+ element_guid: str,
261
+ server_name: str = None,
262
+ is_public: bool = True,
263
+ body: dict = {},
264
+ view_service_url_marker: str = None,
265
+ access_service_url_marker: str = None,
266
+ ) -> dict | str:
267
+ """
268
+ Creates a comment and attaches it to an element.
269
+
270
+ Parameters
271
+ ----------
272
+ serverName
273
+ - name of the server instances for this request.
274
+ elementGUID
275
+ - String - unique id for the element.
276
+ isPublic
277
+ - is this visible to other people
278
+ requestBody
279
+ - containing type of comment enum and the text of the comment.
280
+ viewServiceURLMarker
281
+ - optional view service URL marker (overrides accessServiceURLMarker)
282
+ accessServiceURLMarker
283
+ - optional access service URL marker used to identify which back end service to call
284
+
285
+ Returns
286
+ -------
287
+ ElementGUID
288
+
289
+ Raises
290
+ ------
291
+ InvalidParameterException
292
+ one of the parameters is null or invalid or
293
+ PropertyServerException
294
+ There is a problem adding the element properties to the metadata repository or
295
+ UserNotAuthorizedException
296
+ the requesting user is not authorized to issue this request.
297
+ """
298
+ if server_name is None:
299
+ server_name = self.server_name
300
+
301
+ possible_query_params = query_string(
302
+ [
303
+ ("isPublic", is_public),
304
+ ("viewServiceUrlMarker", view_service_url_marker),
305
+ ("accessServiceUrlMarker", access_service_url_marker),
306
+ ]
307
+ )
308
+ url = f"{base_path(self, server_name)}/elements/{element_guid}/comments{possible_query_params}"
309
+
310
+ response = await self._async_make_request("POST", url, body)
311
+ return response.json()
312
+
313
+ def add_comment_to_element(
314
+ self,
315
+ element_guid: str,
316
+ server_name: str = None,
317
+ is_public: bool = True,
318
+ body: dict = {},
319
+ view_service_url_marker: str = None,
320
+ access_service_url_marker: str = None,
321
+ ) -> dict | str:
322
+ """
323
+ Creates a comment and attaches it to an element.
324
+
325
+ Parameters
326
+ ----------
327
+ serverName
328
+ - name of the server instances for this request.
329
+ elementGUID
330
+ - String - unique id for the element.
331
+ isPublic
332
+ - is this visible to other people
333
+ viewServiceURLMarker
334
+ - optional view service URL marker (overrides accessServiceURLMarker)
335
+ accessServiceURLMarker
336
+ - optional access service URL marker used to identify which back end service to call
337
+ requestBody
338
+ - containing type of comment enum and the text of the comment.
339
+
340
+ Returns
341
+ -------
342
+ ElementGUID
343
+
344
+ Raises
345
+ ------
346
+ InvalidParameterException
347
+ one of the parameters is null or invalid or
348
+ PropertyServerException
349
+ There is a problem adding the element properties to the metadata repository or
350
+ UserNotAuthorizedException
351
+ the requesting user is not authorized to issue this request.
352
+ """
353
+
354
+ loop = asyncio.get_event_loop()
355
+ response = loop.run_until_complete(
356
+ self._async_add_comment_to_element(
357
+ element_guid,
358
+ server_name,
359
+ is_public,
360
+ body,
361
+ view_service_url_marker,
362
+ access_service_url_marker,
363
+ )
364
+ )
365
+ return response
366
+
367
+ #
368
+ ## add_like_to_element implementation
369
+ #
370
+
371
+ async def _async_add_like_to_element(
372
+ self,
373
+ element_guid: str,
374
+ server_name: str = None,
375
+ is_public: bool = True,
376
+ body: dict = {},
377
+ view_service_url_marker: str = None,
378
+ access_service_url_marker: str = None,
379
+ ) -> dict | str:
380
+ """
381
+ Creates a "like" object and attaches it to an element.
382
+
383
+ Parameters
384
+ ----------
385
+ serverName
386
+ - name of the server instances for this request.
387
+ elementGUID
388
+ - String - unique id for the element.
389
+ isPublic
390
+ - is this visible to other people
391
+ viewServiceURLMarker
392
+ - optional view service URL marker (overrides accessServiceURLMarker)
393
+ accessServiceURLMarker
394
+ - optional access service URL marker used to identify which back end service to call
395
+ requestBody
396
+ - optional effective time
397
+
398
+ Returns
399
+ -------
400
+ Void
401
+
402
+ Raises
403
+ ------
404
+ InvalidParameterException
405
+ one of the parameters is null or invalid or
406
+ PropertyServerException
407
+ There is a problem adding the element properties to the metadata repository or
408
+ UserNotAuthorizedException
409
+ the requesting user is not authorized to issue this request.
410
+ """
411
+ if server_name is None:
412
+ server_name = self.server_name
413
+
414
+ possible_query_params = query_string(
415
+ [
416
+ ("isPublic", is_public),
417
+ ("viewServiceUrlMarker", view_service_url_marker),
418
+ ("accessServiceUrlMarker", access_service_url_marker),
419
+ ]
420
+ )
421
+
422
+ url = f"{base_path(self, server_name)}/elements/{element_guid}/likes{possible_query_params}"
423
+
424
+ response = await self._async_make_request("POST", url, body)
425
+ return response.json()
426
+
427
+ def add_like_to_element(
428
+ self,
429
+ element_guid: str,
430
+ server_name: str = None,
431
+ is_public: bool = True,
432
+ body: dict = {},
433
+ view_service_url_marker: str = None,
434
+ access_service_url_marker: str = None,
435
+ ) -> dict | str:
436
+ """
437
+ Creates a "like" object and attaches it to an element.
438
+
439
+ Parameters
440
+ ----------
441
+ serverName
442
+ - name of the server instances for this request.
443
+ elementGUID
444
+ - String - unique id for the element.
445
+ isPublic
446
+ - is this visible to other people
447
+ viewServiceURLMarker
448
+ - optional view service URL marker (overrides accessServiceURLMarker)
449
+ accessServiceURLMarker
450
+ - optional access service URL marker used to identify which back end service to call
451
+ requestBody
452
+ - optional effective time
453
+
454
+ Returns
455
+ -------
456
+ Void
457
+
458
+ Raises
459
+ ------
460
+ InvalidParameterException
461
+ one of the parameters is null or invalid or
462
+ PropertyServerException
463
+ There is a problem adding the element properties to the metadata repository or
464
+ UserNotAuthorizedException
465
+ the requesting user is not authorized to issue this request.
466
+ """
467
+ loop = asyncio.get_event_loop()
468
+ response = loop.run_until_complete(
469
+ self._async_add_like_to_element(
470
+ element_guid,
471
+ server_name,
472
+ is_public,
473
+ body,
474
+ view_service_url_marker,
475
+ access_service_url_marker,
476
+ )
477
+ )
478
+ return response
479
+
480
+ #
481
+ ## add_rating_to_element implementation
482
+ #
483
+
484
+ async def _async_add_rating_to_element(
485
+ self,
486
+ element_guid: str,
487
+ server_name: str = None,
488
+ is_public: bool = True,
489
+ body: dict = {},
490
+ view_service_url_marker: str = None,
491
+ access_service_url_marker: str = None,
492
+ ) -> dict | str:
493
+ """
494
+ Adds a star rating and optional review text to the element.
495
+
496
+ Parameters
497
+ ----------
498
+ serverName
499
+ - name of the server instances for this request.
500
+ elementGUID
501
+ - String - unique id for the element.
502
+ isPublic
503
+ - is this visible to other people
504
+ viewServiceURLMarker
505
+ - optional view service URL marker (overrides accessServiceURLMarker)
506
+ accessServiceURLMarker
507
+ - optional access service URL marker used to identify which back end service to call
508
+ requestBody
509
+ - containing the StarRating and user review of element.
510
+
511
+ Returns
512
+ -------
513
+ ElementGUID
514
+
515
+ Raises
516
+ ------
517
+ InvalidParameterException
518
+ one of the parameters is null or invalid or
519
+ PropertyServerException
520
+ There is a problem adding the element properties to the metadata repository or
521
+ UserNotAuthorizedException
522
+ the requesting user is not authorized to issue this request.
523
+ """
524
+ if server_name is None:
525
+ server_name = self.server_name
526
+
527
+ possible_query_params = query_string(
528
+ [
529
+ ("isPublic", is_public),
530
+ ("viewServiceUrlMarker", view_service_url_marker),
531
+ ("accessServiceUrlMarker", access_service_url_marker),
532
+ ]
533
+ )
534
+ url = f"{base_path(self, server_name)}/elements/{element_guid}/ratings{possible_query_params}"
535
+
536
+ response = await self._async_make_request("POST", url, body)
537
+ return response.json()
538
+
539
+ def add_rating_to_element(
540
+ self,
541
+ element_guid: str,
542
+ server_name: str = None,
543
+ is_public: bool = True,
544
+ body: dict = {},
545
+ view_service_url_marker: str = None,
546
+ access_service_url_marker: str = None,
547
+ ) -> dict | str:
548
+ """
549
+ Adds a star rating and optional review text to the element.
550
+
551
+ Parameters
552
+ ----------
553
+ serverName
554
+ - name of the server instances for this request.
555
+ elementGUID
556
+ - String - unique id for the element.
557
+ isPublic
558
+ - is this visible to other people
559
+ viewServiceURLMarker
560
+ - optional view service URL marker (overrides accessServiceURLMarker)
561
+ accessServiceURLMarker
562
+ - optional access service URL marker used to identify which back end service to call
563
+ requestBody
564
+ - containing the StarRating and user review of element.
565
+
566
+ Returns
567
+ -------
568
+ ElementGUID
569
+
570
+ Raises
571
+ ------
572
+ InvalidParameterException
573
+ one of the parameters is null or invalid or
574
+ PropertyServerException
575
+ There is a problem adding the element properties to the metadata repository or
576
+ UserNotAuthorizedException
577
+ the requesting user is not authorized to issue this request.
578
+ """
579
+ loop = asyncio.get_event_loop()
580
+ response = loop.run_until_complete(
581
+ self._async_add_rating_to_element(
582
+ element_guid,
583
+ server_name,
584
+ is_public,
585
+ body,
586
+ view_service_url_marker,
587
+ access_service_url_marker,
588
+ )
589
+ )
590
+ return response
591
+
592
+ #
593
+ ## add_tag_to_element implementation
594
+ #
595
+
596
+ async def _async_add_tag_to_element(
597
+ self,
598
+ element_guid: str,
599
+ tag_guid: str,
600
+ server_name: str = None,
601
+ is_public: bool = False,
602
+ body: dict = {},
603
+ view_service_url_marker: str = None,
604
+ access_service_url_marker: str = None,
605
+ ) -> dict | str:
606
+ """
607
+ Adds an informal tag (either private of public) to an element.
608
+
609
+ Parameters
610
+ ----------
611
+ serverName
612
+ - name of the server instances for this request.
613
+ elementGUID
614
+ - unique id for the element.
615
+ tagGUID
616
+ - unique id of the tag.
617
+ viewServiceURLMarker
618
+ - optional view service URL marker (overrides accessServiceURLMarker)
619
+ accessServiceURLMarker
620
+ - optional access service URL marker used to identify which back end service to call
621
+ requestBody
622
+ - optional effective time
623
+
624
+ Returns
625
+ -------
626
+ Void
627
+
628
+ Raises
629
+ ------
630
+ InvalidParameterException
631
+ one of the parameters is null or invalid or
632
+ PropertyServerException
633
+ There is a problem adding the element properties to the metadata repository or
634
+ UserNotAuthorizedException
635
+ the requesting user is not authorized to issue this request.
636
+ """
637
+ if server_name is None:
638
+ server_name = self.server_name
639
+
640
+ possible_query_params = query_string(
641
+ [
642
+ ("isPublic", is_public),
643
+ ("viewServiceUrlMarker", view_service_url_marker),
644
+ ("accessServiceUrlMarker", access_service_url_marker),
645
+ ]
646
+ )
647
+ url = f"{base_path(self, server_name)}/elements/{element_guid}/tags/{tag_guid}{possible_query_params}"
648
+ response = await self._async_make_request("POST", url, body)
649
+ return response.json()
650
+
651
+ def add_tag_to_element(
652
+ self,
653
+ element_guid: str,
654
+ tag_guid: str,
655
+ server_name: str = None,
656
+ is_public: bool = False,
657
+ body: dict = {},
658
+ view_service_url_marker: str = None,
659
+ access_service_url_marker: str = None,
660
+ ) -> dict | str:
661
+ """
662
+ Adds an informal tag (either private of public) to an element.
663
+
664
+ Parameters
665
+ ----------
666
+ elementGUID
667
+ - unique id for the element.
668
+ tagGUID
669
+ - unique id of the tag.
670
+ serverName
671
+ - name of the server instances for this request.
672
+ isPublic
673
+ - is this visible to other people
674
+ requestBody
675
+ - optional effective time
676
+ viewServiceURLMarker
677
+ - optional view service URL marker (overrides accessServiceURLMarker)
678
+ accessServiceURLMarker
679
+ - optional access service URL marker used to identify which back end service to call
680
+
681
+ Returns
682
+ -------
683
+ Void
684
+
685
+ Raises
686
+ ------
687
+ InvalidParameterException
688
+ one of the parameters is null or invalid or
689
+ PropertyServerException
690
+ There is a problem adding the element properties to the metadata repository or
691
+ UserNotAuthorizedException
692
+ the requesting user is not authorized to issue this request.
693
+ """
694
+ loop = asyncio.get_event_loop()
695
+ response = loop.run_until_complete(
696
+ self._async_add_tag_to_element(
697
+ element_guid,
698
+ tag_guid,
699
+ server_name,
700
+ is_public,
701
+ body,
702
+ view_service_url_marker,
703
+ access_service_url_marker,
704
+ )
705
+ )
706
+ return response
707
+
708
+ #
709
+ ## clear_accepted_answer implementation
710
+ #
711
+
712
+ async def _async_clear_accepted_answer(
713
+ self,
714
+ question_comment_guid: str,
715
+ answer_comment_guid: str,
716
+ server_name: str = None,
717
+ body: dict = {},
718
+ view_service_url_marker: str = None,
719
+ access_service_url_marker: str = None,
720
+ ) -> dict | str:
721
+ """
722
+ Unlink a comment that contains an answer to a question posed in another comment.
723
+
724
+ Parameters
725
+ ----------
726
+ serverName
727
+ - name of the server to route the request to
728
+ questionCommentGUID
729
+ - unique identifier of the comment containing the question
730
+ answerCommentGUID
731
+ - unique identifier of the comment containing the accepted answer
732
+ viewServiceURLMarker
733
+ - optional view service URL marker (overrides accessServiceURLMarker)
734
+ accessServiceURLMarker
735
+ - optional access service URL marker used to identify which back end service to call
736
+ requestBody
737
+ - properties to help with the mapping of the elements in the external asset manager and open metadata
738
+
739
+ Returns
740
+ -------
741
+ VoidResponse
742
+
743
+ Raises
744
+ ------
745
+ InvalidParameterException
746
+ one of the parameters is null or invalid or
747
+ PropertyServerException
748
+ There is a problem adding the element properties to the metadata repository or
749
+ UserNotAuthorizedException
750
+ the requesting user is not authorized to issue this request.
751
+ """
752
+ if server_name is None:
753
+ server_name = self.server_name
754
+
755
+ possible_query_params = query_string(
756
+ [
757
+ ("viewServiceUrlMarker", view_service_url_marker),
758
+ ("accessServiceUrlMarker", access_service_url_marker),
759
+ ]
760
+ )
761
+ url = f"{base_path(self, server_name)}/comments/questions/{question_comment_guid}/answers/{answer_comment_guid}/remove{possible_query_params}"
762
+ response = await self._async_make_request("POST", url, body)
763
+ return response.json()
764
+
765
+ def clear_accepted_answer(
766
+ self,
767
+ question_comment_guid: str,
768
+ answer_comment_guid: str,
769
+ server_name: str = None,
770
+ body: dict = {},
771
+ view_service_url_marker: str = None,
772
+ access_service_url_marker: str = None,
773
+ ) -> dict | str:
774
+ """
775
+ Unlink a comment that contains an answer to a question posed in another comment.
776
+
777
+ Parameters
778
+ ----------
779
+ serverName
780
+ - name of the server to route the request to
781
+ questionCommentGUID
782
+ - unique identifier of the comment containing the question
783
+ answerCommentGUID
784
+ - unique identifier of the comment containing the accepted answer
785
+ viewServiceURLMarker
786
+ - optional view service URL marker (overrides accessServiceURLMarker)
787
+ accessServiceURLMarker
788
+ - optional access service URL marker used to identify which back end service to call
789
+ requestBody
790
+ - properties to help with the mapping of the elements in the external asset manager and open metadata
791
+
792
+ Returns
793
+ -------
794
+ VoidResponse
795
+
796
+ Raises
797
+ ------
798
+ InvalidParameterException
799
+ one of the parameters is null or invalid or
800
+ PropertyServerException
801
+ There is a problem adding the element properties to the metadata repository or
802
+ UserNotAuthorizedException
803
+ the requesting user is not authorized to issue this request.
804
+ """
805
+ loop = asyncio.get_event_loop()
806
+ response = loop.run_until_complete(
807
+ self._async_clear_accepted_answer(
808
+ question_comment_guid,
809
+ answer_comment_guid,
810
+ server_name,
811
+ body,
812
+ view_service_url_marker,
813
+ access_service_url_marker,
814
+ )
815
+ )
816
+ return response
817
+
818
+ #
819
+ ## create_informal_tag implementation
820
+ #
821
+
822
+ async def _async_create_informal_tag(
823
+ self,
824
+ body: dict,
825
+ server_name: str = None,
826
+ view_service_url_marker: str = None,
827
+ access_service_url_marker: str = None,
828
+ ) -> dict | str:
829
+ """
830
+ Creates a new informal tag and returns the unique identifier for it.
831
+
832
+ Parameters
833
+ ----------
834
+ serverName
835
+ - name of the server instances for this request.
836
+ viewServiceURLMarker
837
+ - optional view service URL marker (overrides accessServiceURLMarker)
838
+ accessServiceURLMarker
839
+ - optional access service URL marker used to identify which back end service to call
840
+ requestBody
841
+ - public/private flag, name of the tag and (optional) description of the tag.
842
+
843
+ Example
844
+ -------
845
+ my_new_tag_body = {
846
+ "isPrivateTag": False,
847
+ "name": "new-tag-from-python",
848
+ "description": "this tag was created using the python API"
849
+ }
850
+ response = fm_client.create_informal_tag(my_new_tag_body)
851
+ print(response)
852
+ {'class': 'GUIDResponse', 'relatedHTTPCode': 200,
853
+ 'guid': '27bb889d-f646-45e4-b032-e9cd7b2a614f'}
854
+
855
+ Returns
856
+ -------
857
+ new elementGUID
858
+
859
+ Raises
860
+ ------
861
+ InvalidParameterException
862
+ one of the parameters is null or invalid or
863
+ PropertyServerException
864
+ There is a problem adding the element properties to the metadata repository or
865
+ UserNotAuthorizedException
866
+ the requesting user is not authorized to issue this request.
867
+ """
868
+ if server_name is None:
869
+ server_name = self.server_name
870
+
871
+ possible_query_params = query_string(
872
+ [
873
+ ("viewServiceUrlMarker", view_service_url_marker),
874
+ ("accessServiceUrlMarker", access_service_url_marker),
875
+ ]
876
+ )
877
+ url = f"{base_path(self, server_name)}/tags{possible_query_params}"
878
+
879
+ response = await self._async_make_request("POST", url, body)
880
+ return response.json()
881
+
882
+ def create_informal_tag(
883
+ self,
884
+ body: dict,
885
+ server_name: str = None,
886
+ view_service_url_marker: str = None,
887
+ access_service_url_marker: str = None,
888
+ ) -> dict | str:
889
+ """
890
+ Creates a new informal tag and returns the unique identifier for it.
891
+
892
+ Parameters
893
+ ----------
894
+ serverName
895
+ - name of the server instances for this request.
896
+ viewServiceURLMarker
897
+ - optional view service URL marker (overrides accessServiceURLMarker)
898
+ accessServiceURLMarker
899
+ - optional access service URL marker used to identify which back end service to call
900
+ requestBody
901
+ - public/private flag, name of the tag and (optional) description of the tag.
902
+
903
+ Example
904
+ -------
905
+ my_new_tag_body = {
906
+ "isPrivateTag": False,
907
+ "name": "new-tag-from-python",
908
+ "description": "this tag was created using the python API"
909
+ }
910
+ response = fm_client.create_informal_tag(my_new_tag_body)
911
+ print(response)
912
+ {'class': 'GUIDResponse', 'relatedHTTPCode': 200,
913
+ 'guid': '27bb889d-f646-45e4-b032-e9cd7b2a614f'}
914
+
915
+ Returns
916
+ -------
917
+ new elementGUID
918
+
919
+ Raises
920
+ ------
921
+ InvalidParameterException
922
+ one of the parameters is null or invalid or
923
+ PropertyServerException
924
+ There is a problem adding the element properties to the metadata repository or
925
+ UserNotAuthorizedException
926
+ the requesting user is not authorized to issue this request.
927
+ """
928
+ loop = asyncio.get_event_loop()
929
+ response = loop.run_until_complete(
930
+ self._async_create_informal_tag(body, server_name)
931
+ )
932
+ return response
933
+
934
+ #
935
+ ## create_note implementation
936
+ #
937
+
938
+ async def _async_create_note(
939
+ self,
940
+ note_log_guid: str,
941
+ server_name: str = None,
942
+ body: dict = {},
943
+ view_service_url_marker: str = None,
944
+ access_service_url_marker: str = None,
945
+ ) -> dict | str:
946
+ """
947
+ Creates a new note for a note log and returns the unique identifier for it.
948
+
949
+ Parameters
950
+ ----------
951
+ noteLogGUID
952
+ - unique identifier of the note log
953
+ serverName
954
+ - name of the server instances for this request
955
+ requestBody
956
+ - contains the name of the tag and (optional) description of the tag
957
+ viewServiceURLMarker
958
+ - optional view service URL marker (overrides accessServiceURLMarker)
959
+ accessServiceURLMarker
960
+ - optional access service URL marker used to identify which back end service to call
961
+
962
+ Returns
963
+ -------
964
+ Guid for the note
965
+
966
+ Raises
967
+ ------
968
+ InvalidParameterException
969
+ one of the parameters is null or invalid or
970
+ PropertyServerException
971
+ There is a problem adding the element properties to the metadata repository or
972
+ UserNotAuthorizedException
973
+ the requesting user is not authorized to issue this request.
974
+ """
975
+ if server_name is None:
976
+ server_name = self.server_name
977
+
978
+ possible_query_params = query_string(
979
+ [
980
+ ("viewServiceUrlMarker", view_service_url_marker),
981
+ ("accessServiceUrlMarker", access_service_url_marker),
982
+ ]
983
+ )
984
+
985
+ url = f"{base_path(self, server_name)}/note-logs/{note_log_guid}/notes{possible_query_params}"
986
+ response = await self._async_make_request("POST", url, body)
987
+ return response.json()
988
+
989
+ def create_note(
990
+ self,
991
+ note_log_guid: str,
992
+ server_name: str = None,
993
+ body: dict = {},
994
+ view_service_url_marker: str = None,
995
+ access_service_url_marker: str = None,
996
+ ) -> dict | str:
997
+ """
998
+ Creates a new note for a note log and returns the unique identifier for it.
999
+
1000
+ Parameters
1001
+ ----------
1002
+ noteLogGUID
1003
+ - unique identifier of the note log
1004
+ serverName
1005
+ - name of the server instances for this request
1006
+ requestBody
1007
+ - contains the name of the tag and (optional) description of the tag
1008
+ viewServiceURLMarker
1009
+ - optional view service URL marker (overrides accessServiceURLMarker)
1010
+ accessServiceURLMarker
1011
+ - optional access service URL marker used to identify which back end service to call
1012
+
1013
+ Returns
1014
+ -------
1015
+ Guid for the note
1016
+
1017
+ Raises
1018
+ ------
1019
+ InvalidParameterException
1020
+ one of the parameters is null or invalid or
1021
+ PropertyServerException
1022
+ There is a problem adding the element properties to the metadata repository or
1023
+ UserNotAuthorizedException
1024
+ the requesting user is not authorized to issue this request.
1025
+ """
1026
+ loop = asyncio.get_event_loop()
1027
+ response = loop.run_until_complete(
1028
+ self._async_create_note(
1029
+ note_log_guid,
1030
+ server_name,
1031
+ body,
1032
+ view_service_url_marker,
1033
+ access_service_url_marker,
1034
+ )
1035
+ )
1036
+ return response
1037
+
1038
+ #
1039
+ ## create_note_log implementation
1040
+ #
1041
+
1042
+ async def _async_create_note_log(
1043
+ self,
1044
+ element_guid: str,
1045
+ server_name: str = None,
1046
+ is_public: bool = True,
1047
+ body: dict = {},
1048
+ view_service_url_marker: str = None,
1049
+ access_service_url_marker: str = None,
1050
+ ) -> dict | str:
1051
+ """
1052
+ Creates a new noteLog and returns the unique identifier for it.
1053
+
1054
+ Parameters
1055
+ ----------
1056
+ elementGUID
1057
+ - unique identifier of the element where the note log is located
1058
+ serverName
1059
+ - name of the server instances for this request
1060
+ isPublic
1061
+ - is this element visible to other people.
1062
+ requestBody
1063
+ - contains the name of the tag and (optional) description of the tag
1064
+ viewServiceURLMarker
1065
+ - optional view service URL marker (overrides accessServiceURLMarker)
1066
+ accessServiceURLMarker
1067
+ - optional access service URL marker used to identify which back end service to call
1068
+
1069
+ Returns
1070
+ -------
1071
+ ElementGUID
1072
+
1073
+ Raises
1074
+ ------
1075
+ InvalidParameterException
1076
+ one of the parameters is null or invalid or
1077
+ PropertyServerException
1078
+ There is a problem adding the element properties to the metadata repository or
1079
+ UserNotAuthorizedException
1080
+ the requesting user is not authorized to issue this request.
1081
+ """
1082
+ if server_name is None:
1083
+ server_name = self.server_name
1084
+
1085
+ possible_query_params = query_string(
1086
+ [
1087
+ ("isPublic", is_public),
1088
+ ("viewServiceUrlMarker", view_service_url_marker),
1089
+ ("accessServiceUrlMarker", access_service_url_marker),
1090
+ ]
1091
+ )
1092
+ url = f"{base_path(self, server_name)}/elements/{element_guid}/note-logs{possible_query_params}"
1093
+ response = await self._async_make_request("POST", url, body)
1094
+ return response.json()
1095
+
1096
+ def create_note_log(
1097
+ self,
1098
+ element_guid: str,
1099
+ server_name: str = None,
1100
+ is_public: bool = True,
1101
+ body: dict = {},
1102
+ view_service_url_marker: str = None,
1103
+ access_service_url_marker: str = None,
1104
+ ) -> dict | str:
1105
+ """
1106
+ Creates a new noteLog and returns the unique identifier for it.
1107
+
1108
+ Parameters
1109
+ ----------
1110
+ elementGUID
1111
+ - unique identifier of the element where the note log is located
1112
+ serverName
1113
+ - name of the server instances for this request
1114
+ isPublic
1115
+ - is this element visible to other people.
1116
+ requestBody
1117
+ - contains the name of the tag and (optional) description of the tag
1118
+ viewServiceURLMarker
1119
+ - optional view service URL marker (overrides accessServiceURLMarker)
1120
+ accessServiceURLMarker
1121
+ - optional access service URL marker used to identify which back end service to call
1122
+
1123
+ Returns
1124
+ -------
1125
+ ElementGUID
1126
+
1127
+ Raises
1128
+ ------
1129
+ InvalidParameterException
1130
+ one of the parameters is null or invalid or
1131
+ PropertyServerException
1132
+ There is a problem adding the element properties to the metadata repository or
1133
+ UserNotAuthorizedException
1134
+ the requesting user is not authorized to issue this request.
1135
+ """
1136
+ loop = asyncio.get_event_loop()
1137
+ response = loop.run_until_complete(
1138
+ self._async_create_note_log(
1139
+ element_guid,
1140
+ server_name,
1141
+ is_public,
1142
+ body,
1143
+ view_service_url_marker,
1144
+ access_service_url_marker,
1145
+ )
1146
+ )
1147
+ return response
1148
+
1149
+ #
1150
+ ## delete_tag implementation
1151
+ #
1152
+
1153
+ async def _async_delete_tag(
1154
+ self,
1155
+ tag_guid: str,
1156
+ server_name: str = None,
1157
+ body: dict = {},
1158
+ view_service_url_marker: str = None,
1159
+ access_service_url_marker: str = None,
1160
+ ) -> dict | str:
1161
+ """
1162
+ Removes an informal tag from the repository.
1163
+
1164
+ All the tagging relationships to this informal tag are lost. A
1165
+ private tag can be deleted by its creator and all the
1166
+ references are lost; a public tag can be deleted by anyone,
1167
+ but only if it is not attached to any referenceable.
1168
+
1169
+ Parameters
1170
+ ----------
1171
+ serverName
1172
+ - name of the server instances for this request
1173
+ tagGUID
1174
+ - String - unique id for the tag.
1175
+ viewServiceURLMarker
1176
+ - optional view service URL marker (overrides accessServiceURLMarker)
1177
+ accessServiceURLMarker
1178
+ - optional access service URL marker used to identify which back end service to call
1179
+ requestBody
1180
+ - null request body.
1181
+
1182
+ Returns
1183
+ -------
1184
+ VOIDResponse
1185
+
1186
+ Example
1187
+ -------
1188
+ my_new_tag_tag_guid = {
1189
+ "isPrivateTag": False,
1190
+ "name": "new-tag-from-python",
1191
+ "description": "this tag was created using the python API"
1192
+ }
1193
+ create_response = fm_client.delete_tag(my_new_tag_tag_guid)
1194
+ print(create_response)
1195
+ {'class': 'GUIDResponse', 'relatedHTTPCode': 200,
1196
+ 'guid': '27bb889d-f646-45e4-b032-e9cd7b2a614f'}
1197
+ delete_response = fm_client.delete_tag("view-server", create_response["guid"])
1198
+ print(delete_response)
1199
+ {'class': 'VoidResponse', 'relatedHTTPCode': 200}
1200
+
1201
+ Raises
1202
+ ------
1203
+ InvalidParameterException
1204
+ one of the parameters is null or invalid or
1205
+ PropertyServerException
1206
+ There is a problem adding the element properties to the metadata repository or
1207
+ UserNotAuthorizedException
1208
+ the requesting user is not authorized to issue this request.
1209
+ """
1210
+ if server_name is None:
1211
+ server_name = self.server_name
1212
+
1213
+ possible_query_params = query_string(
1214
+ [
1215
+ ("viewServiceUrlMarker", view_service_url_marker),
1216
+ ("accessServiceUrlMarker", access_service_url_marker),
1217
+ ]
1218
+ )
1219
+ url = f"{self.platform_url}/servers/{server_name}/api/open-metadata/feedback-manager/tags/{tag_guid}/remove{possible_query_params}"
1220
+
1221
+ response = await self._async_make_request("POST", url, {})
1222
+ return response.json()
1223
+
1224
+ def delete_tag(
1225
+ self,
1226
+ tag_guid: str,
1227
+ server_name: str = None,
1228
+ body: dict = {},
1229
+ view_service_url_marker: str = None,
1230
+ access_service_url_marker: str = None,
1231
+ ) -> dict | str:
1232
+ """
1233
+ Removes an informal tag from the repository.
1234
+
1235
+ All the tagging relationships to this informal tag are lost. A
1236
+ private tag can be deleted by its creator and all the
1237
+ references are lost; a public tag can be deleted by anyone,
1238
+ but only if it is not attached to any referenceable.
1239
+
1240
+ Parameters
1241
+ ----------
1242
+ serverName
1243
+ - name of the server instances for this request
1244
+ tagGUID
1245
+ - String - unique id for the tag.
1246
+ viewServiceURLMarker
1247
+ - optional view service URL marker (overrides accessServiceURLMarker)
1248
+ accessServiceURLMarker
1249
+ - optional access service URL marker used to identify which back end service to call
1250
+ requestBody
1251
+ - null request body.
1252
+
1253
+ Returns
1254
+ -------
1255
+ VOIDResponse
1256
+
1257
+ Example
1258
+ -------
1259
+ my_new_tag_tag_guid = {
1260
+ "isPrivateTag": False,
1261
+ "name": "new-tag-from-python",
1262
+ "description": "this tag was created using the python API"
1263
+ }
1264
+ create_response = fm_client.delete_tag(my_new_tag_tag_guid)
1265
+ print(create_response)
1266
+ {'class': 'GUIDResponse', 'relatedHTTPCode': 200,
1267
+ 'guid': '27bb889d-f646-45e4-b032-e9cd7b2a614f'}
1268
+ delete_response = fm_client.delete_tag("view-server", create_response["guid"])
1269
+ print(delete_response)
1270
+ {'class': 'VoidResponse', 'relatedHTTPCode': 200}
1271
+
1272
+ Raises
1273
+ ------
1274
+ InvalidParameterException
1275
+ one of the parameters is null or invalid or
1276
+ PropertyServerException
1277
+ There is a problem adding the element properties to the metadata repository or
1278
+ UserNotAuthorizedException
1279
+ the requesting user is not authorized to issue this request.
1280
+ """
1281
+ loop = asyncio.get_event_loop()
1282
+ response = loop.run_until_complete(
1283
+ self._async_delete_tag(
1284
+ tag_guid,
1285
+ server_name,
1286
+ body,
1287
+ view_service_url_marker,
1288
+ access_service_url_marker,
1289
+ )
1290
+ )
1291
+ return response
1292
+
1293
+ #
1294
+ ## find_my_tags implementation
1295
+ #
1296
+
1297
+ async def _async_find_my_tags(
1298
+ self,
1299
+ body: str,
1300
+ server_name: str = None,
1301
+ starts_with: bool = None,
1302
+ ends_with: bool = None,
1303
+ ignore_case: bool = None,
1304
+ start_from: int = 0,
1305
+ page_size: int = max_paging_size,
1306
+ view_service_url_marker: str = None,
1307
+ access_service_url_marker: str = None,
1308
+ detailed_response: bool = False,
1309
+ ) -> dict | str:
1310
+ """
1311
+ Return the list of the calling user's private tags containing the supplied string in either the name or description. The search string is a regular expression (RegEx).
1312
+
1313
+
1314
+ Parameters
1315
+ ----------
1316
+ serverName
1317
+ - name of the server instances for this request.
1318
+ startsWith
1319
+ - does the value start with the supplied string?
1320
+ endsWith
1321
+ - does the value end with the supplied string?
1322
+ ignoreCase
1323
+ - should the search ignore case?
1324
+ startFrom
1325
+ - index of the list to start from (0 for start).
1326
+ pageSize
1327
+ - maximum number of elements to return.
1328
+ viewServiceURLMarker
1329
+ - optional view service URL marker (overrides accessServiceURLMarker)
1330
+ accessServiceURLMarker
1331
+ - optional access service URL marker used to identify which back end service to call
1332
+ requestBody
1333
+ - search string and effective time.
1334
+
1335
+ Returns
1336
+ -------
1337
+ list of tag objects
1338
+
1339
+ Raises
1340
+ ------
1341
+ InvalidParameterException
1342
+ one of the parameters is null or invalid or
1343
+ PropertyServerException
1344
+ There is a problem adding the element properties to the metadata repository or
1345
+ UserNotAuthorizedException
1346
+ the requesting user is not authorized to issue this request.
1347
+ """
1348
+ if server_name is None:
1349
+ server_name = self.server_name
1350
+
1351
+ possible_query_params = query_string(
1352
+ [
1353
+ ("startsWith", starts_with),
1354
+ ("endsWith", ends_with),
1355
+ ("ignoreCase", ignore_case),
1356
+ ("startFrom", start_from),
1357
+ ("pageSize", page_size),
1358
+ ("viewServiceUrlMarker", view_service_url_marker),
1359
+ ("accessServiceUrlMarker", access_service_url_marker),
1360
+ ]
1361
+ )
1362
+ url = f"{base_path(self, server_name)}/tags/by-search-string{possible_query_params}"
1363
+ response = await self._async_make_request("POST", url, body)
1364
+ return elements_response(response.json(), "tags", detailed_response)
1365
+
1366
+ def find_my_tags(
1367
+ self,
1368
+ body: str,
1369
+ server_name: str = None,
1370
+ starts_with: bool = None,
1371
+ ends_with: bool = None,
1372
+ ignore_case: bool = None,
1373
+ start_from: int = 0,
1374
+ page_size: int = max_paging_size,
1375
+ view_service_url_marker: str = None,
1376
+ access_service_url_marker: str = None,
1377
+ detailed_response: bool = False,
1378
+ ) -> dict | str:
1379
+ """
1380
+ Return the list of the calling user's private tags containing the supplied string in either the name or description. The search string is a regular expression (RegEx).
1381
+
1382
+
1383
+ Parameters
1384
+ ----------
1385
+ serverName
1386
+ - name of the server instances for this request.
1387
+ startsWith
1388
+ - does the value start with the supplied string?
1389
+ endsWith
1390
+ - does the value end with the supplied string?
1391
+ ignoreCase
1392
+ - should the search ignore case?
1393
+ startFrom
1394
+ - index of the list to start from (0 for start).
1395
+ pageSize
1396
+ - maximum number of elements to return.
1397
+ viewServiceURLMarker
1398
+ - optional view service URL marker (overrides accessServiceURLMarker)
1399
+ accessServiceURLMarker
1400
+ - optional access service URL marker used to identify which back end service to call
1401
+ requestBody
1402
+ - search string and effective time.
1403
+
1404
+ Returns
1405
+ -------
1406
+ list of tag objects
1407
+
1408
+ Raises
1409
+ ------
1410
+ InvalidParameterException
1411
+ one of the parameters is null or invalid or
1412
+ PropertyServerException
1413
+ There is a problem adding the element properties to the metadata repository or
1414
+ UserNotAuthorizedException
1415
+ the requesting user is not authorized to issue this request.
1416
+ """
1417
+ loop = asyncio.get_event_loop()
1418
+ response = loop.run_until_complete(
1419
+ self._async_find_my_tags(
1420
+ body,
1421
+ server_name=server_name,
1422
+ starts_with=starts_with,
1423
+ ends_with=ends_with,
1424
+ ignore_case=ignore_case,
1425
+ start_from=start_from,
1426
+ page_size=page_size,
1427
+ view_service_url_marker=view_service_url_marker,
1428
+ access_service_url_marker=access_service_url_marker,
1429
+ detailed_response=detailed_response,
1430
+ )
1431
+ )
1432
+ return response
1433
+
1434
+ #
1435
+ ## find_note_logs implementation
1436
+ #
1437
+
1438
+ async def _async_find_note_logs(
1439
+ self,
1440
+ body: dict,
1441
+ server_name: str = None,
1442
+ starts_with: bool = None,
1443
+ ends_with: bool = None,
1444
+ ignore_case: bool = None,
1445
+ start_from: int = 0,
1446
+ page_size: int = max_paging_size,
1447
+ view_service_url_marker: str = None,
1448
+ access_service_url_marker: str = None,
1449
+ detailed_response: bool = False,
1450
+ ) -> dict | str:
1451
+ """
1452
+ Retrieve the list of note log metadata elements that contain the search string.
1453
+
1454
+ Parameters
1455
+ ----------
1456
+ requestBody
1457
+ - search string and effective time.
1458
+ serverName
1459
+ - name of the server instances for this request.
1460
+ startsWith
1461
+ - does the value start with the supplied string?
1462
+ endsWith
1463
+ - does the value end with the supplied string?
1464
+ ignoreCase
1465
+ - should the search ignore case?
1466
+ startFrom
1467
+ - index of the list to start from (0 for start).
1468
+ pageSize
1469
+ - maximum number of elements to return.
1470
+ viewServiceURLMarker
1471
+ - optional view service URL marker (overrides accessServiceURLMarker)
1472
+ accessServiceURLMarker
1473
+ - optional access service URL marker used to identify which back end service to call
1474
+
1475
+ Returns
1476
+ -------
1477
+ list of matching metadata elements
1478
+
1479
+ Raises
1480
+ ------
1481
+ InvalidParameterException
1482
+ one of the parameters is null or invalid or
1483
+ PropertyServerException
1484
+ There is a problem adding the element properties to the metadata repository or
1485
+ UserNotAuthorizedException
1486
+ the requesting user is not authorized to issue this request.
1487
+ """
1488
+ if server_name is None:
1489
+ server_name = self.server_name
1490
+
1491
+ possible_query_params = query_string(
1492
+ [
1493
+ ("startsWith", starts_with),
1494
+ ("endsWith", ends_with),
1495
+ ("ignoreCase", ignore_case),
1496
+ ("startFrom", start_from),
1497
+ ("pageSize", page_size),
1498
+ ("viewServiceUrlMarker", view_service_url_marker),
1499
+ ("accessServiceUrlMarker", access_service_url_marker),
1500
+ ]
1501
+ )
1502
+ url = f"{base_path(self, server_name)}/note-logs/by-search-string{possible_query_params}"
1503
+ response = await self._async_make_request("POST", url, body)
1504
+ return elements_response(response.json(), "elementList", detailed_response)
1505
+
1506
+ def find_note_logs(
1507
+ self,
1508
+ body: dict,
1509
+ server_name: str = None,
1510
+ starts_with: bool = None,
1511
+ ends_with: bool = None,
1512
+ ignore_case: bool = None,
1513
+ start_from: int = 0,
1514
+ page_size: int = max_paging_size,
1515
+ view_service_url_marker: str = None,
1516
+ access_service_url_marker: str = None,
1517
+ detailed_response: bool = False,
1518
+ ) -> dict | str:
1519
+ """
1520
+ Retrieve the list of note log metadata elements that contain the search string.
1521
+
1522
+ Parameters
1523
+ ----------
1524
+ requestBody
1525
+ - search string and effective time.
1526
+ serverName
1527
+ - name of the server instances for this request.
1528
+ startsWith
1529
+ - does the value start with the supplied string?
1530
+ endsWith
1531
+ - does the value end with the supplied string?
1532
+ ignoreCase
1533
+ - should the search ignore case?
1534
+ startFrom
1535
+ - index of the list to start from (0 for start).
1536
+ pageSize
1537
+ - maximum number of elements to return.
1538
+ viewServiceURLMarker
1539
+ - optional view service URL marker (overrides accessServiceURLMarker)
1540
+ accessServiceURLMarker
1541
+ - optional access service URL marker used to identify which back end service to call
1542
+
1543
+ Returns
1544
+ -------
1545
+ list of matching metadata elements
1546
+
1547
+ Raises
1548
+ ------
1549
+ InvalidParameterException
1550
+ one of the parameters is null or invalid or
1551
+ PropertyServerException
1552
+ There is a problem adding the element properties to the metadata repository or
1553
+ UserNotAuthorizedException
1554
+ the requesting user is not authorized to issue this request.
1555
+ """
1556
+ loop = asyncio.get_event_loop()
1557
+ response = loop.run_until_complete(
1558
+ self._async_find_note_logs(
1559
+ body,
1560
+ server_name,
1561
+ starts_with,
1562
+ ends_with,
1563
+ ignore_case,
1564
+ start_from,
1565
+ page_size,
1566
+ view_service_url_marker,
1567
+ access_service_url_marker,
1568
+ detailed_response,
1569
+ )
1570
+ )
1571
+ return response
1572
+
1573
+ #
1574
+ ## find_notes implementation
1575
+ #
1576
+
1577
+ async def _async_find_notes(
1578
+ self,
1579
+ body: dict,
1580
+ server_name: str = None,
1581
+ starts_with: bool = None,
1582
+ ends_with: bool = None,
1583
+ ignore_case: bool = None,
1584
+ start_from: int = 0,
1585
+ page_size: int = max_paging_size,
1586
+ view_service_url_marker: str = None,
1587
+ access_service_url_marker: str = None,
1588
+ detailed_response: bool = False,
1589
+ ) -> dict | str:
1590
+ """
1591
+ Retrieve the list of note metadata elements that contain the search string.
1592
+
1593
+ Parameters
1594
+ ----------
1595
+ requestBody
1596
+ - search string and effective time.
1597
+ serverName
1598
+ - name of the server instances for this request.
1599
+ startsWith
1600
+ - does the value start with the supplied string?
1601
+ endsWith
1602
+ - does the value end with the supplied string?
1603
+ ignoreCase
1604
+ - should the search ignore case?
1605
+ startFrom
1606
+ - index of the list to start from (0 for start).
1607
+ pageSize
1608
+ - maximum number of elements to return.
1609
+ viewServiceURLMarker
1610
+ - optional view service URL marker (overrides accessServiceURLMarker)
1611
+ accessServiceURLMarker
1612
+ - optional access service URL marker used to identify which back end service to call
1613
+
1614
+ Returns
1615
+ -------
1616
+ list of matching metadata elements
1617
+
1618
+ Raises
1619
+ ------
1620
+ InvalidParameterException
1621
+ one of the parameters is null or invalid or
1622
+ PropertyServerException
1623
+ There is a problem adding the element properties to the metadata repository or
1624
+ UserNotAuthorizedException
1625
+ the requesting user is not authorized to issue this request.
1626
+ """
1627
+ if server_name is None:
1628
+ server_name = self.server_name
1629
+
1630
+ possible_query_params = query_string(
1631
+ [
1632
+ ("startsWith", starts_with),
1633
+ ("endsWith", ends_with),
1634
+ ("ignoreCase", ignore_case),
1635
+ ("startFrom", start_from),
1636
+ ("pageSize", page_size),
1637
+ ("viewServiceUrlMarker", view_service_url_marker),
1638
+ ("accessServiceUrlMarker", access_service_url_marker),
1639
+ ]
1640
+ )
1641
+ url = f"{base_path(self, server_name)}/note-logs/notes/by-search-string{possible_query_params}"
1642
+ response = await self._async_make_request("POST", url, body)
1643
+ return elements_response(response.json(), "elementList", detailed_response)
1644
+
1645
+ def find_notes(
1646
+ self,
1647
+ body: dict,
1648
+ server_name: str = None,
1649
+ starts_with: bool = None,
1650
+ ends_with: bool = None,
1651
+ ignore_case: bool = None,
1652
+ start_from: int = 0,
1653
+ page_size: int = max_paging_size,
1654
+ view_service_url_marker: str = None,
1655
+ access_service_url_marker: str = None,
1656
+ detailed_response: bool = False,
1657
+ ) -> dict | str:
1658
+ """
1659
+ Retrieve the list of note metadata elements that contain the search string.
1660
+
1661
+ Parameters
1662
+ ----------
1663
+ requestBody
1664
+ - search string and effective time.
1665
+ serverName
1666
+ - name of the server instances for this request.
1667
+ startsWith
1668
+ - does the value start with the supplied string?
1669
+ endsWith
1670
+ - does the value end with the supplied string?
1671
+ ignoreCase
1672
+ - should the search ignore case?
1673
+ startFrom
1674
+ - index of the list to start from (0 for start).
1675
+ pageSize
1676
+ - maximum number of elements to return.
1677
+ viewServiceURLMarker
1678
+ - optional view service URL marker (overrides accessServiceURLMarker)
1679
+ accessServiceURLMarker
1680
+ - optional access service URL marker used to identify which back end service to call
1681
+
1682
+ Returns
1683
+ -------
1684
+ list of matching metadata elements
1685
+
1686
+ Raises
1687
+ ------
1688
+ InvalidParameterException
1689
+ one of the parameters is null or invalid or
1690
+ PropertyServerException
1691
+ There is a problem adding the element properties to the metadata repository or
1692
+ UserNotAuthorizedException
1693
+ the requesting user is not authorized to issue this request.
1694
+ """
1695
+ loop = asyncio.get_event_loop()
1696
+ response = loop.run_until_complete(
1697
+ self._async_find_notes(
1698
+ body,
1699
+ server_name,
1700
+ starts_with,
1701
+ ends_with,
1702
+ ignore_case,
1703
+ start_from,
1704
+ page_size,
1705
+ view_service_url_marker,
1706
+ access_service_url_marker,
1707
+ detailed_response,
1708
+ )
1709
+ )
1710
+ return response
1711
+
1712
+ #
1713
+ ## find_tags implementation
1714
+ #
1715
+
1716
+ async def _async_find_tags(
1717
+ self,
1718
+ body: str,
1719
+ server_name: str = None,
1720
+ starts_with: bool = None,
1721
+ ends_with: bool = None,
1722
+ ignore_case: bool = None,
1723
+ start_from: int = 0,
1724
+ page_size: int = max_paging_size,
1725
+ detailed_response: bool = False,
1726
+ view_service_url_marker: str = None,
1727
+ access_service_url_marker: str = None,
1728
+ ) -> dict | str:
1729
+ """
1730
+ Return the list of tags containing the supplied string in the text. The search string is a regular expression (RegEx).
1731
+
1732
+ Parameters
1733
+ ----------
1734
+ serverName
1735
+ - name of the server instances for this request.
1736
+ startsWith
1737
+ - does the value start with the supplied string?
1738
+ endsWith
1739
+ - does the value end with the supplied string?
1740
+ ignoreCase
1741
+ - should the search ignore case?
1742
+ startFrom
1743
+ - index of the list to start from (0 for start).
1744
+ pageSize
1745
+ - maximum number of elements to return.
1746
+ viewServiceURLMarker
1747
+ - optional view service URL marker (overrides accessServiceURLMarker)
1748
+ accessServiceURLMarker
1749
+ - optional access service URL marker used to identify which back end service to call
1750
+ requestBody
1751
+ - search string and effective time.
1752
+
1753
+ Returns
1754
+ -------
1755
+ list of tag objects
1756
+
1757
+ Raises
1758
+ ------
1759
+ InvalidParameterException
1760
+ one of the parameters is null or invalid or
1761
+ PropertyServerException
1762
+ There is a problem adding the element properties to the metadata repository or
1763
+ UserNotAuthorizedException
1764
+ the requesting user is not authorized to issue this request.
1765
+ """
1766
+ if server_name is None:
1767
+ server_name = self.server_name
1768
+
1769
+ possible_query_params = query_string(
1770
+ [
1771
+ ("startsWith", starts_with),
1772
+ ("endsWith", ends_with),
1773
+ ("ignoreCase", ignore_case),
1774
+ ("startFrom", start_from),
1775
+ ("pageSize", page_size),
1776
+ ("viewServiceUrlMarker", view_service_url_marker),
1777
+ ("accessServiceUrlMarker", access_service_url_marker),
1778
+ ]
1779
+ )
1780
+ url = f"{base_path(self, server_name)}/tags/by-search-string{possible_query_params}"
1781
+ response = await self._async_make_request("POST", url, body)
1782
+ return elements_response(response.json(), "tags", detailed_response)
1783
+
1784
+ def find_tags(
1785
+ self,
1786
+ body: str,
1787
+ server_name: str = None,
1788
+ starts_with: bool = None,
1789
+ ends_with: bool = None,
1790
+ ignore_case: bool = None,
1791
+ start_from: int = 0,
1792
+ page_size: int = max_paging_size,
1793
+ view_service_url_marker: str = None,
1794
+ access_service_url_marker: str = None,
1795
+ detailed_response: bool = False,
1796
+ ) -> dict | str:
1797
+ """
1798
+ Return the list of tags containing the supplied string in the text. The search string is a regular expression (RegEx).
1799
+
1800
+ Parameters
1801
+ ----------
1802
+ serverName
1803
+ - name of the server instances for this request.
1804
+ startsWith
1805
+ - does the value start with the supplied string?
1806
+ endsWith
1807
+ - does the value end with the supplied string?
1808
+ ignoreCase
1809
+ - should the search ignore case?
1810
+ startFrom
1811
+ - index of the list to start from (0 for start).
1812
+ pageSize
1813
+ - maximum number of elements to return.
1814
+ viewServiceURLMarker
1815
+ - optional view service URL marker (overrides accessServiceURLMarker)
1816
+ accessServiceURLMarker
1817
+ - optional access service URL marker used to identify which back end service to call
1818
+ requestBody
1819
+ - search string and effective time.
1820
+
1821
+ Returns
1822
+ -------
1823
+ list of tag objects
1824
+
1825
+ Raises
1826
+ ------
1827
+ InvalidParameterException
1828
+ one of the parameters is null or invalid or
1829
+ PropertyServerException
1830
+ There is a problem adding the element properties to the metadata repository or
1831
+ UserNotAuthorizedException
1832
+ the requesting user is not authorized to issue this request.
1833
+ """
1834
+ loop = asyncio.get_event_loop()
1835
+ response = loop.run_until_complete(
1836
+ self._async_find_tags(
1837
+ body,
1838
+ server_name=server_name,
1839
+ starts_with=starts_with,
1840
+ ends_with=ends_with,
1841
+ ignore_case=ignore_case,
1842
+ start_from=start_from,
1843
+ page_size=page_size,
1844
+ view_service_url_marker=view_service_url_marker,
1845
+ access_service_url_marker=access_service_url_marker,
1846
+ detailed_response=detailed_response,
1847
+ )
1848
+ )
1849
+ return response
1850
+
1851
+ #
1852
+ ## find_comments implementation
1853
+ #
1854
+
1855
+ async def _async_find_comments(
1856
+ self,
1857
+ body: str,
1858
+ server_name: str = None,
1859
+ starts_with: bool = None,
1860
+ ends_with: bool = None,
1861
+ ignore_case: bool = None,
1862
+ start_from: int = 0,
1863
+ page_size: int = max_paging_size,
1864
+ view_service_url_marker: str = None,
1865
+ access_service_url_marker: str = None,
1866
+ detailed_response: bool = False,
1867
+ ) -> dict | str:
1868
+ """
1869
+ Return the list of comments containing the supplied string.
1870
+
1871
+ Parameters
1872
+ ----------
1873
+ body
1874
+ - search string and effective time.
1875
+ serverName
1876
+ - name of the server instances for this request.
1877
+ startsWith
1878
+ - does the value start with the supplied string?
1879
+ endsWith
1880
+ - does the value end with the supplied string?
1881
+ ignoreCase
1882
+ - should the search ignore case?
1883
+ startFrom
1884
+ - index of the list to start from (0 for start).
1885
+ pageSize
1886
+ - maximum number of elements to return.
1887
+ viewServiceURLMarker
1888
+ - optional view service URL marker (overrides accessServiceURLMarker)
1889
+ accessServiceURLMarker
1890
+ - optional access service URL marker used to identify which back end service to call
1891
+
1892
+ Returns
1893
+ -------
1894
+ list of comment objects
1895
+
1896
+ Raises
1897
+ ------
1898
+ InvalidParameterException
1899
+ one of the parameters is null or invalid or
1900
+ PropertyServerException
1901
+ There is a problem adding the element properties to the metadata repository or
1902
+ UserNotAuthorizedException
1903
+ the requesting user is not authorized to issue this request.
1904
+ """
1905
+ if server_name is None:
1906
+ server_name = self.server_name
1907
+
1908
+ possible_query_params = query_string(
1909
+ [
1910
+ ("startsWith", starts_with),
1911
+ ("endsWith", ends_with),
1912
+ ("ignoreCase", ignore_case),
1913
+ ("startFrom", start_from),
1914
+ ("pageSize", page_size),
1915
+ ("viewServiceUrlMarker", view_service_url_marker),
1916
+ ("accessServiceUrlMarker", access_service_url_marker),
1917
+ ]
1918
+ )
1919
+ url = f"{base_path(self, server_name)}/comments/by-search-string{possible_query_params}"
1920
+ response = await self._async_make_request("POST", url, body)
1921
+ return elements_response(response.json(), "elementList", detailed_response)
1922
+
1923
+ def find_comments(
1924
+ self,
1925
+ body: str,
1926
+ server_name: str = None,
1927
+ starts_with: bool = None,
1928
+ ends_with: bool = None,
1929
+ ignore_case: bool = None,
1930
+ start_from: int = 0,
1931
+ page_size: int = max_paging_size,
1932
+ view_service_url_marker: str = None,
1933
+ access_service_url_marker: str = None,
1934
+ detailed_response: bool = False,
1935
+ ) -> dict | str:
1936
+ """
1937
+ Return the list of comments containing the supplied string.
1938
+
1939
+ Parameters
1940
+ ----------
1941
+ requestBody
1942
+ - search string and effective time.
1943
+ serverName
1944
+ - name of the server instances for this request.
1945
+ startsWith
1946
+ - does the value start with the supplied string?
1947
+ endsWith
1948
+ - does the value end with the supplied string?
1949
+ ignoreCase
1950
+ - should the search ignore case?
1951
+ startFrom
1952
+ - index of the list to start from (0 for start).
1953
+ pageSize
1954
+ - maximum number of elements to return.
1955
+ viewServiceURLMarker
1956
+ - optional view service URL marker (overrides accessServiceURLMarker)
1957
+ accessServiceURLMarker
1958
+ - optional access service URL marker used to identify which back end service to call
1959
+
1960
+ Returns
1961
+ -------
1962
+ list of comment objects
1963
+
1964
+ Raises
1965
+ ------
1966
+ InvalidParameterException
1967
+ one of the parameters is null or invalid or
1968
+ PropertyServerException
1969
+ There is a problem adding the element properties to the metadata repository or
1970
+ UserNotAuthorizedException
1971
+ the requesting user is not authorized to issue this request.
1972
+ """
1973
+ loop = asyncio.get_event_loop()
1974
+ response = loop.run_until_complete(
1975
+ self._async_find_comments(
1976
+ body,
1977
+ server_name,
1978
+ starts_with,
1979
+ ends_with,
1980
+ ignore_case,
1981
+ start_from,
1982
+ page_size,
1983
+ view_service_url_marker,
1984
+ access_service_url_marker,
1985
+ detailed_response,
1986
+ )
1987
+ )
1988
+ return response
1989
+
1990
+ #
1991
+ ## get_attached_comments implementation
1992
+ #
1993
+
1994
+ async def _async_get_attached_comments(
1995
+ self,
1996
+ element_guid: str,
1997
+ server_name: str = None,
1998
+ body: dict = {},
1999
+ start_from: int = 0,
2000
+ page_size: int = max_paging_size,
2001
+ view_service_url_marker: str = None,
2002
+ access_service_url_marker: str = None,
2003
+ detailed_response: bool = False,
2004
+ ) -> dict | str:
2005
+ """
2006
+ Return the comments attached to an element.
2007
+
2008
+ Parameters
2009
+ ----------
2010
+ elementGUID
2011
+ - unique identifier for the element that the comments are connected to (maybe a comment too).
2012
+ serverName
2013
+ - name of the server instances for this request
2014
+ body
2015
+ - optional effective time
2016
+ startFrom
2017
+ - index of the list to start from (0 for start)
2018
+ pageSize
2019
+ - maximum number of elements to return.
2020
+ viewServiceURLMarker
2021
+ - optional view service URL marker (overrides accessServiceURLMarker)
2022
+ accessServiceURLMarker
2023
+ - optional access service URL marker used to identify which back end service to call
2024
+
2025
+ Returns
2026
+ -------
2027
+ list of comments
2028
+
2029
+ Raises
2030
+ ------
2031
+ InvalidParameterException
2032
+ one of the parameters is null or invalid or
2033
+ PropertyServerException
2034
+ There is a problem adding the element properties to the metadata repository or
2035
+ UserNotAuthorizedException
2036
+ the requesting user is not authorized to issue this request.
2037
+ """
2038
+ if server_name is None:
2039
+ server_name = self.server_name
2040
+
2041
+ possible_query_params = query_string(
2042
+ [
2043
+ ("startFrom", start_from),
2044
+ ("pageSize", page_size),
2045
+ ("viewServiceUrlMarker", view_service_url_marker),
2046
+ ("accessServiceUrlMarker", access_service_url_marker),
2047
+ ]
2048
+ )
2049
+ url = f"{base_path(self, server_name)}/elements/{element_guid}/comments/retrieve{possible_query_params}"
2050
+ response = await self._async_make_request("POST", url, body)
2051
+ return elements_response(response.json(), "elementList", detailed_response)
2052
+
2053
+ def get_attached_comments(
2054
+ self,
2055
+ element_guid: str,
2056
+ server_name: str = None,
2057
+ body: dict = {},
2058
+ start_from: int = 0,
2059
+ page_size: int = max_paging_size,
2060
+ view_service_url_marker: str = None,
2061
+ access_service_url_marker: str = None,
2062
+ detailed_response: bool = False,
2063
+ ) -> dict | str:
2064
+ """
2065
+ Return the comments attached to an element.
2066
+
2067
+ Parameters
2068
+ ----------
2069
+ elementGUID
2070
+ - unique identifier for the element that the comments are connected to (maybe a comment too).
2071
+ serverName
2072
+ - name of the server instances for this request
2073
+ body
2074
+ - optional effective time
2075
+ startFrom
2076
+ - index of the list to start from (0 for start)
2077
+ pageSize
2078
+ - maximum number of elements to return.
2079
+ viewServiceURLMarker
2080
+ - optional view service URL marker (overrides accessServiceURLMarker)
2081
+ accessServiceURLMarker
2082
+ - optional access service URL marker used to identify which back end service to call
2083
+
2084
+ Returns
2085
+ -------
2086
+ list of comments
2087
+
2088
+ Raises
2089
+ ------
2090
+ InvalidParameterException
2091
+ one of the parameters is null or invalid or
2092
+ PropertyServerException
2093
+ There is a problem adding the element properties to the metadata repository or
2094
+ UserNotAuthorizedException
2095
+ the requesting user is not authorized to issue this request.
2096
+ """
2097
+ loop = asyncio.get_event_loop()
2098
+ response = loop.run_until_complete(
2099
+ self._async_get_attached_comments(
2100
+ element_guid,
2101
+ server_name,
2102
+ body,
2103
+ start_from,
2104
+ page_size,
2105
+ view_service_url_marker,
2106
+ access_service_url_marker,
2107
+ detailed_response,
2108
+ )
2109
+ )
2110
+ return response
2111
+
2112
+ #
2113
+ ## get_comment implementation
2114
+ #
2115
+
2116
+ async def _async_get_comment(
2117
+ self,
2118
+ comment_guid: str,
2119
+ server_name: str = None,
2120
+ body: dict = {},
2121
+ view_service_url_marker: str = None,
2122
+ access_service_url_marker: str = None,
2123
+ detailed_response: bool = False,
2124
+ ) -> dict | str:
2125
+ """
2126
+ Return the requested comment.
2127
+
2128
+ Parameters
2129
+ ----------
2130
+ serverName
2131
+ - name of the server instances for this request
2132
+ commentGUID
2133
+ - unique identifier for the comment object.
2134
+ viewServiceURLMarker
2135
+ - optional view service URL marker (overrides accessServiceURLMarker)
2136
+ accessServiceURLMarker
2137
+ - optional access service URL marker used to identify which back end service to call
2138
+ requestBody
2139
+ - optional effective time
2140
+
2141
+ Returns
2142
+ -------
2143
+ comment properties
2144
+
2145
+ Raises
2146
+ ------
2147
+ InvalidParameterException
2148
+ one of the parameters is null or invalid or
2149
+ PropertyServerException
2150
+ There is a problem adding the element properties to the metadata repository or
2151
+ UserNotAuthorizedException
2152
+ the requesting user is not authorized to issue this request.
2153
+ """
2154
+ if server_name is None:
2155
+ server_name = self.server_name
2156
+
2157
+ possible_query_params = query_string(
2158
+ [
2159
+ ("viewServiceUrlMarker", view_service_url_marker),
2160
+ ("accessServiceUrlMarker", access_service_url_marker),
2161
+ ]
2162
+ )
2163
+ url = f"{base_path(self, server_name)}/comments/{comment_guid}/retrieve{possible_query_params}"
2164
+ response = await self._async_make_request("POST", url, body)
2165
+ return element_response(response.json(), "element", detailed_response)
2166
+
2167
+ def get_comment(
2168
+ self,
2169
+ comment_guid: str,
2170
+ server_name: str = None,
2171
+ body: dict = {},
2172
+ view_service_url_marker: str = None,
2173
+ access_service_url_marker: str = None,
2174
+ detailed_response: bool = False,
2175
+ ) -> dict | str:
2176
+ """
2177
+ Return the requested comment.
2178
+
2179
+ Parameters
2180
+ ----------
2181
+ commentGUID
2182
+ - unique identifier for the comment object.
2183
+ serverName
2184
+ - name of the server instances for this request
2185
+ viewServiceURLMarker
2186
+ - optional view service URL marker (overrides accessServiceURLMarker)
2187
+ accessServiceURLMarker
2188
+ - optional access service URL marker used to identify which back end service to call
2189
+ requestBody
2190
+ - optional effective time
2191
+
2192
+ Returns
2193
+ -------
2194
+ comment properties
2195
+
2196
+ Raises
2197
+ ------
2198
+ InvalidParameterException
2199
+ one of the parameters is null or invalid or
2200
+ PropertyServerException
2201
+ There is a problem adding the element properties to the metadata repository or
2202
+ UserNotAuthorizedException
2203
+ the requesting user is not authorized to issue this request.
2204
+ """
2205
+ loop = asyncio.get_event_loop()
2206
+ response = loop.run_until_complete(
2207
+ self._async_get_comment(
2208
+ comment_guid,
2209
+ server_name,
2210
+ body,
2211
+ view_service_url_marker,
2212
+ access_service_url_marker,
2213
+ detailed_response,
2214
+ )
2215
+ )
2216
+ return response
2217
+
2218
+ #
2219
+ ## get_attached_likes implementation
2220
+ #
2221
+ async def _async_get_attached_likes(
2222
+ self,
2223
+ element_guid: str,
2224
+ server_name: str = None,
2225
+ body: dict = {},
2226
+ start_from: int = 0,
2227
+ page_size: int = max_paging_size,
2228
+ view_service_url_marker: str = None,
2229
+ access_service_url_marker: str = None,
2230
+ detailed_response: bool = False,
2231
+ ) -> dict | str:
2232
+ """
2233
+ Return the likes attached to an element
2234
+
2235
+ Parameters
2236
+ ----------
2237
+ elementGUID
2238
+ - unique identifier for the element that the likes are connected to
2239
+ serverName
2240
+ - name of the server instances for this request
2241
+ body
2242
+ - optional effective time
2243
+ startFrom
2244
+ - index of the list to start from (0 for start)
2245
+ pageSize
2246
+ - maximum number of elements to return.
2247
+ viewServiceURLMarker
2248
+ - optional view service URL marker (overrides accessServiceURLMarker)
2249
+ accessServiceURLMarker
2250
+ - optional access service URL marker used to identify which back end service to call
2251
+
2252
+
2253
+ Returns
2254
+ -------
2255
+ List of Likes (LikeElementsResponse)
2256
+
2257
+ Raises
2258
+ ------
2259
+ InvalidParameterException
2260
+ one of the parameters is null or invalid or
2261
+ PropertyServerException
2262
+ There is a problem adding the element properties to the metadata repository or
2263
+ UserNotAuthorizedException
2264
+ the requesting user is not authorized to issue this request.
2265
+ """
2266
+ if server_name is None:
2267
+ server_name = self.server_name
2268
+
2269
+ possible_query_params = query_string(
2270
+ [
2271
+ ("startFrom", start_from),
2272
+ ("pageSize", page_size),
2273
+ ("viewServiceUrlMarker", view_service_url_marker),
2274
+ ("accessServiceUrlMarker", access_service_url_marker),
2275
+ ]
2276
+ )
2277
+ url = f"{base_path(self, server_name)}/elements/{element_guid}/likes/retrieve{possible_query_params}"
2278
+ response = await self._async_make_request("POST", url, body)
2279
+ return elements_response(response.json(), "elementList", detailed_response)
2280
+
2281
+ def get_attached_likes(
2282
+ self,
2283
+ element_guid: str,
2284
+ server_name: str = None,
2285
+ body: dict = {},
2286
+ start_from: int = 0,
2287
+ page_size: int = max_paging_size,
2288
+ view_service_url_marker: str = None,
2289
+ access_service_url_marker: str = None,
2290
+ detailed_response: bool = False,
2291
+ ) -> dict | str:
2292
+ """
2293
+ Return the likes attached to an element
2294
+
2295
+
2296
+ Parameters
2297
+ ----------
2298
+ elementGUID
2299
+ - unique identifier for the element that the likes are connected to
2300
+ serverName
2301
+ - name of the server instances for this request
2302
+ body
2303
+ - optional effective time
2304
+ startFrom
2305
+ - index of the list to start from (0 for start)
2306
+ pageSize
2307
+ - maximum number of elements to return.
2308
+ viewServiceURLMarker
2309
+ - optional view service URL marker (overrides accessServiceURLMarker)
2310
+ accessServiceURLMarker
2311
+ - optional access service URL marker used to identify which back end service to call
2312
+
2313
+
2314
+ Returns
2315
+ -------
2316
+ List of Likes (LikeElementsResponse)
2317
+
2318
+ Raises
2319
+ ------
2320
+ InvalidParameterException
2321
+ one of the parameters is null or invalid or
2322
+ PropertyServerException
2323
+ There is a problem adding the element properties to the metadata repository or
2324
+ UserNotAuthorizedException
2325
+ the requesting user is not authorized to issue this request.
2326
+ """
2327
+ loop = asyncio.get_event_loop()
2328
+ response = loop.run_until_complete(
2329
+ self._async_get_attached_likes(
2330
+ element_guid,
2331
+ server_name,
2332
+ body,
2333
+ start_from,
2334
+ page_size,
2335
+ view_service_url_marker,
2336
+ access_service_url_marker,
2337
+ detailed_response,
2338
+ )
2339
+ )
2340
+ return response
2341
+
2342
+ #
2343
+ ## get_attached_ratings implementation
2344
+ #
2345
+ async def _async_get_attached_ratings(
2346
+ self,
2347
+ element_guid: str,
2348
+ server_name: str = None,
2349
+ body: dict = {},
2350
+ start_from: int = 0,
2351
+ page_size: int = max_paging_size,
2352
+ view_service_url_marker: str = None,
2353
+ access_service_url_marker: str = None,
2354
+ detailed_response: bool = False,
2355
+ ) -> dict | str:
2356
+ """
2357
+ Return the ratings attached to an element.
2358
+
2359
+ Parameters
2360
+ ----------
2361
+ elementGUID
2362
+ - unique identifier for the element that the ratings are connected to
2363
+ serverName
2364
+ - name of the server instances for this request
2365
+ body
2366
+ - optional effective time
2367
+ startFrom
2368
+ - index of the list to start from (0 for start)
2369
+ pageSize
2370
+ - maximum number of elements to return.
2371
+ viewServiceURLMarker
2372
+ - optional view service URL marker (overrides accessServiceURLMarker)
2373
+ accessServiceURLMarker
2374
+ - optional access service URL marker used to identify which back end service to call
2375
+
2376
+ Returns
2377
+ -------
2378
+ List of ratings (RatingElementsResponse)
2379
+
2380
+ Raises
2381
+ ------
2382
+ InvalidParameterException
2383
+ one of the parameters is null or invalid or
2384
+ PropertyServerException
2385
+ There is a problem adding the element properties to the metadata repository or
2386
+ UserNotAuthorizedException
2387
+ the requesting user is not authorized to issue this request.
2388
+ """
2389
+ if server_name is None:
2390
+ server_name = self.server_name
2391
+
2392
+ possible_query_params = query_string(
2393
+ [
2394
+ ("startFrom", start_from),
2395
+ ("pageSize", page_size),
2396
+ ("viewServiceUrlMarker", view_service_url_marker),
2397
+ ("accessServiceUrlMarker", access_service_url_marker),
2398
+ ]
2399
+ )
2400
+ url = f"{base_path(self, server_name)}/elements/{element_guid}/ratings/retrieve{possible_query_params}"
2401
+ response = await self._async_make_request("POST", url, body)
2402
+ return elements_response(response.json(), "elementList", detailed_response)
2403
+
2404
+ def get_attached_ratings(
2405
+ self,
2406
+ element_guid: str,
2407
+ server_name: str = None,
2408
+ body: dict = {},
2409
+ start_from: int = 0,
2410
+ page_size: int = max_paging_size,
2411
+ view_service_url_marker: str = None,
2412
+ access_service_url_marker: str = None,
2413
+ detailed_response: bool = False,
2414
+ ) -> dict | str:
2415
+ """
2416
+ Return the ratings attached to an element.
2417
+
2418
+ Parameters
2419
+ ----------
2420
+ elementGUID
2421
+ - unique identifier for the element that the ratings are connected to
2422
+ serverName
2423
+ - name of the server instances for this request
2424
+ body
2425
+ - optional effective time
2426
+ startFrom
2427
+ - index of the list to start from (0 for start)
2428
+ pageSize
2429
+ - maximum number of elements to return.
2430
+ viewServiceURLMarker
2431
+ - optional view service URL marker (overrides accessServiceURLMarker)
2432
+ accessServiceURLMarker
2433
+ - optional access service URL marker used to identify which back end service to call
2434
+
2435
+ Returns
2436
+ -------
2437
+ List of ratings (RatingElementsResponse)
2438
+
2439
+ Raises
2440
+ ------
2441
+ InvalidParameterException
2442
+ one of the parameters is null or invalid or
2443
+ PropertyServerException
2444
+ There is a problem adding the element properties to the metadata repository or
2445
+ UserNotAuthorizedException
2446
+ the requesting user is not authorized to issue this request.
2447
+ """
2448
+ loop = asyncio.get_event_loop()
2449
+ response = loop.run_until_complete(
2450
+ self._async_get_attached_ratings(
2451
+ element_guid,
2452
+ server_name,
2453
+ body,
2454
+ start_from,
2455
+ page_size,
2456
+ view_service_url_marker,
2457
+ access_service_url_marker,
2458
+ detailed_response,
2459
+ )
2460
+ )
2461
+ return response
2462
+
2463
+ #
2464
+ ## get_attached_tags implementation
2465
+ #
2466
+ async def _async_get_attached_tags(
2467
+ self,
2468
+ element_guid: str,
2469
+ server_name: str = None,
2470
+ body: dict = {},
2471
+ start_from: int = 0,
2472
+ page_size: int = max_paging_size,
2473
+ view_service_url_marker: str = None,
2474
+ access_service_url_marker: str = None,
2475
+ detailed_response: bool = False,
2476
+ ) -> dict | str:
2477
+ """
2478
+ Return the informal tags attached to an element.
2479
+
2480
+ Parameters
2481
+ ----------
2482
+ elementGUID
2483
+ - unique identifier for the element that the ratings are connected to
2484
+ serverName
2485
+ - name of the server instances for this request
2486
+ body
2487
+ - optional effective time
2488
+ startFrom
2489
+ - index of the list to start from (0 for start)
2490
+ pageSize
2491
+ - maximum number of elements to return.
2492
+ viewServiceURLMarker
2493
+ - optional view service URL marker (overrides accessServiceURLMarker)
2494
+ accessServiceURLMarker
2495
+ - optional access service URL marker used to identify which back end service to call
2496
+
2497
+ Returns
2498
+ -------
2499
+ List of InformalTags (InformalTagsResponse)
2500
+
2501
+ Raises
2502
+ ------
2503
+ InvalidParameterException
2504
+ one of the parameters is null or invalid or
2505
+ PropertyServerException
2506
+ There is a problem adding the element properties to the metadata repository or
2507
+ UserNotAuthorizedException
2508
+ the requesting user is not authorized to issue this request.
2509
+ """
2510
+ if server_name is None:
2511
+ server_name = self.server_name
2512
+
2513
+ possible_query_params = query_string(
2514
+ [
2515
+ ("startFrom", start_from),
2516
+ ("pageSize", page_size),
2517
+ ("viewServiceUrlMarker", view_service_url_marker),
2518
+ ("accessServiceUrlMarker", access_service_url_marker),
2519
+ ]
2520
+ )
2521
+ url = f"{base_path(self, server_name)}/elements/{element_guid}/tags/retrieve{possible_query_params}"
2522
+ response = await self._async_make_request("POST", url, body)
2523
+ return elements_response(response.json(), "tags", detailed_response)
2524
+
2525
+ def get_attached_tags(
2526
+ self,
2527
+ element_guid: str,
2528
+ server_name: str = None,
2529
+ body: dict = {},
2530
+ start_from: int = 0,
2531
+ page_size: int = max_paging_size,
2532
+ view_service_url_marker: str = None,
2533
+ access_service_url_marker: str = None,
2534
+ detailed_response: bool = False,
2535
+ ) -> dict | str:
2536
+ """
2537
+ Return the informal tags attached to an element.
2538
+
2539
+ Parameters
2540
+ ----------
2541
+ elementGUID
2542
+ - unique identifier for the element that the ratings are connected to
2543
+ serverName
2544
+ - name of the server instances for this request
2545
+ body
2546
+ - optional effective time
2547
+ startFrom
2548
+ - index of the list to start from (0 for start)
2549
+ pageSize
2550
+ - maximum number of elements to return.
2551
+ viewServiceURLMarker
2552
+ - optional view service URL marker (overrides accessServiceURLMarker)
2553
+ accessServiceURLMarker
2554
+ - optional access service URL marker used to identify which back end service to call
2555
+
2556
+ Returns
2557
+ -------
2558
+ List of InformalTags (InformalTagsResponse)
2559
+
2560
+ Raises
2561
+ ------
2562
+ InvalidParameterException
2563
+ one of the parameters is null or invalid or
2564
+ PropertyServerException
2565
+ There is a problem adding the element properties to the metadata repository or
2566
+ UserNotAuthorizedException
2567
+ the requesting user is not authorized to issue this request.
2568
+ """
2569
+ loop = asyncio.get_event_loop()
2570
+ response = loop.run_until_complete(
2571
+ self._async_get_attached_tags(
2572
+ element_guid,
2573
+ server_name,
2574
+ body,
2575
+ start_from,
2576
+ page_size,
2577
+ view_service_url_marker,
2578
+ access_service_url_marker,
2579
+ detailed_response,
2580
+ )
2581
+ )
2582
+ return response
2583
+
2584
+ #
2585
+ ## get_elements_by_tag implementation
2586
+ #
2587
+
2588
+ async def _async_get_elements_by_tag(
2589
+ self,
2590
+ tag_guid: str,
2591
+ server_name: str = None,
2592
+ body: dict = {},
2593
+ start_from: int = 0,
2594
+ page_size: int = max_paging_size,
2595
+ view_service_url_marker: str = None,
2596
+ access_service_url_marker: str = None,
2597
+ detailed_response: bool = False,
2598
+ ) -> dict | str:
2599
+ """
2600
+ Return the list of unique identifiers for elements that are linked to a specific tag either directly, or via one of its schema elements.
2601
+
2602
+ Parameters
2603
+ ----------
2604
+ tagGUID
2605
+ - unique identifier of tag.
2606
+ serverName
2607
+ - name of the server instances for this request
2608
+ requestBody
2609
+ - optional effective time
2610
+ startFrom
2611
+ - index of the list to start from (0 for start)
2612
+ pageSize
2613
+ - maximum number of elements to return.
2614
+ viewServiceURLMarker
2615
+ - optional view service URL marker (overrides accessServiceURLMarker)
2616
+ accessServiceURLMarker
2617
+ - optional access service URL marker used to identify which back end service to call
2618
+
2619
+ Returns
2620
+ -------
2621
+ element stubs list
2622
+
2623
+ Raises
2624
+ ------
2625
+ InvalidParameterException
2626
+ one of the parameters is null or invalid or
2627
+ PropertyServerException
2628
+ There is a problem adding the element properties to the metadata repository or
2629
+ UserNotAuthorizedException
2630
+ the requesting user is not authorized to issue this request.
2631
+ """
2632
+ if server_name is None:
2633
+ server_name = self.server_name
2634
+
2635
+ possible_query_params = query_string(
2636
+ [
2637
+ ("startFrom", start_from),
2638
+ ("pageSize", page_size),
2639
+ ("viewServiceUrlMarker", view_service_url_marker),
2640
+ ("accessServiceUrlMarker", access_service_url_marker),
2641
+ ]
2642
+ )
2643
+ url = f"{base_path(self, server_name)}/elements/by-tag/{tag_guid}/retrieve{possible_query_params}"
2644
+ response = await self._async_make_request("POST", url, body)
2645
+ return related_elements_response(response.json(), detailed_response)
2646
+
2647
+ def get_elements_by_tag(
2648
+ self,
2649
+ tag_guid: str,
2650
+ server_name: str = None,
2651
+ body: dict = {},
2652
+ start_from: int = 0,
2653
+ page_size: int = max_paging_size,
2654
+ view_service_url_marker: str = None,
2655
+ access_service_url_marker: str = None,
2656
+ detailed_response: bool = False,
2657
+ ) -> dict | str:
2658
+ """
2659
+ Return the list of unique identifiers for elements that are linked to a specific tag either directly, or via one of its schema elements.
2660
+
2661
+ Parameters
2662
+ ----------
2663
+ tagGUID
2664
+ - unique identifier of tag.
2665
+ serverName
2666
+ - name of the server instances for this request
2667
+ requestBody
2668
+ - optional effective time
2669
+ startFrom
2670
+ - index of the list to start from (0 for start)
2671
+ pageSize
2672
+ - maximum number of elements to return.
2673
+ viewServiceURLMarker
2674
+ - optional view service URL marker (overrides accessServiceURLMarker)
2675
+ accessServiceURLMarker
2676
+ - optional access service URL marker used to identify which back end service to call
2677
+
2678
+ Returns
2679
+ -------
2680
+ element stubs list
2681
+
2682
+ Raises
2683
+ ------
2684
+ InvalidParameterException
2685
+ one of the parameters is null or invalid or
2686
+ PropertyServerException
2687
+ There is a problem adding the element properties to the metadata repository or
2688
+ UserNotAuthorizedException
2689
+ the requesting user is not authorized to issue this request.
2690
+ """
2691
+ loop = asyncio.get_event_loop()
2692
+ response = loop.run_until_complete(
2693
+ self._async_get_elements_by_tag(
2694
+ tag_guid,
2695
+ server_name,
2696
+ body,
2697
+ start_from,
2698
+ page_size,
2699
+ view_service_url_marker,
2700
+ access_service_url_marker,
2701
+ detailed_response,
2702
+ )
2703
+ )
2704
+ return response
2705
+
2706
+ #
2707
+ ## get_note_by_guid implementation
2708
+ #
2709
+
2710
+ async def _async_get_note_by_guid(
2711
+ self,
2712
+ note_guid: str,
2713
+ server_name: str = None,
2714
+ body: str = {},
2715
+ view_service_url_marker: str = None,
2716
+ access_service_url_marker: str = None,
2717
+ detailed_response: bool = False,
2718
+ ) -> dict | str:
2719
+ """
2720
+ Retrieve the note metadata element with the supplied unique identifier.
2721
+
2722
+ Parameters
2723
+ ----------
2724
+ noteGUID
2725
+ - unique identifier of the requested metadata element
2726
+ serverName
2727
+ - name of the server instances for this request
2728
+ viewServiceURLMarker
2729
+ - optional view service URL marker (overrides accessServiceURLMarker)
2730
+ accessServiceURLMarker
2731
+ - optional access service URL marker used to identify which back end service to call
2732
+
2733
+ Returns
2734
+ -------
2735
+ matching metadata element
2736
+
2737
+ Raises
2738
+ ------
2739
+ InvalidParameterException
2740
+ one of the parameters is null or invalid or
2741
+ PropertyServerException
2742
+ There is a problem adding the element properties to the metadata repository or
2743
+ UserNotAuthorizedException
2744
+ the requesting user is not authorized to issue this request.
2745
+ """
2746
+ if server_name is None:
2747
+ server_name = self.server_name
2748
+
2749
+ possible_query_params = query_string(
2750
+ [
2751
+ ("viewServiceUrlMarker", view_service_url_marker),
2752
+ ("accessServiceUrlMarker", access_service_url_marker),
2753
+ ]
2754
+ )
2755
+ url = f"{base_path(self, server_name)}/note-logs/notes/{note_guid}/retrieve{possible_query_params}"
2756
+ response = await self._async_make_request("POST", url, body)
2757
+ return element_response(response.json(), "element", detailed_response)
2758
+
2759
+ def get_note_by_guid(
2760
+ self,
2761
+ note_guid: str,
2762
+ server_name: str = None,
2763
+ body: str = {},
2764
+ view_service_url_marker: str = None,
2765
+ access_service_url_marker: str = None,
2766
+ detailed_response: bool = False,
2767
+ ) -> dict | str:
2768
+ """
2769
+ Retrieve the note metadata element with the supplied unique identifier.
2770
+
2771
+ Parameters
2772
+ ----------
2773
+ noteGUID
2774
+ - unique identifier of the requested metadata element
2775
+ serverName
2776
+ - name of the server instances for this request
2777
+ viewServiceURLMarker
2778
+ - optional view service URL marker (overrides accessServiceURLMarker)
2779
+ accessServiceURLMarker
2780
+ - optional access service URL marker used to identify which back end service to call
2781
+
2782
+ Returns
2783
+ -------
2784
+ matching metadata element
2785
+
2786
+ Raises
2787
+ ------
2788
+ InvalidParameterException
2789
+ one of the parameters is null or invalid or
2790
+ PropertyServerException
2791
+ There is a problem adding the element properties to the metadata repository or
2792
+ UserNotAuthorizedException
2793
+ the requesting user is not authorized to issue this request.
2794
+ """
2795
+ loop = asyncio.get_event_loop()
2796
+ response = loop.run_until_complete(
2797
+ self._async_get_note_by_guid(
2798
+ note_guid,
2799
+ server_name,
2800
+ body,
2801
+ view_service_url_marker,
2802
+ access_service_url_marker,
2803
+ detailed_response,
2804
+ )
2805
+ )
2806
+ return response
2807
+
2808
+ #
2809
+ ## get_note_log_by_guid implementation
2810
+ #
2811
+
2812
+ async def _async_get_note_log_by_guid(
2813
+ self,
2814
+ note_log_guid: str,
2815
+ server_name: str = None,
2816
+ body: str = {},
2817
+ view_service_url_marker: str = None,
2818
+ access_service_url_marker: str = None,
2819
+ detailed_response: bool = False,
2820
+ ) -> dict | str:
2821
+ """
2822
+ Retrieve the note log metadata element with the supplied unique identifier.
2823
+
2824
+ Parameters
2825
+ ----------
2826
+ serverName
2827
+ - name of the server instances for this request
2828
+ noteLogGUID
2829
+ - unique identifier of the requested metadata element
2830
+ viewServiceURLMarker
2831
+ - optional view service URL marker (overrides accessServiceURLMarker)
2832
+ accessServiceURLMarker
2833
+ - optional access service URL marker used to identify which back end service to call
2834
+ requestBody
2835
+ - optional effective time
2836
+
2837
+ Returns
2838
+ -------
2839
+ Note details
2840
+
2841
+ Raises
2842
+ ------
2843
+ InvalidParameterException
2844
+ one of the parameters is null or invalid or
2845
+ PropertyServerException
2846
+ There is a problem adding the element properties to the metadata repository or
2847
+ UserNotAuthorizedException
2848
+ the requesting user is not authorized to issue this request.
2849
+ """
2850
+ if server_name is None:
2851
+ server_name = self.server_name
2852
+
2853
+ possible_query_params = query_string(
2854
+ [
2855
+ ("viewServiceUrlMarker", view_service_url_marker),
2856
+ ("accessServiceUrlMarker", access_service_url_marker),
2857
+ ]
2858
+ )
2859
+ url = f"{base_path(self, server_name)}/note-logs/{note_log_guid}/retrieve{possible_query_params}"
2860
+ response = await self._async_make_request("POST", url, body)
2861
+ return element_response(response.json(), "element", detailed_response)
2862
+
2863
+ def get_note_log_by_guid(
2864
+ self,
2865
+ note_log_guid: str,
2866
+ server_name: str = None,
2867
+ body: str = {},
2868
+ view_service_url_marker: str = None,
2869
+ access_service_url_marker: str = None,
2870
+ detailed_response: bool = False,
2871
+ ) -> dict | str:
2872
+ """
2873
+ Retrieve the note log metadata element with the supplied unique identifier.
2874
+
2875
+ Parameters
2876
+ ----------
2877
+ serverName
2878
+ - name of the server instances for this request
2879
+ noteLogGUID
2880
+ - unique identifier of the requested metadata element
2881
+ viewServiceURLMarker
2882
+ - optional view service URL marker (overrides accessServiceURLMarker)
2883
+ accessServiceURLMarker
2884
+ - optional access service URL marker used to identify which back end service to call
2885
+ requestBody
2886
+ - optional effective time
2887
+
2888
+ Returns
2889
+ -------
2890
+ Note details
2891
+
2892
+ Raises
2893
+ ------
2894
+ InvalidParameterException
2895
+ one of the parameters is null or invalid or
2896
+ PropertyServerException
2897
+ There is a problem adding the element properties to the metadata repository or
2898
+ UserNotAuthorizedException
2899
+ the requesting user is not authorized to issue this request.
2900
+ """
2901
+ loop = asyncio.get_event_loop()
2902
+ response = loop.run_until_complete(
2903
+ self._async_get_note_log_by_guid(
2904
+ note_log_guid,
2905
+ server_name,
2906
+ body,
2907
+ view_service_url_marker,
2908
+ access_service_url_marker,
2909
+ detailed_response,
2910
+ )
2911
+ )
2912
+ return response
2913
+
2914
+ #
2915
+ ## get_note_logs_by_name implementation
2916
+ #
2917
+
2918
+ async def _async_get_note_logs_by_name(
2919
+ self,
2920
+ body: dict,
2921
+ server_name: str = None,
2922
+ start_from: int = 0,
2923
+ page_size: int = max_paging_size,
2924
+ view_service_url_marker: str = None,
2925
+ access_service_url_marker: str = None,
2926
+ detailed_response: bool = False,
2927
+ ) -> dict | str:
2928
+ """
2929
+ Retrieve the list of note log metadata elements with a matching qualified or display name.
2930
+
2931
+ There are no wildcards supported on this request.
2932
+
2933
+ Parameters
2934
+ ----------
2935
+ serverName
2936
+ - name of the server instances for this request
2937
+ startFrom
2938
+ - paging start point
2939
+ pageSize
2940
+ - maximum results that can be returned
2941
+ viewServiceURLMarker
2942
+ - optional view service URL marker (overrides accessServiceURLMarker)
2943
+ accessServiceURLMarker
2944
+ - optional access service URL marker used to identify which back end service to call
2945
+ requestBody
2946
+ - name to search for and correlators
2947
+
2948
+ Returns
2949
+ -------
2950
+ list of matching note logs
2951
+
2952
+ Raises
2953
+ ------
2954
+ InvalidParameterException
2955
+ one of the parameters is null or invalid or
2956
+ PropertyServerException
2957
+ There is a problem adding the element properties to the metadata repository or
2958
+ UserNotAuthorizedException
2959
+ the requesting user is not authorized to issue this request.
2960
+ """
2961
+ if server_name is None:
2962
+ server_name = self.server_name
2963
+
2964
+ possible_query_params = query_string(
2965
+ [
2966
+ ("startFrom", start_from),
2967
+ ("pageSize", page_size),
2968
+ ("viewServiceUrlMarker", view_service_url_marker),
2969
+ ("accessServiceUrlMarker", access_service_url_marker),
2970
+ ]
2971
+ )
2972
+ url = f"{base_path(self, server_name)}/note-logs/by-name{possible_query_params}"
2973
+ response = await self._async_make_request("POST", url, body)
2974
+ return elements_response(response.json(), "elementList", detailed_response)
2975
+
2976
+ def get_note_logs_by_name(
2977
+ self,
2978
+ body: dict,
2979
+ server_name: str = None,
2980
+ start_from: int = 0,
2981
+ page_size: int = max_paging_size,
2982
+ view_service_url_marker: str = None,
2983
+ access_service_url_marker: str = None,
2984
+ detailed_response: bool = False,
2985
+ ) -> dict | str:
2986
+ """
2987
+ Retrieve the list of note log metadata elements with a matching qualified or display name.
2988
+
2989
+ There are no wildcards supported on this request.
2990
+
2991
+ Parameters
2992
+ ----------
2993
+ body
2994
+ - name to search for and correlators
2995
+ serverName
2996
+ - name of the server instances for this request
2997
+ startFrom
2998
+ - paging start point
2999
+ pageSize
3000
+ - maximum results that can be returned
3001
+ viewServiceURLMarker
3002
+ - optional view service URL marker (overrides accessServiceURLMarker)
3003
+ accessServiceURLMarker
3004
+ - optional access service URL marker used to identify which back end service to call
3005
+
3006
+ Returns
3007
+ -------
3008
+ list of matching note logs
3009
+
3010
+ Raises
3011
+ ------
3012
+ InvalidParameterException
3013
+ one of the parameters is null or invalid or
3014
+ PropertyServerException
3015
+ There is a problem adding the element properties to the metadata repository or
3016
+ UserNotAuthorizedException
3017
+ the requesting user is not authorized to issue this request.
3018
+ """
3019
+ loop = asyncio.get_event_loop()
3020
+ response = loop.run_until_complete(
3021
+ self._async_get_note_logs_by_name(
3022
+ body,
3023
+ server_name,
3024
+ start_from,
3025
+ page_size,
3026
+ view_service_url_marker,
3027
+ access_service_url_marker,
3028
+ detailed_response,
3029
+ )
3030
+ )
3031
+ return response
3032
+
3033
+ #
3034
+ ## get_note_logs_for_element implementation
3035
+ #
3036
+
3037
+ async def _async_get_note_logs_for_element(
3038
+ self,
3039
+ element_guid: str,
3040
+ body: dict = {},
3041
+ server_name: str = None,
3042
+ start_from: int = 0,
3043
+ page_size: int = max_paging_size,
3044
+ view_service_url_marker: str = None,
3045
+ access_service_url_marker: str = None,
3046
+ detailed_response: bool = False,
3047
+ ) -> dict | str:
3048
+ """
3049
+ Retrieve the list of note log metadata elements attached to the element.
3050
+
3051
+ Parameters
3052
+ ----------
3053
+ elementGUID
3054
+ - element to start from
3055
+ body
3056
+ - optional effective time
3057
+ serverName
3058
+ - name of the server instances for this request
3059
+ startFrom
3060
+ - paging start point
3061
+ pageSize
3062
+ - maximum results that can be returned
3063
+ viewServiceURLMarker
3064
+ - optional view service URL marker (overrides accessServiceURLMarker)
3065
+ accessServiceURLMarker
3066
+ - optional access service URL marker used to identify which back end service to call
3067
+
3068
+ Returns
3069
+ -------
3070
+ list of note logs
3071
+
3072
+ Raises
3073
+ ------
3074
+ InvalidParameterException
3075
+ one of the parameters is null or invalid or
3076
+ PropertyServerException
3077
+ There is a problem adding the element properties to the metadata repository or
3078
+ UserNotAuthorizedException
3079
+ the requesting user is not authorized to issue this request.
3080
+ """
3081
+ if server_name is None:
3082
+ server_name = self.server_name
3083
+
3084
+ possible_query_params = query_string(
3085
+ [
3086
+ ("startFrom", start_from),
3087
+ ("pageSize", page_size),
3088
+ ("viewServiceUrlMarker", view_service_url_marker),
3089
+ ("accessServiceUrlMarker", access_service_url_marker),
3090
+ ]
3091
+ )
3092
+ url = f"{base_path(self, server_name)}/elements/{element_guid}/note-logs/retrieve{possible_query_params}"
3093
+ response = await self._async_make_request("POST", url, body)
3094
+ return elements_response(response.json(), "elementList", detailed_response)
3095
+
3096
+ def get_note_logs_for_element(
3097
+ self,
3098
+ element_guid: str,
3099
+ body: dict = {},
3100
+ server_name: str = None,
3101
+ start_from: int = 0,
3102
+ page_size: int = max_paging_size,
3103
+ view_service_url_marker: str = None,
3104
+ access_service_url_marker: str = None,
3105
+ detailed_response: bool = False,
3106
+ ) -> dict | str:
3107
+ """
3108
+ Retrieve the list of note log metadata elements attached to the element.
3109
+
3110
+ Parameters
3111
+ ----------
3112
+ elementGUID
3113
+ - element to start from
3114
+ body
3115
+ - optional effective time
3116
+ serverName
3117
+ - name of the server instances for this request
3118
+ startFrom
3119
+ - paging start point
3120
+ pageSize
3121
+ - maximum results that can be returned
3122
+ viewServiceURLMarker
3123
+ - optional view service URL marker (overrides accessServiceURLMarker)
3124
+ accessServiceURLMarker
3125
+ - optional access service URL marker used to identify which back end service to call
3126
+
3127
+ Returns
3128
+ -------
3129
+ list of note logs
3130
+
3131
+ Raises
3132
+ ------
3133
+ InvalidParameterException
3134
+ one of the parameters is null or invalid or
3135
+ PropertyServerException
3136
+ There is a problem adding the element properties to the metadata repository or
3137
+ UserNotAuthorizedException
3138
+ the requesting user is not authorized to issue this request.
3139
+ """
3140
+ loop = asyncio.get_event_loop()
3141
+ response = loop.run_until_complete(
3142
+ self._async_get_note_logs_for_element(
3143
+ element_guid,
3144
+ body,
3145
+ server_name,
3146
+ start_from,
3147
+ page_size,
3148
+ view_service_url_marker,
3149
+ access_service_url_marker,
3150
+ detailed_response,
3151
+ )
3152
+ )
3153
+ return response
3154
+
3155
+ #
3156
+ ## get_notes_for_note_log implementation
3157
+ #
3158
+
3159
+ async def _async_get_notes_for_note_log(
3160
+ self,
3161
+ note_log_guid: str,
3162
+ body: dict = {},
3163
+ server_name: str = None,
3164
+ start_from: int = 0,
3165
+ page_size: int = max_paging_size,
3166
+ view_service_url_marker: str = None,
3167
+ access_service_url_marker: str = None,
3168
+ detailed_response: bool = False,
3169
+ ) -> dict | str:
3170
+ """
3171
+ Retrieve the list of notes associated with a note log.
3172
+
3173
+ Parameters
3174
+ ----------
3175
+ noteLogGUID
3176
+ - unique identifier of the note log of interest
3177
+ body
3178
+ - optional effective time
3179
+ serverName
3180
+ - name of the server instances for this request
3181
+ startFrom
3182
+ - paging start point
3183
+ pageSize
3184
+ - maximum results that can be returned
3185
+ viewServiceURLMarker
3186
+ - optional view service URL marker (overrides accessServiceURLMarker)
3187
+ accessServiceURLMarker
3188
+ - optional access service URL marker used to identify which back end service to call
3189
+
3190
+ Returns
3191
+ -------
3192
+ list of notes
3193
+
3194
+ Raises
3195
+ ------
3196
+ InvalidParameterException
3197
+ one of the parameters is null or invalid or
3198
+ PropertyServerException
3199
+ There is a problem adding the element properties to the metadata repository or
3200
+ UserNotAuthorizedException
3201
+ the requesting user is not authorized to issue this request.
3202
+ """
3203
+ if server_name is None:
3204
+ server_name = self.server_name
3205
+
3206
+ possible_query_params = query_string(
3207
+ [
3208
+ ("startFrom", start_from),
3209
+ ("pageSize", page_size),
3210
+ ("viewServiceUrlMarker", view_service_url_marker),
3211
+ ("accessServiceUrlMarker", access_service_url_marker),
3212
+ ]
3213
+ )
3214
+ url = f"{base_path(self, server_name)}/note-logs/{note_log_guid}/notes/retrieve{possible_query_params}"
3215
+ response = await self._async_make_request("POST", url, body)
3216
+ return elements_response(response.json(), "elementList", detailed_response)
3217
+
3218
+ def get_notes_for_note_log(
3219
+ self,
3220
+ note_log_guid: str,
3221
+ body: dict = {},
3222
+ server_name: str = None,
3223
+ start_from: int = 0,
3224
+ page_size: int = max_paging_size,
3225
+ view_service_url_marker: str = None,
3226
+ access_service_url_marker: str = None,
3227
+ detailed_response: bool = False,
3228
+ ) -> dict | str:
3229
+ """
3230
+ Retrieve the list of notes associated with a note log.
3231
+
3232
+ Parameters
3233
+ ----------
3234
+ noteLogGUID
3235
+ - unique identifier of the note log of interest
3236
+ body
3237
+ - optional effective time
3238
+ serverName
3239
+ - name of the server instances for this request
3240
+ startFrom
3241
+ - paging start point
3242
+ pageSize
3243
+ - maximum results that can be returned
3244
+ viewServiceURLMarker
3245
+ - optional view service URL marker (overrides accessServiceURLMarker)
3246
+ accessServiceURLMarker
3247
+ - optional access service URL marker used to identify which back end service to call
3248
+
3249
+ Returns
3250
+ -------
3251
+ list of notes
3252
+
3253
+ Raises
3254
+ ------
3255
+ InvalidParameterException
3256
+ one of the parameters is null or invalid or
3257
+ PropertyServerException
3258
+ There is a problem adding the element properties to the metadata repository or
3259
+ UserNotAuthorizedException
3260
+ the requesting user is not authorized to issue this request.
3261
+ """
3262
+ loop = asyncio.get_event_loop()
3263
+ response = loop.run_until_complete(
3264
+ self._async_get_notes_for_note_log(
3265
+ note_log_guid,
3266
+ body,
3267
+ server_name,
3268
+ start_from,
3269
+ page_size,
3270
+ view_service_url_marker,
3271
+ access_service_url_marker,
3272
+ detailed_response,
3273
+ )
3274
+ )
3275
+ return response
3276
+
3277
+ #
3278
+ ## get_tag implementation
3279
+ #
3280
+
3281
+ async def _async_get_tag(
3282
+ self,
3283
+ tag_guid: str,
3284
+ server_name: str = None,
3285
+ view_service_url_marker: str = None,
3286
+ access_service_url_marker: str = None,
3287
+ detailed_response: bool = False,
3288
+ ) -> dict | str:
3289
+ """
3290
+ Return the informal tag for the supplied unique identifier (tagGUID).
3291
+
3292
+ Parameters
3293
+ ----------
3294
+ serverName
3295
+ - name of the server instances for this request.
3296
+ tagGUID
3297
+ - unique identifier of the meaning.
3298
+ viewServiceURLMarker
3299
+ - optional view service URL marker (overrides accessServiceURLMarker)
3300
+ accessServiceURLMarker
3301
+ - optional access service URL marker used to identify which back end service to call
3302
+ requestBody
3303
+ - optional effective time
3304
+
3305
+ Returns
3306
+ -------
3307
+ list of tag objects
3308
+
3309
+ Raises
3310
+ ------
3311
+ InvalidParameterException
3312
+ one of the parameters is null or invalid or
3313
+ PropertyServerException
3314
+ There is a problem adding the element properties to the metadata repository or
3315
+ UserNotAuthorizedException
3316
+ the requesting user is not authorized to issue this request.
3317
+ """
3318
+
3319
+ if server_name is None:
3320
+ server_name = self.server_name
3321
+
3322
+ possible_query_params = query_string(
3323
+ [
3324
+ ("viewServiceUrlMarker", view_service_url_marker),
3325
+ ("accessServiceUrlMarker", access_service_url_marker),
3326
+ ]
3327
+ )
3328
+ url = f"{base_path(self, server_name)}/tags/{tag_guid}/retrieve{possible_query_params}"
3329
+
3330
+ response = await self._async_make_request("POST", url, {})
3331
+ return element_response(response.json(), "tag", detailed_response)
3332
+
3333
+ def get_tag(
3334
+ self,
3335
+ tag_guid: str,
3336
+ server_name: str = None,
3337
+ view_service_url_marker: str = None,
3338
+ access_service_url_marker: str = None,
3339
+ detailed_response: bool = False,
3340
+ ) -> dict | str:
3341
+ """
3342
+ Return the informal tag for the supplied unique identifier (tagGUID).
3343
+
3344
+ Parameters
3345
+ ----------
3346
+ serverName
3347
+ - name of the server instances for this request.
3348
+ tagGUID
3349
+ - unique identifier of the meaning.
3350
+ viewServiceURLMarker
3351
+ - optional view service URL marker (overrides accessServiceURLMarker)
3352
+ accessServiceURLMarker
3353
+ - optional access service URL marker used to identify which back end service to call
3354
+ requestBody
3355
+ - optional effective time
3356
+
3357
+ Returns
3358
+ -------
3359
+ tag object
3360
+
3361
+ Raises
3362
+ ------
3363
+ InvalidParameterException
3364
+ one of the parameters is null or invalid or
3365
+ PropertyServerException
3366
+ There is a problem adding the element properties to the metadata repository or
3367
+ UserNotAuthorizedException
3368
+ the requesting user is not authorized to issue this request.
3369
+ """
3370
+ loop = asyncio.get_event_loop()
3371
+ response = loop.run_until_complete(
3372
+ self._async_get_tag(
3373
+ tag_guid,
3374
+ server_name,
3375
+ view_service_url_marker,
3376
+ access_service_url_marker,
3377
+ detailed_response,
3378
+ )
3379
+ )
3380
+ return response
3381
+
3382
+ #
3383
+ ## get_tags_by_name implementation
3384
+ #
3385
+
3386
+ async def _async_get_tags_by_name(
3387
+ self,
3388
+ body: str,
3389
+ server_name: str = None,
3390
+ start_from: int = 0,
3391
+ page_size: int = max_paging_size,
3392
+ view_service_url_marker: str = None,
3393
+ access_service_url_marker: str = None,
3394
+ detailed_response: bool = False,
3395
+ ) -> dict | str:
3396
+ """
3397
+ Return the tags exactly matching the supplied name.
3398
+
3399
+ Parameters
3400
+ ----------
3401
+ serverName
3402
+ - name of the server instances for this request.
3403
+ requestBody
3404
+ - name of tag.
3405
+ startFrom
3406
+ - index of the list to start from (0 for start).
3407
+ pageSize
3408
+ - maximum number of elements to return.
3409
+ viewServiceURLMarker
3410
+ - optional view service URL marker (overrides accessServiceURLMarker)
3411
+ accessServiceURLMarker
3412
+ - optional access service URL marker used to identify which back end service to call
3413
+
3414
+ Returns
3415
+ -------
3416
+ list of tag objects
3417
+
3418
+ Raises
3419
+ ------
3420
+ InvalidParameterException
3421
+ one of the parameters is null or invalid or
3422
+ PropertyServerException
3423
+ There is a problem adding the element properties to the metadata repository or
3424
+ UserNotAuthorizedException
3425
+ the requesting user is not authorized to issue this request.
3426
+ """
3427
+ if server_name is None:
3428
+ server_name = self.server_name
3429
+
3430
+ possible_query_params = query_string(
3431
+ [
3432
+ ("startFrom", start_from),
3433
+ ("pageSize", page_size),
3434
+ ("viewServiceUrlMarker", view_service_url_marker),
3435
+ ("accessServiceUrlMarker", access_service_url_marker),
3436
+ ]
3437
+ )
3438
+ url = f"{base_path(self, server_name)}/tags/by-name{possible_query_params}"
3439
+
3440
+ response = await self._async_make_request("POST", url, body)
3441
+ return elements_response(response.json(), "tags", detailed_response)
3442
+
3443
+ def get_tags_by_name(
3444
+ self,
3445
+ body: str,
3446
+ server_name: str = None,
3447
+ start_from: int = 0,
3448
+ page_size: int = max_paging_size,
3449
+ view_service_url_marker: str = None,
3450
+ access_service_url_marker: str = None,
3451
+ detailed_response: bool = False,
3452
+ ) -> dict | str:
3453
+ """
3454
+ Return the tags exactly matching the supplied name.
3455
+
3456
+ Parameters
3457
+ ----------
3458
+ serverName
3459
+ - name of the server instances for this request.
3460
+ requestBody
3461
+ - name of tag.
3462
+ startFrom
3463
+ - index of the list to start from (0 for start).
3464
+ pageSize
3465
+ - maximum number of elements to return.
3466
+ viewServiceURLMarker
3467
+ - optional view service URL marker (overrides accessServiceURLMarker)
3468
+ accessServiceURLMarker
3469
+ - optional access service URL marker used to identify which back end service to call
3470
+
3471
+ Returns
3472
+ -------
3473
+ list of tag objects
3474
+
3475
+ Raises
3476
+ ------
3477
+ InvalidParameterException
3478
+ one of the parameters is null or invalid or
3479
+ PropertyServerException
3480
+ There is a problem adding the element properties to the metadata repository or
3481
+ UserNotAuthorizedException
3482
+ the requesting user is not authorized to issue this request.
3483
+ """
3484
+ loop = asyncio.get_event_loop()
3485
+ response = loop.run_until_complete(
3486
+ self._async_get_tags_by_name(
3487
+ body,
3488
+ server_name,
3489
+ start_from,
3490
+ page_size,
3491
+ view_service_url_marker,
3492
+ access_service_url_marker,
3493
+ detailed_response,
3494
+ )
3495
+ )
3496
+ return response
3497
+
3498
+ #
3499
+ ## remove_comment_from_element implementation
3500
+ #
3501
+
3502
+ async def _async_remove_comment_from_element(
3503
+ self,
3504
+ comment_guid: str,
3505
+ server_name: str = None,
3506
+ body: dict = {},
3507
+ view_service_url_marker: str = None,
3508
+ access_service_url_marker: str = None,
3509
+ ) -> dict | str:
3510
+ """
3511
+ Removes a comment added to the element by this user.
3512
+
3513
+ This deletes the link to the comment, the comment itself and any comment replies attached to it.
3514
+
3515
+ Parameters
3516
+ ----------
3517
+ commentGUID
3518
+ - String - unique id for the comment object
3519
+ serverName
3520
+ - name of the server instances for this request
3521
+ viewServiceURLMarker
3522
+ - optional view service URL marker (overrides accessServiceURLMarker)
3523
+ accessServiceURLMarker
3524
+ - optional access service URL marker used to identify which back end service to call
3525
+ requestBody
3526
+ - containing type of comment enum and the text of the comment.
3527
+
3528
+ Returns
3529
+ -------
3530
+ VoidResponse
3531
+
3532
+ Raises
3533
+ ------
3534
+ InvalidParameterException
3535
+ one of the parameters is null or invalid or
3536
+ PropertyServerException
3537
+ There is a problem adding the element properties to the metadata repository or
3538
+ UserNotAuthorizedException
3539
+ the requesting user is not authorized to issue this request.
3540
+ """
3541
+ if server_name is None:
3542
+ server_name = self.server_name
3543
+
3544
+ possible_query_params = query_string(
3545
+ [
3546
+ ("viewServiceUrlMarker", view_service_url_marker),
3547
+ ("accessServiceUrlMarker", access_service_url_marker),
3548
+ ]
3549
+ )
3550
+ url = f"{base_path(self, server_name)}/comments/{comment_guid}/remove{possible_query_params}"
3551
+ response = await self._async_make_request("POST", url, body)
3552
+ return response.json()
3553
+
3554
+ def remove_comment_from_element(
3555
+ self,
3556
+ comment_guid: str,
3557
+ server_name: str = None,
3558
+ body: dict = {},
3559
+ view_service_url_marker: str = None,
3560
+ access_service_url_marker: str = None,
3561
+ ) -> dict | str:
3562
+ """
3563
+ Removes a comment added to the element by this user.
3564
+
3565
+ This deletes the link to the comment, the comment itself and any comment replies attached to it.
3566
+
3567
+ Parameters
3568
+ ----------
3569
+ commentGUID
3570
+ - String - unique id for the comment object
3571
+ serverName
3572
+ - name of the server instances for this request
3573
+ viewServiceURLMarker
3574
+ - optional view service URL marker (overrides accessServiceURLMarker)
3575
+ accessServiceURLMarker
3576
+ - optional access service URL marker used to identify which back end service to call
3577
+ requestBody
3578
+ - containing type of comment enum and the text of the comment.
3579
+
3580
+ Returns
3581
+ -------
3582
+ VoidResponse
3583
+
3584
+ Raises
3585
+ ------
3586
+ InvalidParameterException
3587
+ one of the parameters is null or invalid or
3588
+ PropertyServerException
3589
+ There is a problem adding the element properties to the metadata repository or
3590
+ UserNotAuthorizedException
3591
+ the requesting user is not authorized to issue this request.
3592
+ """
3593
+ loop = asyncio.get_event_loop()
3594
+ response = loop.run_until_complete(
3595
+ self._async_remove_comment_from_element(
3596
+ comment_guid,
3597
+ server_name,
3598
+ body,
3599
+ view_service_url_marker,
3600
+ access_service_url_marker,
3601
+ )
3602
+ )
3603
+ return response
3604
+
3605
+ #
3606
+ ## remove_like_from_element implementation
3607
+ #
3608
+
3609
+ async def _async_remove_like_from_element(
3610
+ self,
3611
+ element_guid: str,
3612
+ server_name: str = None,
3613
+ body: dict = {},
3614
+ view_service_url_marker: str = None,
3615
+ access_service_url_marker: str = None,
3616
+ ) -> dict | str:
3617
+ """
3618
+ Removes a "Like" added to the element by this user.
3619
+
3620
+ Parameters
3621
+ ----------
3622
+ serverName
3623
+ - name of the server instances for this request.
3624
+ elementGUID
3625
+ - unique identifier for the element where the like is attached.
3626
+ viewServiceURLMarker
3627
+ - optional view service URL marker (overrides accessServiceURLMarker)
3628
+ accessServiceURLMarker
3629
+ - optional access service URL marker used to identify which back end service to call
3630
+ requestBody
3631
+ - containing type of comment enum and the text of the comment.
3632
+
3633
+ Returns
3634
+ -------
3635
+ VoidResponse
3636
+
3637
+ Raises
3638
+ ------
3639
+ InvalidParameterException
3640
+ one of the parameters is null or invalid or
3641
+ PropertyServerException
3642
+ There is a problem adding the element properties to the metadata repository or
3643
+ UserNotAuthorizedException
3644
+ the requesting user is not authorized to issue this request.
3645
+ """
3646
+ if server_name is None:
3647
+ server_name = self.server_name
3648
+
3649
+ possible_query_params = query_string(
3650
+ [
3651
+ ("viewServiceUrlMarker", view_service_url_marker),
3652
+ ("accessServiceUrlMarker", access_service_url_marker),
3653
+ ]
3654
+ )
3655
+ url = f"{base_path(self, server_name)}/elements/{element_guid}/likes/remove{possible_query_params}"
3656
+ response = await self._async_make_request("POST", url, body)
3657
+ return response.json()
3658
+
3659
+ def remove_like_from_element(
3660
+ self,
3661
+ element_guid: str,
3662
+ server_name: str = None,
3663
+ body: dict = {},
3664
+ view_service_url_marker: str = None,
3665
+ access_service_url_marker: str = None,
3666
+ ) -> dict | str:
3667
+ """
3668
+ Removes a "Like" added to the element by this user.
3669
+
3670
+ Parameters
3671
+ ----------
3672
+ serverName
3673
+ - name of the server instances for this request.
3674
+ elementGUID
3675
+ - unique identifier for the element where the like is attached.
3676
+ viewServiceURLMarker
3677
+ - optional view service URL marker (overrides accessServiceURLMarker)
3678
+ accessServiceURLMarker
3679
+ - optional access service URL marker used to identify which back end service to call
3680
+ requestBody
3681
+ - containing type of comment enum and the text of the comment.
3682
+
3683
+ Returns
3684
+ -------
3685
+ VoidResponse
3686
+
3687
+ Raises
3688
+ ------
3689
+ InvalidParameterException
3690
+ one of the parameters is null or invalid or
3691
+ PropertyServerException
3692
+ There is a problem adding the element properties to the metadata repository or
3693
+ UserNotAuthorizedException
3694
+ the requesting user is not authorized to issue this request.
3695
+ """
3696
+ loop = asyncio.get_event_loop()
3697
+ response = loop.run_until_complete(
3698
+ self._async_remove_like_from_element(
3699
+ element_guid,
3700
+ server_name,
3701
+ body,
3702
+ view_service_url_marker,
3703
+ access_service_url_marker,
3704
+ )
3705
+ )
3706
+ return response
3707
+
3708
+ #
3709
+ ## remove_note implementation
3710
+ #
3711
+
3712
+ async def _async_remove_note(
3713
+ self,
3714
+ note_guid: str,
3715
+ server_name: str = None,
3716
+ body: dict = {},
3717
+ view_service_url_marker: str = None,
3718
+ access_service_url_marker: str = None,
3719
+ ) -> dict | str:
3720
+ """
3721
+ Removes a note from the repository.
3722
+
3723
+ All the relationships to referenceables are lost.
3724
+
3725
+ Parameters
3726
+ ----------
3727
+ serverName
3728
+ - name of the server instances for this request
3729
+ noteGUID
3730
+ - unique id for the note .
3731
+ viewServiceURLMarker
3732
+ - optional view service URL marker (overrides accessServiceURLMarker)
3733
+ accessServiceURLMarker
3734
+ - optional access service URL marker used to identify which back end service to call
3735
+ requestBody
3736
+ - null request body.
3737
+
3738
+
3739
+ Returns
3740
+ -------
3741
+ VoidResponse
3742
+
3743
+ Raises
3744
+ ------
3745
+ InvalidParameterException
3746
+ one of the parameters is null or invalid or
3747
+ PropertyServerException
3748
+ There is a problem adding the element properties to the metadata repository or
3749
+ UserNotAuthorizedException
3750
+ the requesting user is not authorized to issue this request.
3751
+ """
3752
+ if server_name is None:
3753
+ server_name = self.server_name
3754
+
3755
+ possible_query_params = query_string(
3756
+ [
3757
+ ("viewServiceUrlMarker", view_service_url_marker),
3758
+ ("accessServiceUrlMarker", access_service_url_marker),
3759
+ ]
3760
+ )
3761
+ url = f"{base_path(self, server_name)}/notes/{note_guid}/remove{possible_query_params}"
3762
+ response = await self._async_make_request("POST", url, body)
3763
+ return response.json()
3764
+
3765
+ def remove_note(
3766
+ self,
3767
+ note_guid: str,
3768
+ server_name: str = None,
3769
+ body: dict = {},
3770
+ view_service_url_marker: str = None,
3771
+ access_service_url_marker: str = None,
3772
+ ) -> dict | str:
3773
+ """
3774
+ Removes a note from the repository.
3775
+
3776
+ All the relationships to referenceables are lost.
3777
+
3778
+ Parameters
3779
+ ----------
3780
+ noteGUID
3781
+ - unique id for the note .
3782
+ serverName
3783
+ - name of the server instances for this request
3784
+ requestBody
3785
+ - null request body.
3786
+ viewServiceURLMarker
3787
+ - optional view service URL marker (overrides accessServiceURLMarker)
3788
+ accessServiceURLMarker
3789
+ - optional access service URL marker used to identify which back end service to call
3790
+
3791
+
3792
+ Returns
3793
+ -------
3794
+ VoidResponse
3795
+
3796
+ Raises
3797
+ ------
3798
+ InvalidParameterException
3799
+ one of the parameters is null or invalid or
3800
+ PropertyServerException
3801
+ There is a problem adding the element properties to the metadata repository or
3802
+ UserNotAuthorizedException
3803
+ the requesting user is not authorized to issue this request.
3804
+ """
3805
+ loop = asyncio.get_event_loop()
3806
+ response = loop.run_until_complete(
3807
+ self._async_remove_note(
3808
+ note_guid,
3809
+ server_name,
3810
+ body,
3811
+ view_service_url_marker,
3812
+ access_service_url_marker,
3813
+ )
3814
+ )
3815
+ return response
3816
+
3817
+ #
3818
+ ## remove_note_log implementation
3819
+ #
3820
+
3821
+ async def _async_remove_note_log(
3822
+ self,
3823
+ note_log_guid: str,
3824
+ server_name: str = None,
3825
+ body: dict = {},
3826
+ view_service_url_marker: str = None,
3827
+ access_service_url_marker: str = None,
3828
+ ) -> dict | str:
3829
+ """
3830
+ Removes a note log from the repository.
3831
+
3832
+ All the relationships to referenceables are lost.
3833
+
3834
+ Parameters
3835
+ ----------
3836
+ noteLogGUID
3837
+ - unique id for the note log.
3838
+ serverName
3839
+ - name of the server instances for this request
3840
+ requestBody
3841
+ - null request body.
3842
+ viewServiceURLMarker
3843
+ - optional view service URL marker (overrides accessServiceURLMarker)
3844
+ accessServiceURLMarker
3845
+ - optional access service URL marker used to identify which back end service to call
3846
+
3847
+ Returns
3848
+ -------
3849
+ VoidResponse
3850
+
3851
+ Raises
3852
+ ------
3853
+ InvalidParameterException
3854
+ one of the parameters is null or invalid or
3855
+ PropertyServerException
3856
+ There is a problem adding the element properties to the metadata repository or
3857
+ UserNotAuthorizedException
3858
+ the requesting user is not authorized to issue this request.
3859
+ """
3860
+ if server_name is None:
3861
+ server_name = self.server_name
3862
+
3863
+ possible_query_params = query_string(
3864
+ [
3865
+ ("viewServiceUrlMarker", view_service_url_marker),
3866
+ ("accessServiceUrlMarker", access_service_url_marker),
3867
+ ]
3868
+ )
3869
+ url = f"{base_path(self, server_name)}/note-logs/{note_log_guid}/remove{possible_query_params}"
3870
+ response = await self._async_make_request("POST", url, body)
3871
+ return response.json()
3872
+
3873
+ def remove_note_log(
3874
+ self,
3875
+ note_log_guid: str,
3876
+ server_name: str = None,
3877
+ body: dict = {},
3878
+ view_service_url_marker: str = None,
3879
+ access_service_url_marker: str = None,
3880
+ ) -> dict | str:
3881
+ """
3882
+ Removes a note log from the repository.
3883
+
3884
+ All the relationships to referenceables are lost.
3885
+
3886
+ Parameters
3887
+ ----------
3888
+ noteLogGUID
3889
+ - unique id for the note log.
3890
+ serverName
3891
+ - name of the server instances for this request
3892
+ requestBody
3893
+ - null request body.
3894
+ viewServiceURLMarker
3895
+ - optional view service URL marker (overrides accessServiceURLMarker)
3896
+ accessServiceURLMarker
3897
+ - optional access service URL marker used to identify which back end service to call
3898
+
3899
+ Returns
3900
+ -------
3901
+ VoidResponse
3902
+
3903
+ Raises
3904
+ ------
3905
+ InvalidParameterException
3906
+ one of the parameters is null or invalid or
3907
+ PropertyServerException
3908
+ There is a problem adding the element properties to the metadata repository or
3909
+ UserNotAuthorizedException
3910
+ the requesting user is not authorized to issue this request.
3911
+ """
3912
+ loop = asyncio.get_event_loop()
3913
+ response = loop.run_until_complete(
3914
+ self._async_remove_note_log(
3915
+ note_log_guid,
3916
+ server_name,
3917
+ body,
3918
+ view_service_url_marker,
3919
+ access_service_url_marker,
3920
+ )
3921
+ )
3922
+ return response
3923
+
3924
+ #
3925
+ ## remove_rating_from_element implementation
3926
+ #
3927
+
3928
+ async def _async_remove_rating_from_element(
3929
+ self,
3930
+ element_guid: str,
3931
+ server_name: str = None,
3932
+ body: dict = {},
3933
+ view_service_url_marker: str = None,
3934
+ access_service_url_marker: str = None,
3935
+ ) -> dict | str:
3936
+ """
3937
+ Removes of a star rating/review that was added to the element by this user.
3938
+
3939
+ Parameters
3940
+ ----------
3941
+ serverName
3942
+ - name of the server instances for this request.
3943
+ elementGUID
3944
+ - unique identifier for the element where the rating is attached.
3945
+ viewServiceURLMarker
3946
+ - optional view service URL marker (overrides accessServiceURLMarker)
3947
+ accessServiceURLMarker
3948
+ - optional access service URL marker used to identify which back end service to call
3949
+ requestBody
3950
+ - containing type of comment enum and the text of the comment.
3951
+
3952
+ Returns
3953
+ -------
3954
+ Void
3955
+
3956
+ Raises
3957
+ ------
3958
+ InvalidParameterException
3959
+ one of the parameters is null or invalid or
3960
+ PropertyServerException
3961
+ There is a problem adding the element properties to the metadata repository or
3962
+ UserNotAuthorizedException
3963
+ the requesting user is not authorized to issue this request.
3964
+ """
3965
+ if server_name is None:
3966
+ server_name = self.server_name
3967
+
3968
+ possible_query_params = query_string(
3969
+ [
3970
+ ("viewServiceUrlMarker", view_service_url_marker),
3971
+ ("accessServiceUrlMarker", access_service_url_marker),
3972
+ ]
3973
+ )
3974
+ url = f"{base_path(self, server_name)}/elements/{element_guid}/ratings/remove{possible_query_params}"
3975
+ response = await self._async_make_request("POST", url, body)
3976
+ return response.json()
3977
+
3978
+ def remove_rating_from_element(
3979
+ self,
3980
+ element_guid: str,
3981
+ server_name: str = None,
3982
+ body: dict = {},
3983
+ view_service_url_marker: str = None,
3984
+ access_service_url_marker: str = None,
3985
+ ) -> dict | str:
3986
+ """
3987
+ Removes of a star rating/review that was added to the element by this user.
3988
+
3989
+ Parameters
3990
+ ----------
3991
+ serverName
3992
+ - name of the server instances for this request.
3993
+ elementGUID
3994
+ - unique identifier for the element where the rating is attached.
3995
+ viewServiceURLMarker
3996
+ - optional view service URL marker (overrides accessServiceURLMarker)
3997
+ accessServiceURLMarker
3998
+ - optional access service URL marker used to identify which back end service to call
3999
+ requestBody
4000
+ - containing type of comment enum and the text of the comment.
4001
+
4002
+ Returns
4003
+ -------
4004
+ Void
4005
+
4006
+ Raises
4007
+ ------
4008
+ InvalidParameterException
4009
+ one of the parameters is null or invalid or
4010
+ PropertyServerException
4011
+ There is a problem adding the element properties to the metadata repository or
4012
+ UserNotAuthorizedException
4013
+ the requesting user is not authorized to issue this request.
4014
+ """
4015
+ loop = asyncio.get_event_loop()
4016
+ response = loop.run_until_complete(
4017
+ self._async_remove_rating_from_element(
4018
+ element_guid,
4019
+ server_name,
4020
+ body,
4021
+ view_service_url_marker,
4022
+ access_service_url_marker,
4023
+ )
4024
+ )
4025
+ return response
4026
+
4027
+ #
4028
+ ## remove_tag_from_element implementation
4029
+ #
4030
+
4031
+ async def _async_remove_tag_from_element(
4032
+ self,
4033
+ element_guid: str,
4034
+ tag_guid: str,
4035
+ server_name: str = None,
4036
+ body: dict = {},
4037
+ view_service_url_marker: str = None,
4038
+ access_service_url_marker: str = None,
4039
+ ) -> dict | str:
4040
+ """
4041
+ Removes a link between a tag and an element that was added by this user.
4042
+
4043
+
4044
+ Parameters
4045
+ ----------
4046
+ serverName
4047
+ - name of the server instances for this request.
4048
+ elementGUID
4049
+ - unique id for the element.
4050
+ tagGUID
4051
+ - unique id of the tag.
4052
+ viewServiceURLMarker
4053
+ - optional view service URL marker (overrides accessServiceURLMarker)
4054
+ accessServiceURLMarker
4055
+ - optional access service URL marker used to identify which back end service to call
4056
+ requestBody
4057
+ - null request body needed for correct protocol exchange.
4058
+
4059
+ Returns
4060
+ -------
4061
+ Void
4062
+
4063
+ Raises
4064
+ ------
4065
+ InvalidParameterException
4066
+ one of the parameters is null or invalid or
4067
+ PropertyServerException
4068
+ There is a problem adding the element properties to the metadata repository or
4069
+ UserNotAuthorizedException
4070
+ the requesting user is not authorized to issue this request.
4071
+ """
4072
+ if server_name is None:
4073
+ server_name = self.server_name
4074
+
4075
+ possible_query_params = query_string(
4076
+ [
4077
+ ("viewServiceUrlMarker", view_service_url_marker),
4078
+ ("accessServiceUrlMarker", access_service_url_marker),
4079
+ ]
4080
+ )
4081
+ url = f"{base_path(self, server_name)}/elements/{element_guid}/tags/{tag_guid}/remove{possible_query_params}"
4082
+ response = await self._async_make_request("POST", url, body)
4083
+ return response.json()
4084
+
4085
+ def remove_tag_from_element(
4086
+ self,
4087
+ element_guid: str,
4088
+ tag_guid: str,
4089
+ server_name: str = None,
4090
+ body: dict = {},
4091
+ view_service_url_marker: str = None,
4092
+ access_service_url_marker: str = None,
4093
+ ) -> dict | str:
4094
+ """
4095
+ Removes a link between a tag and an element that was added by this user.
4096
+
4097
+
4098
+ Parameters
4099
+ ----------
4100
+ elementGUID
4101
+ - unique id for the element.
4102
+ tagGUID
4103
+ - unique id of the tag.
4104
+ serverName
4105
+ - name of the server instances for this request.
4106
+ viewServiceURLMarker
4107
+ - optional view service URL marker (overrides accessServiceURLMarker)
4108
+ accessServiceURLMarker
4109
+ - optional access service URL marker used to identify which back end service to call
4110
+ requestBody
4111
+ - null request body needed for correct protocol exchange.
4112
+
4113
+ Returns
4114
+ -------
4115
+ Void
4116
+
4117
+ Raises
4118
+ ------
4119
+ InvalidParameterException
4120
+ one of the parameters is null or invalid or
4121
+ PropertyServerException
4122
+ There is a problem adding the element properties to the metadata repository or
4123
+ UserNotAuthorizedException
4124
+ the requesting user is not authorized to issue this request.
4125
+ """
4126
+ loop = asyncio.get_event_loop()
4127
+ response = loop.run_until_complete(
4128
+ self._async_remove_tag_from_element(
4129
+ element_guid,
4130
+ tag_guid,
4131
+ server_name,
4132
+ body,
4133
+ view_service_url_marker,
4134
+ access_service_url_marker,
4135
+ )
4136
+ )
4137
+ return response
4138
+
4139
+ #
4140
+ ## setup_accepted_answer implementation
4141
+ #
4142
+
4143
+ async def _async_setup_accepted_answer(
4144
+ self,
4145
+ question_comment_guid: str,
4146
+ answer_comment_guid: str,
4147
+ server_name: str = None,
4148
+ is_public: bool = True,
4149
+ body: dict = {},
4150
+ view_service_url_marker: str = None,
4151
+ access_service_url_marker: str = None,
4152
+ ) -> dict | str:
4153
+ """
4154
+ Link a comment that contains the best answer to a question posed in another comment.
4155
+
4156
+ Parameters
4157
+ ----------
4158
+ serverName
4159
+ - name of the server to route the request to
4160
+ questionCommentGUID
4161
+ - unique identifier of the comment containing the question
4162
+ answerCommentGUID
4163
+ - unique identifier of the comment containing the accepted answer
4164
+ isPublic
4165
+ - is this visible to other people
4166
+ viewServiceURLMarker
4167
+ - optional view service URL marker (overrides accessServiceURLMarker)
4168
+ accessServiceURLMarker
4169
+ - optional access service URL marker used to identify which back end service to call
4170
+ requestBody
4171
+ - properties to help with the mapping of the elements in the external asset manager and open metadata
4172
+
4173
+ Returns
4174
+ -------
4175
+ Void
4176
+
4177
+ Raises
4178
+ ------
4179
+ InvalidParameterException
4180
+ one of the parameters is null or invalid or
4181
+ PropertyServerException
4182
+ There is a problem adding the element properties to the metadata repository or
4183
+ UserNotAuthorizedException
4184
+ the requesting user is not authorized to issue this request.
4185
+ """
4186
+ if server_name is None:
4187
+ server_name = self.server_name
4188
+
4189
+ possible_query_params = query_string(
4190
+ [
4191
+ ("isPublic", is_public),
4192
+ ("viewServiceUrlMarker", view_service_url_marker),
4193
+ ("accessServiceUrlMarker", access_service_url_marker),
4194
+ ]
4195
+ )
4196
+ url = f"{base_path(self, server_name)}/comments/questions/{question_comment_guid}/answers/{answer_comment_guid}{possible_query_params}"
4197
+ response = await self._async_make_request("POST", url, body)
4198
+ return response.json()
4199
+
4200
+ def setup_accepted_answer(
4201
+ self,
4202
+ question_comment_guid: str,
4203
+ answer_comment_guid: str,
4204
+ server_name: str = None,
4205
+ is_public: bool = True,
4206
+ body: dict = {},
4207
+ view_service_url_marker: str = None,
4208
+ access_service_url_marker: str = None,
4209
+ ) -> dict | str:
4210
+ """
4211
+ Link a comment that contains the best answer to a question posed in another comment.
4212
+
4213
+ Parameters
4214
+ ----------
4215
+ serverName
4216
+ - name of the server to route the request to
4217
+ questionCommentGUID
4218
+ - unique identifier of the comment containing the question
4219
+ answerCommentGUID
4220
+ - unique identifier of the comment containing the accepted answer
4221
+ isPublic
4222
+ - is this visible to other people
4223
+ viewServiceURLMarker
4224
+ - optional view service URL marker (overrides accessServiceURLMarker)
4225
+ accessServiceURLMarker
4226
+ - optional access service URL marker used to identify which back end service to call
4227
+ requestBody
4228
+ - properties to help with the mapping of the elements in the external asset manager and open metadata
4229
+
4230
+ Returns
4231
+ -------
4232
+ Void
4233
+
4234
+ Raises
4235
+ ------
4236
+ InvalidParameterException
4237
+ one of the parameters is null or invalid or
4238
+ PropertyServerException
4239
+ There is a problem adding the element properties to the metadata repository or
4240
+ UserNotAuthorizedException
4241
+ the requesting user is not authorized to issue this request.
4242
+ """
4243
+ loop = asyncio.get_event_loop()
4244
+ response = loop.run_until_complete(
4245
+ self._async_setup_accepted_answer(
4246
+ question_comment_guid,
4247
+ answer_comment_guid,
4248
+ server_name,
4249
+ is_public,
4250
+ body,
4251
+ view_service_url_marker,
4252
+ access_service_url_marker,
4253
+ )
4254
+ )
4255
+ return response
4256
+
4257
+ #
4258
+ ## update_comment implementation
4259
+ #
4260
+
4261
+ async def _async_update_comment(
4262
+ self,
4263
+ comment_guid: str,
4264
+ body: dict,
4265
+ server_name: str = None,
4266
+ is_merge_update: bool = None,
4267
+ view_service_url_marker: str = None,
4268
+ access_service_url_marker: str = None,
4269
+ ) -> dict | str:
4270
+ """
4271
+ Update an existing comment.
4272
+
4273
+ Parameters
4274
+ ----------
4275
+ commentGUID
4276
+ - unique identifier for the comment to change.
4277
+ body
4278
+ - containing type of comment enum and the text of the comment.
4279
+ serverName
4280
+ - name of the server instances for this request.
4281
+ isMergeUpdate
4282
+ - should the new properties be merged with existing properties (true) or completely replace them (false)?
4283
+ viewServiceURLMarker
4284
+ - optional view service URL marker (overrides accessServiceURLMarker)
4285
+ accessServiceURLMarker
4286
+ - optional access service URL marker used to identify which back end service to call
4287
+
4288
+ Returns
4289
+ -------
4290
+ Void
4291
+
4292
+ Raises
4293
+ ------
4294
+ InvalidParameterException
4295
+ one of the parameters is null or invalid or
4296
+ PropertyServerException
4297
+ There is a problem adding the element properties to the metadata repository or
4298
+ UserNotAuthorizedException
4299
+ the requesting user is not authorized to issue this request.
4300
+ """
4301
+ if server_name is None:
4302
+ server_name = self.server_name
4303
+
4304
+ possible_query_params = query_string(
4305
+ [
4306
+ ("isMergeUpdate", is_merge_update),
4307
+ ("viewServiceUrlMarker", view_service_url_marker),
4308
+ ("accessServiceUrlMarker", access_service_url_marker),
4309
+ ]
4310
+ )
4311
+ url = f"{base_path(self, server_name)}/comments/{comment_guid}/update{possible_query_params}"
4312
+ response = await self._async_make_request("POST", url, body)
4313
+ return response.json()
4314
+
4315
+ def update_comment(
4316
+ self,
4317
+ comment_guid: str,
4318
+ body: dict,
4319
+ server_name: str = None,
4320
+ is_merge_update: bool = None,
4321
+ view_service_url_marker: str = None,
4322
+ access_service_url_marker: str = None,
4323
+ ) -> dict | str:
4324
+ """
4325
+ Update an existing comment.
4326
+
4327
+ Parameters
4328
+ ----------
4329
+ commentGUID
4330
+ - unique identifier for the comment to change.
4331
+ body
4332
+ - containing type of comment enum and the text of the comment.
4333
+ serverName
4334
+ - name of the server instances for this request.
4335
+ isMergeUpdate
4336
+ - should the new properties be merged with existing properties (true) or completely replace them (false)?
4337
+ viewServiceURLMarker
4338
+ - optional view service URL marker (overrides accessServiceURLMarker)
4339
+ accessServiceURLMarker
4340
+ - optional access service URL marker used to identify which back end service to call
4341
+
4342
+ Returns
4343
+ -------
4344
+ Void
4345
+
4346
+ Raises
4347
+ ------
4348
+ InvalidParameterException
4349
+ one of the parameters is null or invalid or
4350
+ PropertyServerException
4351
+ There is a problem adding the element properties to the metadata repository or
4352
+ UserNotAuthorizedException
4353
+ the requesting user is not authorized to issue this request.
4354
+ """
4355
+ loop = asyncio.get_event_loop()
4356
+ response = loop.run_until_complete(
4357
+ self._async_update_comment(
4358
+ comment_guid,
4359
+ body,
4360
+ server_name,
4361
+ is_merge_update,
4362
+ view_service_url_marker,
4363
+ access_service_url_marker,
4364
+ )
4365
+ )
4366
+ return response
4367
+
4368
+ #
4369
+ ## update_comment_visibility implementation
4370
+ #
4371
+
4372
+ async def _async_update_comment_visibility(
4373
+ self,
4374
+ parent_guid: str,
4375
+ comment_guid: str,
4376
+ is_public: bool,
4377
+ body: dict = {},
4378
+ server_name: str = None,
4379
+ view_service_url_marker: str = None,
4380
+ access_service_url_marker: str = None,
4381
+ ) -> dict | str:
4382
+ """
4383
+ Update an existing comment's visibility.
4384
+
4385
+ Parameters
4386
+ ----------
4387
+ serverName
4388
+ - name of the server instances for this request.
4389
+ commentGUID
4390
+ - unique identifier for the comment to change.
4391
+ isPublic
4392
+ - is this visible to other people
4393
+ viewServiceURLMarker
4394
+ - optional view service URL marker (overrides accessServiceURLMarker)
4395
+ accessServiceURLMarker
4396
+ - optional access service URL marker used to identify which back end service to call
4397
+ requestBody
4398
+ - containing type of comment enum and the text of the comment.
4399
+
4400
+ Returns
4401
+ -------
4402
+ Void
4403
+
4404
+ Raises
4405
+ ------
4406
+ InvalidParameterException
4407
+ one of the parameters is null or invalid or
4408
+ PropertyServerException
4409
+ There is a problem adding the element properties to the metadata repository or
4410
+ UserNotAuthorizedException
4411
+ the requesting user is not authorized to issue this request.
4412
+ """
4413
+ if server_name is None:
4414
+ server_name = self.server_name
4415
+
4416
+ possible_query_params = query_string(
4417
+ [
4418
+ ("isPublic", is_public),
4419
+ ("viewServiceUrlMarker", view_service_url_marker),
4420
+ ("accessServiceUrlMarker", access_service_url_marker),
4421
+ ]
4422
+ )
4423
+ url = f"{base_path(self, server_name)}/parents/{parent_guid}/comments/{comment_guid}/update-visibility{possible_query_params}"
4424
+ response = await self._async_make_request("POST", url, body)
4425
+ return response.json()
4426
+
4427
+ def update_comment_visibility(
4428
+ self,
4429
+ parent_guid: str,
4430
+ comment_guid: str,
4431
+ is_public: bool,
4432
+ body: dict = {},
4433
+ server_name: str = None,
4434
+ view_service_url_marker: str = None,
4435
+ access_service_url_marker: str = None,
4436
+ ) -> dict | str:
4437
+ """
4438
+ Update an existing comment's visibility.
4439
+
4440
+ Parameters
4441
+ ----------
4442
+ serverName
4443
+ - name of the server instances for this request.
4444
+ commentGUID
4445
+ - unique identifier for the comment to change.
4446
+ isPublic
4447
+ - is this visible to other people
4448
+ viewServiceURLMarker
4449
+ - optional view service URL marker (overrides accessServiceURLMarker)
4450
+ accessServiceURLMarker
4451
+ - optional access service URL marker used to identify which back end service to call
4452
+ requestBody
4453
+ - containing type of comment enum and the text of the comment.
4454
+
4455
+ Returns
4456
+ -------
4457
+ Void
4458
+
4459
+ Raises
4460
+ ------
4461
+ InvalidParameterException
4462
+ one of the parameters is null or invalid or
4463
+ PropertyServerException
4464
+ There is a problem adding the element properties to the metadata repository or
4465
+ UserNotAuthorizedException
4466
+ the requesting user is not authorized to issue this request.
4467
+ """
4468
+ loop = asyncio.get_event_loop()
4469
+ response = loop.run_until_complete(
4470
+ self._async_update_comment_visibility(
4471
+ parent_guid,
4472
+ comment_guid,
4473
+ is_public,
4474
+ body,
4475
+ server_name,
4476
+ view_service_url_marker,
4477
+ access_service_url_marker,
4478
+ )
4479
+ )
4480
+ return response
4481
+
4482
+ #
4483
+ ## update_note implementation
4484
+ #
4485
+
4486
+ async def _async_update_note(
4487
+ self,
4488
+ note_guid: str,
4489
+ body: dict,
4490
+ server_name: str = None,
4491
+ is_merge_update: bool = None,
4492
+ view_service_url_marker: str = None,
4493
+ access_service_url_marker: str = None,
4494
+ ) -> dict | str:
4495
+ """
4496
+ Update an existing note.
4497
+
4498
+ Parameters
4499
+ ----------
4500
+ serverName
4501
+ - name of the server instances for this request.
4502
+ noteGUID
4503
+ - unique identifier for the note to change.
4504
+ isMergeUpdate
4505
+ - should the new properties be merged with existing properties (true) or completely replace them (false)?
4506
+ viewServiceURLMarker
4507
+ - optional view service URL marker (overrides accessServiceURLMarker)
4508
+ accessServiceURLMarker
4509
+ - optional access service URL marker used to identify which back end service to call
4510
+ requestBody
4511
+ - containing type of comment enum and the text of the comment.
4512
+
4513
+ Returns
4514
+ -------
4515
+ Void
4516
+
4517
+ Raises
4518
+ ------
4519
+ InvalidParameterException
4520
+ one of the parameters is null or invalid or
4521
+ PropertyServerException
4522
+ There is a problem adding the element properties to the metadata repository or
4523
+ UserNotAuthorizedException
4524
+ the requesting user is not authorized to issue this request.
4525
+ """
4526
+ if server_name is None:
4527
+ server_name = self.server_name
4528
+
4529
+ possible_query_params = query_string(
4530
+ [
4531
+ ("isMergeUpdate", is_merge_update),
4532
+ ("viewServiceUrlMarker", view_service_url_marker),
4533
+ ("accessServiceUrlMarker", access_service_url_marker),
4534
+ ]
4535
+ )
4536
+ url = f"{base_path(self, server_name)}/notes/{note_guid}{possible_query_params}"
4537
+ response = await self._async_make_request("POST", url, body)
4538
+ return response.json()
4539
+
4540
+ def update_note(
4541
+ self,
4542
+ note_guid: str,
4543
+ body: dict,
4544
+ server_name: str = None,
4545
+ is_merge_update: bool = None,
4546
+ view_service_url_marker: str = None,
4547
+ access_service_url_marker: str = None,
4548
+ ) -> dict | str:
4549
+ """
4550
+ Update an existing note.
4551
+
4552
+ Parameters
4553
+ ----------
4554
+ serverName
4555
+ - name of the server instances for this request.
4556
+ noteGUID
4557
+ - unique identifier for the note to change.
4558
+ isMergeUpdate
4559
+ - should the new properties be merged with existing properties (true) or completely replace them (false)?
4560
+ viewServiceURLMarker
4561
+ - optional view service URL marker (overrides accessServiceURLMarker)
4562
+ accessServiceURLMarker
4563
+ - optional access service URL marker used to identify which back end service to call
4564
+ requestBody
4565
+ - containing type of comment enum and the text of the comment.
4566
+
4567
+ Returns
4568
+ -------
4569
+ Void
4570
+
4571
+ Raises
4572
+ ------
4573
+ InvalidParameterException
4574
+ one of the parameters is null or invalid or
4575
+ PropertyServerException
4576
+ There is a problem adding the element properties to the metadata repository or
4577
+ UserNotAuthorizedException
4578
+ the requesting user is not authorized to issue this request.
4579
+ """
4580
+ loop = asyncio.get_event_loop()
4581
+ response = loop.run_until_complete(
4582
+ self._async_update_note(
4583
+ note_guid,
4584
+ body,
4585
+ server_name,
4586
+ is_merge_update,
4587
+ view_service_url_marker,
4588
+ access_service_url_marker,
4589
+ )
4590
+ )
4591
+ return response
4592
+
4593
+ #
4594
+ ## update_note_log implementation
4595
+ #
4596
+
4597
+ async def _async_update_note_log(
4598
+ self,
4599
+ note_log_guid: str,
4600
+ body: dict,
4601
+ server_name: str = None,
4602
+ is_merge_update: bool = None,
4603
+ view_service_url_marker: str = None,
4604
+ access_service_url_marker: str = None,
4605
+ ) -> dict | str:
4606
+ """
4607
+ Update an existing note log.
4608
+
4609
+ Parameters
4610
+ ----------
4611
+ noteLogGUID
4612
+ - unique identifier for the note log to change.
4613
+ body
4614
+ - containing type of comment enum and the text of the comment.
4615
+ serverName
4616
+ - name of the server instances for this request.
4617
+ isMergeUpdate
4618
+ - should the new properties be merged with existing properties (true) or completely replace them (false)?
4619
+ viewServiceURLMarker
4620
+ - optional view service URL marker (overrides accessServiceURLMarker)
4621
+ accessServiceURLMarker
4622
+ - optional access service URL marker used to identify which back end service to call
4623
+
4624
+ Returns
4625
+ -------
4626
+ Void
4627
+
4628
+ Raises
4629
+ ------
4630
+ InvalidParameterException
4631
+ one of the parameters is null or invalid or
4632
+ PropertyServerException
4633
+ There is a problem adding the element properties to the metadata repository or
4634
+ UserNotAuthorizedException
4635
+ the requesting user is not authorized to issue this request.
4636
+ """
4637
+ if server_name is None:
4638
+ server_name = self.server_name
4639
+
4640
+ possible_query_params = query_string(
4641
+ [
4642
+ ("isMergeUpdate", is_merge_update),
4643
+ ("viewServiceUrlMarker", view_service_url_marker),
4644
+ ("accessServiceUrlMarker", access_service_url_marker),
4645
+ ]
4646
+ )
4647
+ url = f"{base_path(self, server_name)}/note-logs/{note_log_guid}{possible_query_params}"
4648
+ response = await self._async_make_request("POST", url, body)
4649
+ return response.json()
4650
+
4651
+ def update_note_log(
4652
+ self,
4653
+ note_log_guid: str,
4654
+ body: dict,
4655
+ server_name: str = None,
4656
+ is_merge_update: bool = None,
4657
+ view_service_url_marker: str = None,
4658
+ access_service_url_marker: str = None,
4659
+ ) -> dict | str:
4660
+ """
4661
+ Update an existing note log.
4662
+
4663
+ Parameters
4664
+ ----------
4665
+ noteLogGUID
4666
+ - unique identifier for the note log to change.
4667
+ body
4668
+ - containing type of comment enum and the text of the comment.
4669
+ serverName
4670
+ - name of the server instances for this request.
4671
+ isMergeUpdate
4672
+ - should the new properties be merged with existing properties (true) or completely replace them (false)?
4673
+ viewServiceURLMarker
4674
+ - optional view service URL marker (overrides accessServiceURLMarker)
4675
+ accessServiceURLMarker
4676
+ - optional access service URL marker used to identify which back end service to call
4677
+
4678
+ Returns
4679
+ -------
4680
+ Void
4681
+
4682
+ Raises
4683
+ ------
4684
+ InvalidParameterException
4685
+ one of the parameters is null or invalid or
4686
+ PropertyServerException
4687
+ There is a problem adding the element properties to the metadata repository or
4688
+ UserNotAuthorizedException
4689
+ the requesting user is not authorized to issue this request.
4690
+ """
4691
+ loop = asyncio.get_event_loop()
4692
+ response = loop.run_until_complete(
4693
+ self._async_update_note_log(
4694
+ note_log_guid,
4695
+ body,
4696
+ server_name,
4697
+ is_merge_update,
4698
+ view_service_url_marker,
4699
+ access_service_url_marker,
4700
+ )
4701
+ )
4702
+ return response
4703
+
4704
+ #
4705
+ ## update_tag_description implementation
4706
+ #
4707
+
4708
+ async def _async_update_tag_description(
4709
+ self,
4710
+ tag_guid: str,
4711
+ body: str,
4712
+ server_name: str = None,
4713
+ view_service_url_marker: str = None,
4714
+ access_service_url_marker: str = None,
4715
+ ) -> dict | str:
4716
+ """
4717
+ Updates the description of an existing tag (either private or public).
4718
+
4719
+ Parameters
4720
+ ----------
4721
+ serverName
4722
+ - name of the server instances for this request
4723
+ tagGUID
4724
+ - unique id for the tag
4725
+ viewServiceURLMarker
4726
+ - optional view service URL marker (overrides accessServiceURLMarker)
4727
+ accessServiceURLMarker
4728
+ - optional access service URL marker used to identify which back end service to call
4729
+ requestBody - contains the name of the tag and (optional) description of the tag.
4730
+
4731
+ Returns
4732
+ -------
4733
+ VoidResponse :
4734
+ {'class': 'VoidResponse', 'relatedHTTPCode': 200}
4735
+
4736
+ Raises
4737
+ ------
4738
+ InvalidParameterException
4739
+ one of the parameters is null or invalid or
4740
+ PropertyServerException
4741
+ There is a problem adding the element properties to the metadata repository or
4742
+ UserNotAuthorizedException
4743
+ the requesting user is not authorized to issue this request.
4744
+ """
4745
+ if server_name is None:
4746
+ server_name = self.server_name
4747
+
4748
+ possible_query_params = query_string(
4749
+ [
4750
+ ("viewServiceUrlMarker", view_service_url_marker),
4751
+ ("accessServiceUrlMarker", access_service_url_marker),
4752
+ ]
4753
+ )
4754
+ url = f"{base_path(self, server_name)}/tags/{tag_guid}/update{possible_query_params}"
4755
+
4756
+ response = await self._async_make_request("POST", url, body)
4757
+ return response.json()
4758
+
4759
+ def update_tag_description(
4760
+ self,
4761
+ tag_guid: str,
4762
+ body: str,
4763
+ server_name: str = None,
4764
+ view_service_url_marker: str = None,
4765
+ access_service_url_marker: str = None,
4766
+ ) -> dict | str:
4767
+ """
4768
+ Updates the description of an existing tag (either private or public).
4769
+
4770
+ Parameters
4771
+ ----------
4772
+ serverName
4773
+ - name of the server instances for this request
4774
+ tagGUID
4775
+ - unique id for the tag
4776
+ viewServiceURLMarker
4777
+ - optional view service URL marker (overrides accessServiceURLMarker)
4778
+ accessServiceURLMarker
4779
+ - optional access service URL marker used to identify which back end service to call
4780
+ requestBody - contains the name of the tag and (optional) description of the tag.
4781
+
4782
+ Returns
4783
+ -------
4784
+ VoidResponse :
4785
+ {'class': 'VoidResponse', 'relatedHTTPCode': 200}
4786
+
4787
+ Raises
4788
+ ------
4789
+ InvalidParameterException
4790
+ one of the parameters is null or invalid or
4791
+ PropertyServerException
4792
+ There is a problem adding the element properties to the metadata repository or
4793
+ UserNotAuthorizedException
4794
+ the requesting user is not authorized to issue this request.
4795
+ """
4796
+ loop = asyncio.get_event_loop()
4797
+ response = loop.run_until_complete(
4798
+ self._async_update_tag_description(
4799
+ tag_guid,
4800
+ body,
4801
+ server_name,
4802
+ view_service_url_marker,
4803
+ access_service_url_marker,
4804
+ )
4805
+ )
4806
+ return response