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