pyegeria 0.7.45__py3-none-any.whl → 0.8.0__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.
- examples/widgets/cat/list_cert_types.py +61 -43
- examples/widgets/cat/list_projects.py +1 -1
- examples/widgets/cli/egeria.py +18 -2
- examples/widgets/cli/egeria_tech.py +299 -98
- examples/widgets/my/my_profile_actions.py +51 -32
- examples/widgets/ops/engine_actions.py +35 -23
- examples/widgets/ops/integration_daemon_actions.py +51 -32
- examples/widgets/tech/get_element_info.py +63 -38
- examples/widgets/tech/get_guid_info.py +50 -27
- examples/widgets/tech/list_asset_types.py +33 -23
- examples/widgets/tech/list_elements.py +44 -34
- examples/widgets/tech/list_elements_x.py +69 -49
- examples/widgets/tech/list_registered_services.py +44 -24
- examples/widgets/tech/list_related_specification.py +70 -45
- examples/widgets/tech/list_relationship_types.py +50 -31
- examples/widgets/tech/list_valid_metadata_values.py +57 -28
- examples/widgets/tech/x_list_related_elements.py +54 -34
- pyegeria/Xloaded_resources_omvs.py +43 -41
- pyegeria/__init__.py +5 -1
- pyegeria/_client.py +142 -102
- pyegeria/_deprecated_gov_engine.py +218 -167
- pyegeria/action_author_omvs.py +107 -88
- pyegeria/asset_catalog_omvs.py +467 -395
- pyegeria/automated_curation_omvs.py +2 -2
- pyegeria/classification_manager_omvs.py +1920 -868
- pyegeria/collection_manager_omvs.py +1957 -1519
- pyegeria/core_omag_server_config.py +310 -192
- pyegeria/egeria_cat_client.py +88 -0
- pyegeria/egeria_config_client.py +37 -0
- pyegeria/egeria_my_client.py +47 -0
- pyegeria/egeria_ops_client.py +67 -0
- pyegeria/egeria_tech_client.py +77 -0
- pyegeria/feedback_manager_omvs.py +633 -631
- pyegeria/full_omag_server_config.py +330 -158
- pyegeria/glossary_browser_omvs.py +927 -474
- pyegeria/glossary_manager_omvs.py +1033 -543
- pyegeria/mermaid_utilities.py +1 -1
- pyegeria/my_profile_omvs.py +714 -574
- pyegeria/platform_services.py +228 -176
- pyegeria/project_manager_omvs.py +1158 -903
- pyegeria/registered_info.py +76 -74
- pyegeria/runtime_manager_omvs.py +749 -670
- pyegeria/server_operations.py +123 -85
- pyegeria/valid_metadata_omvs.py +268 -168
- {pyegeria-0.7.45.dist-info → pyegeria-0.8.0.dist-info}/METADATA +1 -1
- {pyegeria-0.7.45.dist-info → pyegeria-0.8.0.dist-info}/RECORD +49 -46
- examples/widgets/tech/list_gov_processes.py +0 -162
- pyegeria/tech_guids_31-08-2024 14:33.py +0 -79
- {pyegeria-0.7.45.dist-info → pyegeria-0.8.0.dist-info}/LICENSE +0 -0
- {pyegeria-0.7.45.dist-info → pyegeria-0.8.0.dist-info}/WHEEL +0 -0
- {pyegeria-0.7.45.dist-info → pyegeria-0.8.0.dist-info}/entry_points.txt +0 -0
@@ -13,7 +13,11 @@ import time
|
|
13
13
|
# import json
|
14
14
|
from pyegeria._client import Client
|
15
15
|
from pyegeria._globals import enable_ssl_check
|
16
|
-
from pyegeria._validators import (
|
16
|
+
from pyegeria._validators import (
|
17
|
+
validate_name,
|
18
|
+
validate_guid,
|
19
|
+
validate_search_string,
|
20
|
+
)
|
17
21
|
from pyegeria.glossary_browser_omvs import GlossaryBrowser
|
18
22
|
from pyegeria.utils import body_slimmer
|
19
23
|
|
@@ -38,20 +42,34 @@ class GlossaryManager(GlossaryBrowser):
|
|
38
42
|
Flag to indicate if SSL Certificates should be verified in the HTTP requests.
|
39
43
|
Defaults to False.
|
40
44
|
|
41
|
-
|
45
|
+
"""
|
42
46
|
|
43
|
-
def __init__(
|
44
|
-
|
47
|
+
def __init__(
|
48
|
+
self,
|
49
|
+
server_name: str,
|
50
|
+
platform_url: str,
|
51
|
+
token: str = None,
|
52
|
+
user_id: str = None,
|
53
|
+
user_pwd: str = None,
|
54
|
+
verify_flag: bool = enable_ssl_check,
|
55
|
+
sync_mode: bool = True,
|
56
|
+
):
|
45
57
|
self.admin_command_root: str
|
46
|
-
Client.__init__(self, server_name, platform_url, user_id=user_id, token=token
|
58
|
+
Client.__init__(self, server_name, platform_url, user_id=user_id, token=token)
|
47
59
|
|
48
60
|
#
|
49
61
|
# Get Valid Values for Enumerations
|
50
62
|
#
|
51
63
|
|
52
|
-
async def _async_create_glossary(
|
53
|
-
|
54
|
-
|
64
|
+
async def _async_create_glossary(
|
65
|
+
self,
|
66
|
+
display_name: str,
|
67
|
+
description: str,
|
68
|
+
language: str = "English",
|
69
|
+
usage: str = None,
|
70
|
+
server_name: str = None,
|
71
|
+
) -> str:
|
72
|
+
"""Create a new glossary. Async version.
|
55
73
|
|
56
74
|
Parameters
|
57
75
|
----------
|
@@ -78,22 +96,27 @@ class GlossaryManager(GlossaryBrowser):
|
|
78
96
|
url = f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-manager/glossaries"
|
79
97
|
body = {
|
80
98
|
"class": "ReferenceableRequestBody",
|
81
|
-
"elementProperties":
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
}
|
99
|
+
"elementProperties": {
|
100
|
+
"class": "GlossaryProperties",
|
101
|
+
"qualifiedName": f"Glossary-{display_name}-{time.asctime()}",
|
102
|
+
"displayName": display_name,
|
103
|
+
"description": description,
|
104
|
+
"language": language,
|
105
|
+
"usage": usage,
|
106
|
+
},
|
90
107
|
}
|
91
108
|
response = await self._async_make_request("POST", url, body_slimmer(body))
|
92
109
|
return response.json().get("guid", None)
|
93
110
|
|
94
|
-
def create_glossary(
|
95
|
-
|
96
|
-
|
111
|
+
def create_glossary(
|
112
|
+
self,
|
113
|
+
display_name: str,
|
114
|
+
description: str,
|
115
|
+
language: str = "English",
|
116
|
+
usage: str = None,
|
117
|
+
server_name: str = None,
|
118
|
+
) -> str:
|
119
|
+
"""Create a new glossary.
|
97
120
|
|
98
121
|
Parameters
|
99
122
|
----------
|
@@ -115,12 +138,17 @@ class GlossaryManager(GlossaryBrowser):
|
|
115
138
|
|
116
139
|
"""
|
117
140
|
loop = asyncio.get_event_loop()
|
118
|
-
response = loop.run_until_complete(
|
119
|
-
|
141
|
+
response = loop.run_until_complete(
|
142
|
+
self._async_create_glossary(
|
143
|
+
display_name, description, language, usage, server_name
|
144
|
+
)
|
145
|
+
)
|
120
146
|
return response
|
121
147
|
|
122
|
-
async def _async_delete_glossary(
|
123
|
-
|
148
|
+
async def _async_delete_glossary(
|
149
|
+
self, glossary_guid: str, server_name: str = None
|
150
|
+
) -> None:
|
151
|
+
"""Delete glossary. Async version.
|
124
152
|
|
125
153
|
Parameters
|
126
154
|
----------
|
@@ -137,14 +165,16 @@ class GlossaryManager(GlossaryBrowser):
|
|
137
165
|
if server_name is None:
|
138
166
|
server_name = self.server_name
|
139
167
|
|
140
|
-
url = (
|
141
|
-
|
168
|
+
url = (
|
169
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-manager/glossaries/"
|
170
|
+
f"{glossary_guid}/remove"
|
171
|
+
)
|
142
172
|
|
143
173
|
await self._async_make_request("POST", url)
|
144
174
|
return
|
145
175
|
|
146
176
|
def delete_glossary(self, glossary_guid: str, server_name: str = None) -> None:
|
147
|
-
"""
|
177
|
+
"""Create a new glossary.
|
148
178
|
|
149
179
|
Parameters
|
150
180
|
----------
|
@@ -159,18 +189,30 @@ class GlossaryManager(GlossaryBrowser):
|
|
159
189
|
|
160
190
|
"""
|
161
191
|
loop = asyncio.get_event_loop()
|
162
|
-
response = loop.run_until_complete(
|
192
|
+
response = loop.run_until_complete(
|
193
|
+
self._async_delete_glossary(glossary_guid, server_name)
|
194
|
+
)
|
163
195
|
return response
|
164
196
|
|
165
197
|
#
|
166
198
|
# Glossaries
|
167
199
|
#
|
168
200
|
|
169
|
-
async def _async_find_glossaries(
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
201
|
+
async def _async_find_glossaries(
|
202
|
+
self,
|
203
|
+
search_string: str,
|
204
|
+
effective_time: str = None,
|
205
|
+
starts_with: bool = False,
|
206
|
+
ends_with: bool = False,
|
207
|
+
ignore_case: bool = False,
|
208
|
+
for_lineage: bool = False,
|
209
|
+
for_duplicate_processing: bool = False,
|
210
|
+
type_name: str = None,
|
211
|
+
server_name: str = None,
|
212
|
+
start_from: int = 0,
|
213
|
+
page_size: int = None,
|
214
|
+
) -> list | str:
|
215
|
+
"""Retrieve the list of glossary metadata elements that contain the search string. Async version.
|
174
216
|
The search string is located in the request body and is interpreted as a plain string.
|
175
217
|
The request parameters, startsWith, endsWith and ignoreCase can be used to allow a fuzzy search.
|
176
218
|
|
@@ -231,85 +273,114 @@ class GlossaryManager(GlossaryBrowser):
|
|
231
273
|
|
232
274
|
validate_search_string(search_string)
|
233
275
|
|
234
|
-
if search_string ==
|
276
|
+
if search_string == "*":
|
235
277
|
search_string = None
|
236
278
|
|
237
|
-
body = {
|
238
|
-
|
279
|
+
body = {
|
280
|
+
"class": "SearchStringRequestBody",
|
281
|
+
"searchString": search_string,
|
282
|
+
"effectiveTime": effective_time,
|
283
|
+
"typeName": type_name,
|
284
|
+
}
|
239
285
|
body = body_slimmer(body)
|
240
286
|
# print(f"\n\nBody is: \n{body}")
|
241
287
|
|
242
|
-
url = (
|
243
|
-
|
244
|
-
|
245
|
-
|
288
|
+
url = (
|
289
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/"
|
290
|
+
f"by-search-string?startFrom={start_from}&pageSize={page_size}&startsWith={starts_with_s}&"
|
291
|
+
f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}&forLineage={for_lineage_s}&"
|
292
|
+
f"forDuplicateProcessing={for_duplicate_processing_s}"
|
293
|
+
)
|
246
294
|
|
247
295
|
response = await self._async_make_request("POST", url, body)
|
248
296
|
return response.json().get("elementList", "No Glossaries found")
|
249
297
|
|
250
|
-
def find_glossaries(
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
298
|
+
def find_glossaries(
|
299
|
+
self,
|
300
|
+
search_string: str,
|
301
|
+
effective_time: str = None,
|
302
|
+
starts_with: bool = False,
|
303
|
+
ends_with: bool = False,
|
304
|
+
ignore_case: bool = False,
|
305
|
+
for_lineage: bool = False,
|
306
|
+
for_duplicate_processing: bool = False,
|
307
|
+
type_name: str = None,
|
308
|
+
server_name: str = None,
|
309
|
+
start_from: int = 0,
|
310
|
+
page_size: int = None,
|
311
|
+
) -> list | str:
|
312
|
+
"""Retrieve the list of glossary metadata elements that contain the search string.
|
313
|
+
The search string is located in the request body and is interpreted as a plain string.
|
314
|
+
The request parameters, startsWith, endsWith and ignoreCase can be used to allow a fuzzy search.
|
315
|
+
|
316
|
+
Parameters
|
317
|
+
----------
|
318
|
+
search_string: str,
|
319
|
+
Search string to use to find matching glossaries. If the search string is '*' then all glossaries returned.
|
320
|
+
|
321
|
+
effective_time: str, [default=None], optional
|
322
|
+
Effective time of the query. If not specified will default to any time. Time format is
|
323
|
+
"YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
324
|
+
server_name : str, optional
|
325
|
+
The name of the server to configure.
|
326
|
+
If not provided, the server name associated with the instance is used.
|
327
|
+
starts_with : bool, [default=False], optional
|
328
|
+
Starts with the supplied string.
|
329
|
+
ends_with : bool, [default=False], optional
|
330
|
+
Ends with the supplied string
|
331
|
+
ignore_case : bool, [default=False], optional
|
332
|
+
Ignore case when searching
|
333
|
+
for_lineage : bool, [default=False], optional
|
334
|
+
Indicates the search is for lineage.
|
335
|
+
for_duplicate_processing : bool, [default=False], optional
|
336
|
+
type_name: str, [default=None], optional
|
337
|
+
An optional parameter indicating the subtype of the glossary to filter by.
|
338
|
+
Values include 'ControlledGlossary', 'EditingGlossary', and 'StagingGlossary'
|
339
|
+
start_from: int, [default=0], optional
|
340
|
+
When multiple pages of results are available, the page number to start from.
|
341
|
+
page_size: int, [default=None]
|
342
|
+
The number of items to return in a single page. If not specified, the default will be taken from
|
343
|
+
the class instance.
|
344
|
+
Returns
|
345
|
+
-------
|
346
|
+
List | str
|
347
|
+
|
348
|
+
A list of glossary definitions active in the server.
|
349
|
+
|
350
|
+
Raises
|
351
|
+
------
|
352
|
+
|
353
|
+
InvalidParameterException
|
354
|
+
If the client passes incorrect parameters on the request - such as bad URLs or invalid values
|
355
|
+
PropertyServerException
|
356
|
+
Raised by the server when an issue arises in processing a valid request
|
357
|
+
NotAuthorizedException
|
358
|
+
The principle specified by the user_id does not have authorization for the requested action
|
359
|
+
|
360
|
+
"""
|
303
361
|
loop = asyncio.get_event_loop()
|
304
362
|
response = loop.run_until_complete(
|
305
|
-
self._async_find_glossaries(
|
306
|
-
|
363
|
+
self._async_find_glossaries(
|
364
|
+
search_string,
|
365
|
+
effective_time,
|
366
|
+
starts_with,
|
367
|
+
ends_with,
|
368
|
+
ignore_case,
|
369
|
+
for_lineage,
|
370
|
+
for_duplicate_processing,
|
371
|
+
type_name,
|
372
|
+
server_name,
|
373
|
+
start_from,
|
374
|
+
page_size,
|
375
|
+
)
|
376
|
+
)
|
307
377
|
|
308
378
|
return response
|
309
379
|
|
310
|
-
async def _async_get_glossary_by_guid(
|
311
|
-
|
312
|
-
|
380
|
+
async def _async_get_glossary_by_guid(
|
381
|
+
self, glossary_guid: str, server_name: str = None, effective_time: str = None
|
382
|
+
) -> dict:
|
383
|
+
"""Retrieves information about a glossary
|
313
384
|
Parameters
|
314
385
|
----------
|
315
386
|
glossary_guid : str
|
@@ -340,16 +411,21 @@ class GlossaryManager(GlossaryBrowser):
|
|
340
411
|
server_name = self.server_name
|
341
412
|
validate_guid(glossary_guid)
|
342
413
|
|
343
|
-
body = {
|
414
|
+
body = {
|
415
|
+
"class": "EffectiveTimeQueryRequestBody",
|
416
|
+
"effectiveTime": effective_time,
|
417
|
+
}
|
344
418
|
|
345
|
-
url = (
|
346
|
-
|
419
|
+
url = (
|
420
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/"
|
421
|
+
f"{glossary_guid}/retrieve"
|
422
|
+
)
|
347
423
|
print(url)
|
348
424
|
response = await self._async_make_request("POST", url, payload=body)
|
349
425
|
return response.json()
|
350
426
|
|
351
427
|
def get_glossary_by_guid(self, glossary_guid: str, server_name: str = None) -> dict:
|
352
|
-
"""
|
428
|
+
"""Retrieves information about a glossary
|
353
429
|
Parameters
|
354
430
|
----------
|
355
431
|
glossary_guid : str
|
@@ -374,13 +450,20 @@ class GlossaryManager(GlossaryBrowser):
|
|
374
450
|
-----
|
375
451
|
"""
|
376
452
|
loop = asyncio.get_event_loop()
|
377
|
-
response = loop.run_until_complete(
|
453
|
+
response = loop.run_until_complete(
|
454
|
+
self._async_get_glossary_by_guid(glossary_guid, server_name)
|
455
|
+
)
|
378
456
|
return response
|
379
457
|
|
380
|
-
async def _async_get_glossaries_by_name(
|
381
|
-
|
382
|
-
|
383
|
-
|
458
|
+
async def _async_get_glossaries_by_name(
|
459
|
+
self,
|
460
|
+
glossary_name: str,
|
461
|
+
effective_time: str = None,
|
462
|
+
server_name: str = None,
|
463
|
+
start_from: int = 0,
|
464
|
+
page_size: int = None,
|
465
|
+
) -> dict | str:
|
466
|
+
"""Retrieve the list of glossary metadata elements with an exactly matching qualified or display name.
|
384
467
|
There are no wildcards supported on this request.
|
385
468
|
|
386
469
|
Parameters
|
@@ -427,15 +510,23 @@ class GlossaryManager(GlossaryBrowser):
|
|
427
510
|
else:
|
428
511
|
body = {"name": glossary_name, "effectiveTime": effective_time}
|
429
512
|
|
430
|
-
url = (
|
431
|
-
|
513
|
+
url = (
|
514
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/"
|
515
|
+
f"by-name?startFrom={start_from}&pageSize={page_size}"
|
516
|
+
)
|
432
517
|
|
433
518
|
response = await self._async_make_request("POST", url, body)
|
434
519
|
return response.json()
|
435
520
|
|
436
|
-
def get_glossaries_by_name(
|
437
|
-
|
438
|
-
|
521
|
+
def get_glossaries_by_name(
|
522
|
+
self,
|
523
|
+
glossary_name: str,
|
524
|
+
effective_time: str = None,
|
525
|
+
server_name: str = None,
|
526
|
+
start_from: int = 0,
|
527
|
+
page_size: int = None,
|
528
|
+
) -> dict | str:
|
529
|
+
"""Retrieve the list of glossary metadata elements with an exactly matching qualified or display name.
|
439
530
|
There are no wildcards supported on this request.
|
440
531
|
|
441
532
|
Parameters
|
@@ -471,15 +562,23 @@ class GlossaryManager(GlossaryBrowser):
|
|
471
562
|
"""
|
472
563
|
loop = asyncio.get_event_loop()
|
473
564
|
response = loop.run_until_complete(
|
474
|
-
self._async_get_glossaries_by_name(
|
565
|
+
self._async_get_glossaries_by_name(
|
566
|
+
glossary_name, effective_time, server_name, start_from, page_size
|
567
|
+
)
|
568
|
+
)
|
475
569
|
return response
|
476
570
|
|
477
571
|
#
|
478
572
|
# Glossary Categories
|
479
573
|
#
|
480
|
-
async def _async_create_category(
|
481
|
-
|
482
|
-
|
574
|
+
async def _async_create_category(
|
575
|
+
self,
|
576
|
+
glossary_guid: str,
|
577
|
+
display_name: str,
|
578
|
+
description: str,
|
579
|
+
server_name: str = None,
|
580
|
+
) -> str:
|
581
|
+
"""Create a new category within the specified glossary. Async Version.
|
483
582
|
|
484
583
|
Parameters
|
485
584
|
----------
|
@@ -513,24 +612,30 @@ class GlossaryManager(GlossaryBrowser):
|
|
513
612
|
if server_name is None:
|
514
613
|
server_name = self.server_name
|
515
614
|
|
516
|
-
url = (
|
517
|
-
|
615
|
+
url = (
|
616
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-manager/glossaries/"
|
617
|
+
f"{glossary_guid}/categories"
|
618
|
+
)
|
518
619
|
body = {
|
519
620
|
"class": "ReferenceableRequestBody",
|
520
|
-
"elementProperties":
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
}
|
621
|
+
"elementProperties": {
|
622
|
+
"class": "GlossaryCategoryProperties",
|
623
|
+
"qualifiedName": f"GlossaryCategory-{display_name}-{time.asctime()}",
|
624
|
+
"displayName": display_name,
|
625
|
+
"description": description,
|
626
|
+
},
|
527
627
|
}
|
528
628
|
response = await self._async_make_request("POST", url, body)
|
529
629
|
return response.json().get("guid", None)
|
530
630
|
|
531
|
-
def create_category(
|
532
|
-
|
533
|
-
|
631
|
+
def create_category(
|
632
|
+
self,
|
633
|
+
glossary_guid: str,
|
634
|
+
display_name: str,
|
635
|
+
description: str,
|
636
|
+
server_name: str = None,
|
637
|
+
) -> str:
|
638
|
+
"""Create a new category within the specified glossary.
|
534
639
|
|
535
640
|
Parameters
|
536
641
|
----------
|
@@ -563,12 +668,19 @@ class GlossaryManager(GlossaryBrowser):
|
|
563
668
|
"""
|
564
669
|
loop = asyncio.get_event_loop()
|
565
670
|
response = loop.run_until_complete(
|
566
|
-
self._async_create_category(
|
671
|
+
self._async_create_category(
|
672
|
+
glossary_guid, display_name, description, server_name
|
673
|
+
)
|
674
|
+
)
|
567
675
|
return response
|
568
676
|
|
569
|
-
async def _async_get_glossary_for_category(
|
570
|
-
|
571
|
-
|
677
|
+
async def _async_get_glossary_for_category(
|
678
|
+
self,
|
679
|
+
glossary_category_guid: str,
|
680
|
+
effective_time: str = None,
|
681
|
+
server_name: str = None,
|
682
|
+
) -> dict | str:
|
683
|
+
"""Retrieve the glossary metadata element for the requested category. The optional request body allows you to
|
572
684
|
specify that the glossary element should only be returned if it was effective at a particular time.
|
573
685
|
|
574
686
|
Parameters
|
@@ -602,17 +714,26 @@ class GlossaryManager(GlossaryBrowser):
|
|
602
714
|
if server_name is None:
|
603
715
|
server_name = self.server_name
|
604
716
|
|
605
|
-
body = {
|
717
|
+
body = {
|
718
|
+
"class": "EffectiveTimeQueryRequestBody",
|
719
|
+
"effectiveTime": effective_time,
|
720
|
+
}
|
606
721
|
|
607
|
-
url = (
|
608
|
-
|
722
|
+
url = (
|
723
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-manager/glossaries/"
|
724
|
+
f"for-category/{glossary_category_guid}/retrieve"
|
725
|
+
)
|
609
726
|
|
610
727
|
response = await self._async_make_request("POST", url, body)
|
611
728
|
return response.json()
|
612
729
|
|
613
|
-
def get_glossary_for_category(
|
614
|
-
|
615
|
-
|
730
|
+
def get_glossary_for_category(
|
731
|
+
self,
|
732
|
+
glossary_category_guid: str,
|
733
|
+
effective_time: str = None,
|
734
|
+
server_name: str = None,
|
735
|
+
) -> dict | str:
|
736
|
+
"""Retrieve the glossary metadata element for the requested category. The optional request body allows you to
|
616
737
|
specify that the glossary element should only be returned if it was effective at a particular time.
|
617
738
|
|
618
739
|
Parameters
|
@@ -645,14 +766,24 @@ class GlossaryManager(GlossaryBrowser):
|
|
645
766
|
"""
|
646
767
|
loop = asyncio.get_event_loop()
|
647
768
|
response = loop.run_until_complete(
|
648
|
-
self._async_get_glossary_fpr_category(
|
769
|
+
self._async_get_glossary_fpr_category(
|
770
|
+
glossary_category_guid, effective_time, server_name
|
771
|
+
)
|
772
|
+
)
|
649
773
|
return response
|
650
774
|
|
651
|
-
async def _async_find_glossary_categories(
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
775
|
+
async def _async_find_glossary_categories(
|
776
|
+
self,
|
777
|
+
search_string: str,
|
778
|
+
effective_time: str = None,
|
779
|
+
starts_with: bool = False,
|
780
|
+
ends_with: bool = False,
|
781
|
+
ignore_case: bool = False,
|
782
|
+
server_name: str = None,
|
783
|
+
start_from: int = 0,
|
784
|
+
page_size: int = None,
|
785
|
+
) -> list | str:
|
786
|
+
"""Retrieve the list of glossary category metadata elements that contain the search string.
|
656
787
|
The search string is located in the request body and is interpreted as a plain string.
|
657
788
|
The request parameters, startsWith, endsWith and ignoreCase can be used to allow a fuzzy search.
|
658
789
|
Async version.
|
@@ -706,75 +837,103 @@ class GlossaryManager(GlossaryBrowser):
|
|
706
837
|
|
707
838
|
validate_search_string(search_string)
|
708
839
|
|
709
|
-
if search_string ==
|
840
|
+
if search_string == "*":
|
710
841
|
search_string = None
|
711
842
|
|
712
|
-
body = {
|
843
|
+
body = {
|
844
|
+
"class": "SearchStringRequestBody",
|
845
|
+
"searchString": search_string,
|
846
|
+
"effectiveTime": effective_time,
|
847
|
+
}
|
713
848
|
body = body_slimmer(body)
|
714
849
|
|
715
|
-
url = (
|
716
|
-
|
717
|
-
|
850
|
+
url = (
|
851
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-manager/glossaries/"
|
852
|
+
f"categories/by-search-string?startFrom={start_from}&pageSize={page_size}&startsWith={starts_with_s}&"
|
853
|
+
f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}"
|
854
|
+
)
|
718
855
|
|
719
856
|
response = await self._async_make_request("POST", url, body)
|
720
857
|
return response.json().get("elementList", "No Categories found")
|
721
858
|
|
722
|
-
def find_glossary_categories(
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
859
|
+
def find_glossary_categories(
|
860
|
+
self,
|
861
|
+
search_string: str,
|
862
|
+
effective_time: str = None,
|
863
|
+
starts_with: bool = False,
|
864
|
+
ends_with: bool = False,
|
865
|
+
ignore_case: bool = False,
|
866
|
+
server_name: str = None,
|
867
|
+
start_from: int = 0,
|
868
|
+
page_size: int = None,
|
869
|
+
) -> list | str:
|
870
|
+
"""Retrieve the list of glossary category metadata elements that contain the search string.
|
871
|
+
The search string is located in the request body and is interpreted as a plain string.
|
872
|
+
The request parameters, startsWith, endsWith and ignoreCase can be used to allow a fuzzy search.
|
728
873
|
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
874
|
+
Parameters
|
875
|
+
----------
|
876
|
+
search_string: str,
|
877
|
+
Search string to use to find matching glossaries. If the search string is '*' then all glossaries returned.
|
733
878
|
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
879
|
+
effective_time: str, [default=None], optional
|
880
|
+
Effective time of the query. If not specified will default to any time. Time format is
|
881
|
+
"YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
882
|
+
server_name : str, optional
|
883
|
+
The name of the server to configure.
|
884
|
+
If not provided, the server name associated with the instance is used.
|
885
|
+
starts_with : bool, [default=False], optional
|
886
|
+
Starts with the supplied string.
|
887
|
+
ends_with : bool, [default=False], optional
|
888
|
+
Ends with the supplied string
|
889
|
+
ignore_case : bool, [default=False], optional
|
890
|
+
Ignore case when searching
|
891
|
+
start_from: int, [default=0], optional
|
892
|
+
When multiple pages of results are available, the page number to start from.
|
893
|
+
page_size: int, [default=None]
|
894
|
+
The number of items to return in a single page. If not specified, the default will be taken from
|
895
|
+
the class instance.
|
896
|
+
Returns
|
897
|
+
-------
|
898
|
+
List | str
|
899
|
+
|
900
|
+
A list of glossary definitions active in the server.
|
901
|
+
|
902
|
+
Raises
|
903
|
+
------
|
904
|
+
|
905
|
+
InvalidParameterException
|
906
|
+
If the client passes incorrect parameters on the request - such as bad URLs or invalid values
|
907
|
+
PropertyServerException
|
908
|
+
Raised by the server when an issue arises in processing a valid request
|
909
|
+
NotAuthorizedException
|
910
|
+
The principle specified by the user_id does not have authorization for the requested action
|
911
|
+
|
912
|
+
"""
|
768
913
|
loop = asyncio.get_event_loop()
|
769
914
|
response = loop.run_until_complete(
|
770
|
-
self._async_find_glossary_categories(
|
771
|
-
|
915
|
+
self._async_find_glossary_categories(
|
916
|
+
search_string,
|
917
|
+
effective_time,
|
918
|
+
starts_with,
|
919
|
+
ends_with,
|
920
|
+
ignore_case,
|
921
|
+
server_name,
|
922
|
+
start_from,
|
923
|
+
page_size,
|
924
|
+
)
|
925
|
+
)
|
772
926
|
|
773
927
|
return response
|
774
928
|
|
775
|
-
async def _async_get_categories_for_glossary(
|
776
|
-
|
777
|
-
|
929
|
+
async def _async_get_categories_for_glossary(
|
930
|
+
self,
|
931
|
+
glossary_guid: str,
|
932
|
+
server_name: str = None,
|
933
|
+
start_from: int = 0,
|
934
|
+
page_size: int = None,
|
935
|
+
) -> list | str:
|
936
|
+
"""Return the list of categories associated with a glossary.
|
778
937
|
Async version.
|
779
938
|
|
780
939
|
Parameters
|
@@ -811,15 +970,22 @@ class GlossaryManager(GlossaryBrowser):
|
|
811
970
|
if page_size is None:
|
812
971
|
page_size = self.page_size
|
813
972
|
|
814
|
-
url = (
|
815
|
-
|
973
|
+
url = (
|
974
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-manager/glossaries/"
|
975
|
+
f"{glossary_guid}/categories/retrieve?startFrom={start_from}&pageSize={page_size}"
|
976
|
+
)
|
816
977
|
|
817
978
|
response = await self._async_make_request("POST", url)
|
818
979
|
return response.json().get("elementList", "No Categories found")
|
819
980
|
|
820
|
-
def get_categories_for_glossary(
|
821
|
-
|
822
|
-
|
981
|
+
def get_categories_for_glossary(
|
982
|
+
self,
|
983
|
+
glossary_guid: str,
|
984
|
+
server_name: str = None,
|
985
|
+
start_from: int = 0,
|
986
|
+
page_size: int = None,
|
987
|
+
) -> list | str:
|
988
|
+
"""Return the list of categories associated with a glossary.
|
823
989
|
|
824
990
|
Parameters
|
825
991
|
----------
|
@@ -852,12 +1018,20 @@ class GlossaryManager(GlossaryBrowser):
|
|
852
1018
|
"""
|
853
1019
|
loop = asyncio.get_event_loop()
|
854
1020
|
response = loop.run_until_complete(
|
855
|
-
self._async_get_categories_for_glossary(
|
1021
|
+
self._async_get_categories_for_glossary(
|
1022
|
+
glossary_guid, server_name, start_from, page_size
|
1023
|
+
)
|
1024
|
+
)
|
856
1025
|
return response
|
857
1026
|
|
858
|
-
async def _async_get_categories_for_term(
|
859
|
-
|
860
|
-
|
1027
|
+
async def _async_get_categories_for_term(
|
1028
|
+
self,
|
1029
|
+
glossary_term_guid: str,
|
1030
|
+
server_name: str = None,
|
1031
|
+
start_from: int = 0,
|
1032
|
+
page_size: int = None,
|
1033
|
+
) -> list | str:
|
1034
|
+
"""Return the list of categories associated with a glossary term.
|
861
1035
|
Async version.
|
862
1036
|
|
863
1037
|
Parameters
|
@@ -894,15 +1068,22 @@ class GlossaryManager(GlossaryBrowser):
|
|
894
1068
|
if page_size is None:
|
895
1069
|
page_size = self.page_size
|
896
1070
|
|
897
|
-
url = (
|
898
|
-
|
1071
|
+
url = (
|
1072
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-manager/glossaries/terms/"
|
1073
|
+
f"{glossary_term_guid}/categories/retrieve?startFrom={start_from}&pageSize={page_size}"
|
1074
|
+
)
|
899
1075
|
|
900
1076
|
response = await self._async_make_request("POST", url)
|
901
1077
|
return response.json().get("elementList", "No Categories found")
|
902
1078
|
|
903
|
-
def get_categories_for_term(
|
904
|
-
|
905
|
-
|
1079
|
+
def get_categories_for_term(
|
1080
|
+
self,
|
1081
|
+
glossary_term_guid: str,
|
1082
|
+
server_name: str = None,
|
1083
|
+
start_from: int = 0,
|
1084
|
+
page_size: int = None,
|
1085
|
+
) -> list | str:
|
1086
|
+
"""Return the list of categories associated with a glossary term.
|
906
1087
|
|
907
1088
|
Parameters
|
908
1089
|
----------
|
@@ -935,13 +1116,22 @@ class GlossaryManager(GlossaryBrowser):
|
|
935
1116
|
"""
|
936
1117
|
loop = asyncio.get_event_loop()
|
937
1118
|
response = loop.run_until_complete(
|
938
|
-
self._async_get_categories_for_term(
|
1119
|
+
self._async_get_categories_for_term(
|
1120
|
+
glossary_term_guid, server_name, start_from, page_size
|
1121
|
+
)
|
1122
|
+
)
|
939
1123
|
return response
|
940
1124
|
|
941
|
-
async def _async_get_categories_by_name(
|
942
|
-
|
943
|
-
|
944
|
-
|
1125
|
+
async def _async_get_categories_by_name(
|
1126
|
+
self,
|
1127
|
+
name: str,
|
1128
|
+
glossary_guid: str = None,
|
1129
|
+
status: [str] = ["ACTIVE"],
|
1130
|
+
server_name: str = None,
|
1131
|
+
start_from: int = 0,
|
1132
|
+
page_size: int = None,
|
1133
|
+
) -> list | str:
|
1134
|
+
"""Retrieve the list of glossary category metadata elements that either have the requested qualified name or display name.
|
945
1135
|
The name to search for is located in the request body and is interpreted as a plain string.
|
946
1136
|
The request body also supports the specification of a glossaryGUID to restrict the search to within a single glossary.
|
947
1137
|
|
@@ -986,18 +1176,31 @@ class GlossaryManager(GlossaryBrowser):
|
|
986
1176
|
page_size = self.page_size
|
987
1177
|
validate_name(name)
|
988
1178
|
|
989
|
-
url = (
|
990
|
-
|
1179
|
+
url = (
|
1180
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/categories/"
|
1181
|
+
f"by-name?startFrom={start_from}&pageSize={page_size}"
|
1182
|
+
)
|
991
1183
|
|
992
|
-
body = {
|
993
|
-
|
1184
|
+
body = {
|
1185
|
+
"class": "GlossaryNameRequestBody",
|
1186
|
+
"name": name,
|
1187
|
+
"glossaryGUID": glossary_guid,
|
1188
|
+
"limitResultsByStatus": status,
|
1189
|
+
}
|
994
1190
|
|
995
1191
|
response = await self._async_make_request("POST", url)
|
996
1192
|
return response.json().get("elementList", "No Categories found")
|
997
1193
|
|
998
|
-
def get_categories_by_name(
|
999
|
-
|
1000
|
-
|
1194
|
+
def get_categories_by_name(
|
1195
|
+
self,
|
1196
|
+
name: str,
|
1197
|
+
glossary_guid: str = None,
|
1198
|
+
status: [str] = ["ACTIVE"],
|
1199
|
+
server_name: str = None,
|
1200
|
+
start_from: int = 0,
|
1201
|
+
page_size: int = None,
|
1202
|
+
) -> list | str:
|
1203
|
+
"""Retrieve the list of glossary category metadata elements that either have the requested qualified name or display name.
|
1001
1204
|
The name to search for is located in the request body and is interpreted as a plain string.
|
1002
1205
|
The request body also supports the specification of a glossaryGUID to restrict the search to within a single glossary.
|
1003
1206
|
|
@@ -1036,12 +1239,19 @@ class GlossaryManager(GlossaryBrowser):
|
|
1036
1239
|
"""
|
1037
1240
|
loop = asyncio.get_event_loop()
|
1038
1241
|
response = loop.run_until_complete(
|
1039
|
-
self._async_get_categories_by_name(
|
1242
|
+
self._async_get_categories_by_name(
|
1243
|
+
name, glossary_guid, status, server_name, start_from, page_size
|
1244
|
+
)
|
1245
|
+
)
|
1040
1246
|
return response
|
1041
1247
|
|
1042
|
-
async def _async_get_categories_by_guid(
|
1043
|
-
|
1044
|
-
|
1248
|
+
async def _async_get_categories_by_guid(
|
1249
|
+
self,
|
1250
|
+
glossary_category_guid: str,
|
1251
|
+
effective_time: str = None,
|
1252
|
+
server_name: str = None,
|
1253
|
+
) -> list | str:
|
1254
|
+
"""Retrieve the requested glossary category metadata element. The optional request body contain an effective
|
1045
1255
|
time for the query..
|
1046
1256
|
|
1047
1257
|
Async version.
|
@@ -1077,17 +1287,26 @@ class GlossaryManager(GlossaryBrowser):
|
|
1077
1287
|
if server_name is None:
|
1078
1288
|
server_name = self.server_name
|
1079
1289
|
|
1080
|
-
url = (
|
1081
|
-
|
1290
|
+
url = (
|
1291
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/categories/"
|
1292
|
+
f"{glossary_category_guid}/retrieve"
|
1293
|
+
)
|
1082
1294
|
|
1083
|
-
body = {
|
1295
|
+
body = {
|
1296
|
+
"class": "EffectiveTimeQueryRequestBody",
|
1297
|
+
"effectiveTime": effective_time,
|
1298
|
+
}
|
1084
1299
|
|
1085
1300
|
response = await self._async_make_request("POST", url, body)
|
1086
1301
|
return response.json().get("element", "No Category found")
|
1087
1302
|
|
1088
|
-
def get_categories_by_guid(
|
1089
|
-
|
1090
|
-
|
1303
|
+
def get_categories_by_guid(
|
1304
|
+
self,
|
1305
|
+
glossary_category_guid: str,
|
1306
|
+
effective_time: str = None,
|
1307
|
+
server_name: str = None,
|
1308
|
+
) -> list | str:
|
1309
|
+
"""Retrieve the requested glossary category metadata element. The optional request body contain an effective
|
1091
1310
|
time for the query..
|
1092
1311
|
|
1093
1312
|
Parameters
|
@@ -1120,12 +1339,19 @@ class GlossaryManager(GlossaryBrowser):
|
|
1120
1339
|
"""
|
1121
1340
|
loop = asyncio.get_event_loop()
|
1122
1341
|
response = loop.run_until_complete(
|
1123
|
-
self._async_get_categories_by_guid(
|
1342
|
+
self._async_get_categories_by_guid(
|
1343
|
+
glossary_category_guid, effective_time, server_name
|
1344
|
+
)
|
1345
|
+
)
|
1124
1346
|
return response
|
1125
1347
|
|
1126
|
-
async def _async_get_category_parent(
|
1127
|
-
|
1128
|
-
|
1348
|
+
async def _async_get_category_parent(
|
1349
|
+
self,
|
1350
|
+
glossary_category_guid: str,
|
1351
|
+
effective_time: str = None,
|
1352
|
+
server_name: str = None,
|
1353
|
+
) -> list | str:
|
1354
|
+
"""Glossary categories can be organized in a hierarchy. Retrieve the parent glossary category metadata
|
1129
1355
|
element for the glossary category with the supplied unique identifier. If the requested category
|
1130
1356
|
does not have a parent category, null is returned. The optional request body contain an effective time
|
1131
1357
|
for the query.
|
@@ -1163,17 +1389,26 @@ class GlossaryManager(GlossaryBrowser):
|
|
1163
1389
|
if server_name is None:
|
1164
1390
|
server_name = self.server_name
|
1165
1391
|
|
1166
|
-
url = (
|
1167
|
-
|
1392
|
+
url = (
|
1393
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/categories/"
|
1394
|
+
f"{glossary_category_guid}/parent/retrieve"
|
1395
|
+
)
|
1168
1396
|
|
1169
|
-
body = {
|
1397
|
+
body = {
|
1398
|
+
"class": "EffectiveTimeQueryRequestBody",
|
1399
|
+
"effectiveTime": effective_time,
|
1400
|
+
}
|
1170
1401
|
|
1171
1402
|
response = await self._async_make_request("POST", url, body)
|
1172
1403
|
return response.json().get("element", "No Parent Category found")
|
1173
1404
|
|
1174
|
-
def get_category_parent(
|
1175
|
-
|
1176
|
-
|
1405
|
+
def get_category_parent(
|
1406
|
+
self,
|
1407
|
+
glossary_category_guid: str,
|
1408
|
+
effective_time: str = None,
|
1409
|
+
server_name: str = None,
|
1410
|
+
) -> list | str:
|
1411
|
+
"""Glossary categories can be organized in a hierarchy. Retrieve the parent glossary category metadata
|
1177
1412
|
element for the glossary category with the supplied unique identifier. If the requested category
|
1178
1413
|
does not have a parent category, null is returned. The optional request body contain an effective time
|
1179
1414
|
for the query.
|
@@ -1208,15 +1443,19 @@ class GlossaryManager(GlossaryBrowser):
|
|
1208
1443
|
"""
|
1209
1444
|
loop = asyncio.get_event_loop()
|
1210
1445
|
response = loop.run_until_complete(
|
1211
|
-
self._async_get_category_parent(
|
1446
|
+
self._async_get_category_parent(
|
1447
|
+
glossary_category_guid, effective_time, server_name
|
1448
|
+
)
|
1449
|
+
)
|
1212
1450
|
return response
|
1213
1451
|
|
1214
1452
|
#
|
1215
1453
|
# Terms
|
1216
1454
|
#
|
1217
|
-
async def _async_create_controlled_glossary_term(
|
1218
|
-
|
1219
|
-
|
1455
|
+
async def _async_create_controlled_glossary_term(
|
1456
|
+
self, glossary_guid: str, body: dict, server_name: str = None
|
1457
|
+
) -> str:
|
1458
|
+
"""Create a term for a controlled glossary.
|
1220
1459
|
See also: https://egeria-project.org/types/3/0385-Controlled-Glossary-Development/?h=controlled
|
1221
1460
|
The request body also supports the specification of an effective time for the query.
|
1222
1461
|
|
@@ -1277,16 +1516,19 @@ class GlossaryManager(GlossaryBrowser):
|
|
1277
1516
|
server_name = self.server_name
|
1278
1517
|
validate_guid(glossary_guid)
|
1279
1518
|
|
1280
|
-
url = (
|
1281
|
-
|
1282
|
-
|
1519
|
+
url = (
|
1520
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-manager/glossaries/"
|
1521
|
+
f"{glossary_guid}/terms/new-controlled"
|
1522
|
+
)
|
1283
1523
|
|
1284
1524
|
response = await self._async_make_request("POST", url, body)
|
1285
1525
|
|
1286
1526
|
return response.json().get("guid", "Term not created")
|
1287
1527
|
|
1288
|
-
def create_controlled_glossary_term(
|
1289
|
-
|
1528
|
+
def create_controlled_glossary_term(
|
1529
|
+
self, glossary_guid: str, body: dict, server_name: str = None
|
1530
|
+
) -> str:
|
1531
|
+
"""Create a term for a controlled glossary.
|
1290
1532
|
See also: https://egeria-project.org/types/3/0385-Controlled-Glossary-Development/?h=controlled
|
1291
1533
|
The request body also supports the specification of an effective time for the query.
|
1292
1534
|
|
@@ -1342,13 +1584,23 @@ class GlossaryManager(GlossaryBrowser):
|
|
1342
1584
|
"""
|
1343
1585
|
loop = asyncio.get_event_loop()
|
1344
1586
|
response = loop.run_until_complete(
|
1345
|
-
self._async_create_controlled_glossary_term(
|
1587
|
+
self._async_create_controlled_glossary_term(
|
1588
|
+
glossary_guid, body, server_name
|
1589
|
+
)
|
1590
|
+
)
|
1346
1591
|
|
1347
1592
|
return response
|
1348
1593
|
|
1349
|
-
async def _async_create_term_copy(
|
1350
|
-
|
1351
|
-
|
1594
|
+
async def _async_create_term_copy(
|
1595
|
+
self,
|
1596
|
+
glossary_guid: str,
|
1597
|
+
glossary_term_guid: str,
|
1598
|
+
new_display_name: str,
|
1599
|
+
version_id: str,
|
1600
|
+
term_status: str = "PROPOSED",
|
1601
|
+
server_name: str = None,
|
1602
|
+
) -> str:
|
1603
|
+
"""Create a new term from an existing term.
|
1352
1604
|
|
1353
1605
|
Async Version.
|
1354
1606
|
|
@@ -1391,29 +1643,36 @@ class GlossaryManager(GlossaryBrowser):
|
|
1391
1643
|
validate_guid(glossary_guid)
|
1392
1644
|
validate_guid(glossary_term_guid)
|
1393
1645
|
|
1394
|
-
url = (
|
1395
|
-
|
1396
|
-
|
1646
|
+
url = (
|
1647
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-manager/glossaries/"
|
1648
|
+
f"{glossary_guid}/terms/from-template/{glossary_term_guid}"
|
1649
|
+
)
|
1397
1650
|
|
1398
1651
|
body = {
|
1399
1652
|
"class": "GlossaryTemplateRequestBody",
|
1400
|
-
"elementProperties":
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
"glossaryTermStatus": term_status
|
1653
|
+
"elementProperties": {
|
1654
|
+
"class": "TemplateProperties",
|
1655
|
+
"qualifiedName": f"Term-{new_display_name}-{time.asctime()}",
|
1656
|
+
"displayName": new_display_name,
|
1657
|
+
"versionIdentifier": version_id,
|
1658
|
+
},
|
1659
|
+
"glossaryTermStatus": term_status,
|
1408
1660
|
}
|
1409
1661
|
|
1410
1662
|
response = await self._async_make_request("POST", url, body)
|
1411
1663
|
|
1412
1664
|
return response.json().get("guid", "Term not created")
|
1413
1665
|
|
1414
|
-
def create_term_copy(
|
1415
|
-
|
1416
|
-
|
1666
|
+
def create_term_copy(
|
1667
|
+
self,
|
1668
|
+
glossary_guid: str,
|
1669
|
+
glossary_term_guid: str,
|
1670
|
+
new_display_name: str,
|
1671
|
+
version_id: str,
|
1672
|
+
term_status: str = "PROPOSED",
|
1673
|
+
server_name: str = None,
|
1674
|
+
) -> str:
|
1675
|
+
"""Create a new term from an existing term.
|
1417
1676
|
|
1418
1677
|
Parameters
|
1419
1678
|
----------
|
@@ -1450,14 +1709,22 @@ class GlossaryManager(GlossaryBrowser):
|
|
1450
1709
|
"""
|
1451
1710
|
loop = asyncio.get_event_loop()
|
1452
1711
|
response = loop.run_until_complete(
|
1453
|
-
self._async_create_term_copy(
|
1454
|
-
|
1712
|
+
self._async_create_term_copy(
|
1713
|
+
glossary_guid,
|
1714
|
+
glossary_term_guid,
|
1715
|
+
new_display_name,
|
1716
|
+
version_id,
|
1717
|
+
term_status,
|
1718
|
+
server_name,
|
1719
|
+
)
|
1720
|
+
)
|
1455
1721
|
|
1456
1722
|
return response
|
1457
1723
|
|
1458
|
-
async def _async_add_data_field_to_term(
|
1459
|
-
|
1460
|
-
|
1724
|
+
async def _async_add_data_field_to_term(
|
1725
|
+
self, glossary_term_guid: str, body: dict, server_name: str = None
|
1726
|
+
) -> None:
|
1727
|
+
"""Add the data field values classification to a glossary term
|
1461
1728
|
|
1462
1729
|
Async Version.
|
1463
1730
|
|
@@ -1506,15 +1773,18 @@ class GlossaryManager(GlossaryBrowser):
|
|
1506
1773
|
server_name = self.server_name
|
1507
1774
|
validate_guid(glossary_term_guid)
|
1508
1775
|
|
1509
|
-
url = (
|
1510
|
-
|
1511
|
-
|
1776
|
+
url = (
|
1777
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-manager/glossaries/"
|
1778
|
+
f"terms/{glossary_term_guid}/is-data-field"
|
1779
|
+
)
|
1512
1780
|
|
1513
1781
|
await self._async_make_request("POST", url, body)
|
1514
1782
|
return
|
1515
1783
|
|
1516
|
-
def add_data_field_to_term(
|
1517
|
-
|
1784
|
+
def add_data_field_to_term(
|
1785
|
+
self, glossary_term_guid: str, body: dict, server_name: str = None
|
1786
|
+
) -> None:
|
1787
|
+
"""Add the data field values classification to a glossary term
|
1518
1788
|
|
1519
1789
|
Parameters
|
1520
1790
|
----------
|
@@ -1556,13 +1826,18 @@ class GlossaryManager(GlossaryBrowser):
|
|
1556
1826
|
"""
|
1557
1827
|
loop = asyncio.get_event_loop()
|
1558
1828
|
loop.run_until_complete(
|
1559
|
-
self._async_add_data_field_to_term(glossary_term_guid, body, server_name)
|
1829
|
+
self._async_add_data_field_to_term(glossary_term_guid, body, server_name)
|
1830
|
+
)
|
1560
1831
|
|
1561
1832
|
return
|
1562
1833
|
|
1563
|
-
async def _async_add_confidentiality_to_term(
|
1564
|
-
|
1565
|
-
|
1834
|
+
async def _async_add_confidentiality_to_term(
|
1835
|
+
self,
|
1836
|
+
glossary_term_guid: str,
|
1837
|
+
confidentiality_level: int,
|
1838
|
+
server_name: str = None,
|
1839
|
+
) -> None:
|
1840
|
+
"""Add the confidentiality classification to a glossary term
|
1566
1841
|
|
1567
1842
|
Async Version.
|
1568
1843
|
|
@@ -1599,25 +1874,29 @@ class GlossaryManager(GlossaryBrowser):
|
|
1599
1874
|
server_name = self.server_name
|
1600
1875
|
validate_guid(glossary_term_guid)
|
1601
1876
|
|
1602
|
-
url = (
|
1603
|
-
|
1604
|
-
|
1877
|
+
url = (
|
1878
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-manager/elements/"
|
1879
|
+
f"{glossary_term_guid}/confidentiality"
|
1880
|
+
)
|
1605
1881
|
|
1606
1882
|
body = {
|
1607
1883
|
"class": "ClassificationRequestBody",
|
1608
|
-
"properties":
|
1609
|
-
|
1610
|
-
|
1611
|
-
|
1612
|
-
}
|
1884
|
+
"properties": {
|
1885
|
+
"class": "GovernanceClassificationProperties",
|
1886
|
+
"levelIdentifier": confidentiality_level,
|
1887
|
+
},
|
1613
1888
|
}
|
1614
1889
|
|
1615
1890
|
await self._async_make_request("POST", url, body)
|
1616
1891
|
return
|
1617
1892
|
|
1618
|
-
def add_confidentiality_to_term(
|
1619
|
-
|
1620
|
-
|
1893
|
+
def add_confidentiality_to_term(
|
1894
|
+
self,
|
1895
|
+
glossary_term_guid: str,
|
1896
|
+
confidentiality_level: int,
|
1897
|
+
server_name: str = None,
|
1898
|
+
) -> str:
|
1899
|
+
"""Add the confidentiality classification to a glossary term
|
1621
1900
|
|
1622
1901
|
Parameters
|
1623
1902
|
----------
|
@@ -1649,14 +1928,17 @@ class GlossaryManager(GlossaryBrowser):
|
|
1649
1928
|
"""
|
1650
1929
|
loop = asyncio.get_event_loop()
|
1651
1930
|
response = loop.run_until_complete(
|
1652
|
-
self._async_add_confidentiality_to_term(
|
1653
|
-
|
1931
|
+
self._async_add_confidentiality_to_term(
|
1932
|
+
glossary_term_guid, confidentiality_level, server_name
|
1933
|
+
)
|
1934
|
+
)
|
1654
1935
|
|
1655
1936
|
return
|
1656
1937
|
|
1657
|
-
async def _async_add_subject_area_to_term(
|
1658
|
-
|
1659
|
-
|
1938
|
+
async def _async_add_subject_area_to_term(
|
1939
|
+
self, glossary_term_guid: str, subject_area: str, server_name: str = None
|
1940
|
+
) -> None:
|
1941
|
+
"""Add the confidentiality classification to a glossary term
|
1660
1942
|
|
1661
1943
|
Async Version.
|
1662
1944
|
|
@@ -1693,24 +1975,26 @@ class GlossaryManager(GlossaryBrowser):
|
|
1693
1975
|
server_name = self.server_name
|
1694
1976
|
validate_guid(glossary_term_guid)
|
1695
1977
|
|
1696
|
-
url = (
|
1697
|
-
|
1698
|
-
|
1978
|
+
url = (
|
1979
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-manager/elements/"
|
1980
|
+
f"{glossary_term_guid}/subject-area-member"
|
1981
|
+
)
|
1699
1982
|
|
1700
1983
|
body = {
|
1701
1984
|
"class": "ClassificationRequestBody",
|
1702
|
-
"properties":
|
1703
|
-
|
1704
|
-
|
1705
|
-
|
1706
|
-
}
|
1985
|
+
"properties": {
|
1986
|
+
"class": "SubjectAreaMemberProperties",
|
1987
|
+
"subjectAreaName": subject_area,
|
1988
|
+
},
|
1707
1989
|
}
|
1708
1990
|
|
1709
1991
|
await self._async_make_request("POST", url, body)
|
1710
1992
|
return
|
1711
1993
|
|
1712
|
-
def add_subject_area_to_term(
|
1713
|
-
|
1994
|
+
def add_subject_area_to_term(
|
1995
|
+
self, glossary_term_guid: str, subject_area: str, server_name: str = None
|
1996
|
+
) -> None:
|
1997
|
+
"""Add the confidentiality classification to a glossary term
|
1714
1998
|
|
1715
1999
|
Parameters
|
1716
2000
|
----------
|
@@ -1742,14 +2026,21 @@ class GlossaryManager(GlossaryBrowser):
|
|
1742
2026
|
"""
|
1743
2027
|
loop = asyncio.get_event_loop()
|
1744
2028
|
response = loop.run_until_complete(
|
1745
|
-
self._async_add_subject_area_to_term(
|
1746
|
-
|
2029
|
+
self._async_add_subject_area_to_term(
|
2030
|
+
glossary_term_guid, subject_area, server_name
|
2031
|
+
)
|
2032
|
+
)
|
1747
2033
|
|
1748
2034
|
return
|
1749
2035
|
|
1750
|
-
async def _async_update_term(
|
1751
|
-
|
1752
|
-
|
2036
|
+
async def _async_update_term(
|
2037
|
+
self,
|
2038
|
+
glossary_term_guid: str,
|
2039
|
+
body: dict,
|
2040
|
+
is_merge_update: bool,
|
2041
|
+
server_name: str = None,
|
2042
|
+
) -> None:
|
2043
|
+
"""Add the data field values classification to a glossary term
|
1753
2044
|
|
1754
2045
|
Async Version.
|
1755
2046
|
|
@@ -1801,14 +2092,19 @@ class GlossaryManager(GlossaryBrowser):
|
|
1801
2092
|
url = (
|
1802
2093
|
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-manager/terms/{glossary_term_guid}/"
|
1803
2094
|
f"update?isMergeUpdate={is_merge_update_s}"
|
1804
|
-
|
2095
|
+
)
|
1805
2096
|
|
1806
2097
|
await self._async_make_request("POST", url, body)
|
1807
2098
|
return
|
1808
2099
|
|
1809
|
-
def update_term(
|
1810
|
-
|
1811
|
-
|
2100
|
+
def update_term(
|
2101
|
+
self,
|
2102
|
+
glossary_term_guid: str,
|
2103
|
+
body: dict,
|
2104
|
+
is_merge_update: bool,
|
2105
|
+
server_name: str = None,
|
2106
|
+
) -> None:
|
2107
|
+
"""Add the data field values classification to a glossary term
|
1812
2108
|
|
1813
2109
|
Async Version.
|
1814
2110
|
|
@@ -1853,13 +2149,20 @@ class GlossaryManager(GlossaryBrowser):
|
|
1853
2149
|
"""
|
1854
2150
|
loop = asyncio.get_event_loop()
|
1855
2151
|
loop.run_until_complete(
|
1856
|
-
self._async_update_term(
|
2152
|
+
self._async_update_term(
|
2153
|
+
glossary_term_guid, body, is_merge_update, server_name
|
2154
|
+
)
|
2155
|
+
)
|
1857
2156
|
|
1858
2157
|
return
|
1859
2158
|
|
1860
|
-
async def _async_update_term_version_id(
|
1861
|
-
|
1862
|
-
|
2159
|
+
async def _async_update_term_version_id(
|
2160
|
+
self,
|
2161
|
+
glossary_term_guid: str,
|
2162
|
+
new_version_identifier: str,
|
2163
|
+
server_name: str = None,
|
2164
|
+
) -> None:
|
2165
|
+
"""Update a glossary term's version identifier
|
1863
2166
|
|
1864
2167
|
Async Version.
|
1865
2168
|
|
@@ -1898,22 +2201,25 @@ class GlossaryManager(GlossaryBrowser):
|
|
1898
2201
|
url = (
|
1899
2202
|
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-manager/terms/{glossary_term_guid}/"
|
1900
2203
|
f"update?isMergeUpdate=true"
|
1901
|
-
|
2204
|
+
)
|
1902
2205
|
|
1903
2206
|
body = {
|
1904
2207
|
"class": "ReferenceableRequestBody",
|
1905
|
-
"elementProperties":
|
1906
|
-
|
1907
|
-
|
1908
|
-
|
1909
|
-
}
|
2208
|
+
"elementProperties": {
|
2209
|
+
"class": "GlossaryTermProperties",
|
2210
|
+
"publishVersionIdentifier": new_version_identifier,
|
2211
|
+
},
|
1910
2212
|
}
|
1911
2213
|
await self._async_make_request("POST", url, body)
|
1912
2214
|
return
|
1913
2215
|
|
1914
|
-
def update_term_version_id(
|
1915
|
-
|
1916
|
-
|
2216
|
+
def update_term_version_id(
|
2217
|
+
self,
|
2218
|
+
glossary_term_guid: str,
|
2219
|
+
new_version_identifier: str,
|
2220
|
+
server_name: str = None,
|
2221
|
+
) -> None:
|
2222
|
+
"""Update a glossary term's version identifier
|
1917
2223
|
|
1918
2224
|
Async Version.
|
1919
2225
|
|
@@ -1946,14 +2252,22 @@ class GlossaryManager(GlossaryBrowser):
|
|
1946
2252
|
"""
|
1947
2253
|
loop = asyncio.get_event_loop()
|
1948
2254
|
loop.run_until_complete(
|
1949
|
-
self._async_update_term_version_id(
|
2255
|
+
self._async_update_term_version_id(
|
2256
|
+
glossary_term_guid, new_version_identifier, server_name
|
2257
|
+
)
|
2258
|
+
)
|
1950
2259
|
|
1951
2260
|
return
|
1952
2261
|
|
1953
|
-
async def _async_get_terms_for_category(
|
1954
|
-
|
1955
|
-
|
1956
|
-
|
2262
|
+
async def _async_get_terms_for_category(
|
2263
|
+
self,
|
2264
|
+
glossary_category_guid: str,
|
2265
|
+
server_name: str = None,
|
2266
|
+
effective_time: str = None,
|
2267
|
+
start_from: int = 0,
|
2268
|
+
page_size: int = None,
|
2269
|
+
) -> list | str:
|
2270
|
+
"""Retrieve ALL the glossary terms in a category.
|
1957
2271
|
The request body also supports the specification of an effective time for the query.
|
1958
2272
|
|
1959
2273
|
Async Version.
|
@@ -1996,8 +2310,10 @@ class GlossaryManager(GlossaryBrowser):
|
|
1996
2310
|
if page_size is None:
|
1997
2311
|
page_size = self.page_size
|
1998
2312
|
|
1999
|
-
url = (
|
2000
|
-
|
2313
|
+
url = (
|
2314
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/terms/"
|
2315
|
+
f"{glossary_category_guid}/terms/retrieve?startFrom={start_from}&pageSize={page_size}"
|
2316
|
+
)
|
2001
2317
|
|
2002
2318
|
if effective_time is not None:
|
2003
2319
|
body = {"effectiveTime": effective_time}
|
@@ -2007,10 +2323,15 @@ class GlossaryManager(GlossaryBrowser):
|
|
2007
2323
|
|
2008
2324
|
return response.json().get("elementList", "No terms found")
|
2009
2325
|
|
2010
|
-
def get_terms_for_category(
|
2011
|
-
|
2012
|
-
|
2013
|
-
|
2326
|
+
def get_terms_for_category(
|
2327
|
+
self,
|
2328
|
+
glossary_category_guid: str,
|
2329
|
+
server_name: str = None,
|
2330
|
+
effective_time: str = None,
|
2331
|
+
start_from: int = 0,
|
2332
|
+
page_size: int = None,
|
2333
|
+
) -> list | str:
|
2334
|
+
"""Retrieve ALL the glossary terms in a category.
|
2014
2335
|
The request body also supports the specification of an effective time for the query.
|
2015
2336
|
|
2016
2337
|
Async Version.
|
@@ -2047,15 +2368,26 @@ class GlossaryManager(GlossaryBrowser):
|
|
2047
2368
|
"""
|
2048
2369
|
loop = asyncio.get_event_loop()
|
2049
2370
|
response = loop.run_until_complete(
|
2050
|
-
self._async_get_terms_for_category(
|
2051
|
-
|
2371
|
+
self._async_get_terms_for_category(
|
2372
|
+
glossary_category_guid,
|
2373
|
+
server_name,
|
2374
|
+
effective_time,
|
2375
|
+
start_from,
|
2376
|
+
page_size,
|
2377
|
+
)
|
2378
|
+
)
|
2052
2379
|
|
2053
2380
|
return response
|
2054
2381
|
|
2055
|
-
async def _async_get_terms_for_glossary(
|
2056
|
-
|
2057
|
-
|
2058
|
-
|
2382
|
+
async def _async_get_terms_for_glossary(
|
2383
|
+
self,
|
2384
|
+
glossary_guid: str,
|
2385
|
+
server_name: str = None,
|
2386
|
+
effective_time: str = None,
|
2387
|
+
start_from: int = 0,
|
2388
|
+
page_size: int = None,
|
2389
|
+
) -> list | str:
|
2390
|
+
"""Retrieve the list of glossary terms associated with a glossary.
|
2059
2391
|
The request body also supports the specification of an effective time for the query.
|
2060
2392
|
Parameters
|
2061
2393
|
----------
|
@@ -2095,8 +2427,10 @@ class GlossaryManager(GlossaryBrowser):
|
|
2095
2427
|
if page_size is None:
|
2096
2428
|
page_size = self.page_size
|
2097
2429
|
|
2098
|
-
url = (
|
2099
|
-
|
2430
|
+
url = (
|
2431
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/"
|
2432
|
+
f"{glossary_guid}/terms/retrieve?startFrom={start_from}&pageSize={page_size}"
|
2433
|
+
)
|
2100
2434
|
|
2101
2435
|
if effective_time is not None:
|
2102
2436
|
body = {"effectiveTime": effective_time}
|
@@ -2106,9 +2440,15 @@ class GlossaryManager(GlossaryBrowser):
|
|
2106
2440
|
|
2107
2441
|
return response.json().get("elementList", "No terms found")
|
2108
2442
|
|
2109
|
-
def get_terms_for_glossary(
|
2110
|
-
|
2111
|
-
|
2443
|
+
def get_terms_for_glossary(
|
2444
|
+
self,
|
2445
|
+
glossary_guid: str,
|
2446
|
+
server_name: str = None,
|
2447
|
+
effective_time: str = None,
|
2448
|
+
start_from: int = 0,
|
2449
|
+
page_size: int = None,
|
2450
|
+
) -> list | str:
|
2451
|
+
"""Retrieve the list of glossary terms associated with a glossary.
|
2112
2452
|
The request body also supports the specification of an effective time for the query.
|
2113
2453
|
Parameters
|
2114
2454
|
----------
|
@@ -2142,15 +2482,22 @@ class GlossaryManager(GlossaryBrowser):
|
|
2142
2482
|
"""
|
2143
2483
|
loop = asyncio.get_event_loop()
|
2144
2484
|
response = loop.run_until_complete(
|
2145
|
-
self._async_get_terms_for_glossary(
|
2485
|
+
self._async_get_terms_for_glossary(
|
2486
|
+
glossary_guid, server_name, effective_time, start_from, page_size
|
2487
|
+
)
|
2488
|
+
)
|
2146
2489
|
|
2147
2490
|
return response
|
2148
2491
|
|
2149
|
-
async def _async_get_term_relationships(
|
2150
|
-
|
2151
|
-
|
2152
|
-
|
2153
|
-
|
2492
|
+
async def _async_get_term_relationships(
|
2493
|
+
self,
|
2494
|
+
term_guid: str,
|
2495
|
+
server_name: str = None,
|
2496
|
+
effective_time: str = None,
|
2497
|
+
start_from: int = 0,
|
2498
|
+
page_size: int = None,
|
2499
|
+
) -> list | str:
|
2500
|
+
"""This call retrieves details of the glossary terms linked to this glossary term.
|
2154
2501
|
Notice the original org 1 glossary term is linked via the "SourcedFrom" relationship..
|
2155
2502
|
Parameters
|
2156
2503
|
----------
|
@@ -2190,8 +2537,10 @@ class GlossaryManager(GlossaryBrowser):
|
|
2190
2537
|
if page_size is None:
|
2191
2538
|
page_size = self.page_size
|
2192
2539
|
|
2193
|
-
url = (
|
2194
|
-
|
2540
|
+
url = (
|
2541
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/terms/"
|
2542
|
+
f"{term_guid}/related-terms?startFrom={start_from}&pageSize={page_size}"
|
2543
|
+
)
|
2195
2544
|
|
2196
2545
|
if effective_time is not None:
|
2197
2546
|
body = {"effectiveTime": effective_time}
|
@@ -2201,10 +2550,15 @@ class GlossaryManager(GlossaryBrowser):
|
|
2201
2550
|
|
2202
2551
|
return response.json().get("elementList", "No terms found")
|
2203
2552
|
|
2204
|
-
def get_term_relationships(
|
2205
|
-
|
2206
|
-
|
2207
|
-
|
2553
|
+
def get_term_relationships(
|
2554
|
+
self,
|
2555
|
+
term_guid: str,
|
2556
|
+
server_name: str = None,
|
2557
|
+
effective_time: str = None,
|
2558
|
+
start_from: int = 0,
|
2559
|
+
page_size: int = None,
|
2560
|
+
) -> list | str:
|
2561
|
+
"""This call retrieves details of the glossary terms linked to this glossary term.
|
2208
2562
|
Notice the original org 1 glossary term is linked via the "SourcedFrom" relationship..
|
2209
2563
|
Parameters
|
2210
2564
|
----------
|
@@ -2238,13 +2592,17 @@ class GlossaryManager(GlossaryBrowser):
|
|
2238
2592
|
"""
|
2239
2593
|
loop = asyncio.get_event_loop()
|
2240
2594
|
response = loop.run_until_complete(
|
2241
|
-
self._async_get_term_relationships(
|
2595
|
+
self._async_get_term_relationships(
|
2596
|
+
term_guid, server_name, effective_time, start_from, page_size
|
2597
|
+
)
|
2598
|
+
)
|
2242
2599
|
|
2243
2600
|
return response
|
2244
2601
|
|
2245
|
-
async def _async_get_glossary_for_term(
|
2246
|
-
|
2247
|
-
|
2602
|
+
async def _async_get_glossary_for_term(
|
2603
|
+
self, term_guid: str, server_name: str = None, effective_time: str = None
|
2604
|
+
) -> dict | str:
|
2605
|
+
"""Retrieve the glossary metadata element for the requested term. The optional request body allows you to specify
|
2248
2606
|
that the glossary element should only be returned if it was effective at a particular time.
|
2249
2607
|
|
2250
2608
|
Async Version.
|
@@ -2278,16 +2636,22 @@ class GlossaryManager(GlossaryBrowser):
|
|
2278
2636
|
server_name = self.server_name
|
2279
2637
|
validate_guid(term_guid)
|
2280
2638
|
|
2281
|
-
body = {
|
2282
|
-
|
2283
|
-
|
2639
|
+
body = {
|
2640
|
+
"class": "EffectiveTimeQueryRequestBody",
|
2641
|
+
"effectiveTime": effective_time,
|
2642
|
+
}
|
2643
|
+
url = (
|
2644
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/"
|
2645
|
+
f"for-term/{term_guid}/retrieve"
|
2646
|
+
)
|
2284
2647
|
|
2285
2648
|
response = await self._async_make_request("POST", url, body)
|
2286
2649
|
return response.json().get("element", "No glossary found")
|
2287
2650
|
|
2288
|
-
def get_glossary_for_term(
|
2289
|
-
|
2290
|
-
|
2651
|
+
def get_glossary_for_term(
|
2652
|
+
self, term_guid: str, server_name: str = None, effective_time: str = None
|
2653
|
+
) -> dict | str:
|
2654
|
+
"""Retrieve the glossary metadata element for the requested term. The optional request body allows you to specify
|
2291
2655
|
that the glossary element should only be returned if it was effective at a particular time.
|
2292
2656
|
|
2293
2657
|
Async Version.
|
@@ -2318,14 +2682,24 @@ class GlossaryManager(GlossaryBrowser):
|
|
2318
2682
|
-----
|
2319
2683
|
"""
|
2320
2684
|
loop = asyncio.get_event_loop()
|
2321
|
-
response = loop.run_until_complete(
|
2685
|
+
response = loop.run_until_complete(
|
2686
|
+
self._async_get_glossary_for_term(term_guid, server_name, effective_time)
|
2687
|
+
)
|
2322
2688
|
return response
|
2323
2689
|
|
2324
|
-
async def _async_get_terms_by_name(
|
2325
|
-
|
2326
|
-
|
2327
|
-
|
2328
|
-
|
2690
|
+
async def _async_get_terms_by_name(
|
2691
|
+
self,
|
2692
|
+
term: str,
|
2693
|
+
glossary_guid: str = None,
|
2694
|
+
status_filter: list = [],
|
2695
|
+
server_name: str = None,
|
2696
|
+
effective_time: str = None,
|
2697
|
+
for_lineage: bool = False,
|
2698
|
+
for_duplicate_processing: bool = False,
|
2699
|
+
start_from: int = 0,
|
2700
|
+
page_size: int = None,
|
2701
|
+
) -> list:
|
2702
|
+
"""Retrieve glossary terms by display name or qualified name. Async Version.
|
2329
2703
|
|
2330
2704
|
Parameters
|
2331
2705
|
----------
|
@@ -2373,69 +2747,97 @@ class GlossaryManager(GlossaryBrowser):
|
|
2373
2747
|
for_lineage_s = str(for_lineage).lower()
|
2374
2748
|
for_duplicate_processing_s = str(for_duplicate_processing).lower()
|
2375
2749
|
|
2376
|
-
body = {
|
2377
|
-
|
2750
|
+
body = {
|
2751
|
+
"class": "GlossaryNameRequestBody",
|
2752
|
+
"glossaryGUID": glossary_guid,
|
2753
|
+
"name": term,
|
2754
|
+
"effectiveTime": effective_time,
|
2755
|
+
"limitResultsByStatus": status_filter,
|
2756
|
+
}
|
2378
2757
|
# body = body_slimmer(body)
|
2379
2758
|
|
2380
|
-
url = (
|
2381
|
-
|
2382
|
-
|
2759
|
+
url = (
|
2760
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/"
|
2761
|
+
f"terms/by-name?startFrom={start_from}&pageSize={page_size}&"
|
2762
|
+
f"&forLineage={for_lineage_s}&forDuplicateProcessing={for_duplicate_processing_s}"
|
2763
|
+
)
|
2383
2764
|
|
2384
2765
|
# print(f"\n\nURL is: \n {url}\n\nBody is: \n{body}")
|
2385
2766
|
|
2386
2767
|
response = await self._async_make_request("POST", url, body)
|
2387
2768
|
return response.json().get("elementList", "No terms found")
|
2388
2769
|
|
2389
|
-
def get_terms_by_name(
|
2390
|
-
|
2391
|
-
|
2392
|
-
|
2393
|
-
|
2394
|
-
|
2395
|
-
|
2396
|
-
|
2397
|
-
|
2398
|
-
|
2399
|
-
|
2400
|
-
|
2401
|
-
|
2402
|
-
|
2403
|
-
|
2404
|
-
|
2405
|
-
|
2406
|
-
|
2407
|
-
|
2408
|
-
|
2409
|
-
|
2410
|
-
|
2411
|
-
|
2412
|
-
|
2413
|
-
|
2414
|
-
|
2415
|
-
|
2416
|
-
|
2417
|
-
|
2418
|
-
|
2419
|
-
|
2420
|
-
|
2421
|
-
|
2422
|
-
|
2423
|
-
|
2424
|
-
|
2425
|
-
|
2426
|
-
|
2427
|
-
|
2428
|
-
|
2429
|
-
|
2430
|
-
|
2770
|
+
def get_terms_by_name(
|
2771
|
+
self,
|
2772
|
+
term: str,
|
2773
|
+
glossary_guid: str = None,
|
2774
|
+
status_filter: list = [],
|
2775
|
+
server_name: str = None,
|
2776
|
+
effective_time: str = None,
|
2777
|
+
for_lineage: bool = False,
|
2778
|
+
for_duplicate_processing: bool = False,
|
2779
|
+
start_from: int = 0,
|
2780
|
+
page_size: int = None,
|
2781
|
+
) -> list:
|
2782
|
+
"""Retrieve glossary terms by display name or qualified name.
|
2783
|
+
|
2784
|
+
Parameters
|
2785
|
+
----------
|
2786
|
+
term : str
|
2787
|
+
The term to search for in the glossaries.
|
2788
|
+
glossary_guid : str, optional
|
2789
|
+
The GUID of the glossary to search in. If not provided, the search will be performed in all glossaries.
|
2790
|
+
status_filter : list, optional
|
2791
|
+
A list of status values to filter the search results. Default is an empty list, which means no filtering.
|
2792
|
+
server_name : str, optional
|
2793
|
+
The name of the server where the glossaries reside. If not provided, it will use the default server name.
|
2794
|
+
effective_time : datetime, optional
|
2795
|
+
If specified, the term information will be retrieved if it is active at the `effective_time`.
|
2796
|
+
Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
2797
|
+
for_lineage : bool, optional
|
2798
|
+
Flag to indicate whether the search should include lineage information. Default is False.
|
2799
|
+
for_duplicate_processing : bool, optional
|
2800
|
+
Flag to indicate whether the search should include duplicate processing information. Default is False.
|
2801
|
+
start_from : int, optional
|
2802
|
+
The index of the first term to retrieve. Default is 0.
|
2803
|
+
page_size : int, optional
|
2804
|
+
The number of terms to retrieve per page. If not provided, it will use the default page size.
|
2805
|
+
|
2806
|
+
Returns
|
2807
|
+
-------
|
2808
|
+
list
|
2809
|
+
A list of terms matching the search criteria. If no terms are found,
|
2810
|
+
it returns the string "No terms found".
|
2811
|
+
|
2812
|
+
Raises
|
2813
|
+
------
|
2814
|
+
InvalidParameterException
|
2815
|
+
If the client passes incorrect parameters on the request - such as bad URLs or invalid values.
|
2816
|
+
PropertyServerException
|
2817
|
+
Raised by the server when an issue arises in processing a valid request.
|
2818
|
+
NotAuthorizedException
|
2819
|
+
The principle specified by the user_id does not have authorization for the requested action.
|
2820
|
+
"""
|
2431
2821
|
loop = asyncio.get_event_loop()
|
2432
2822
|
response = loop.run_until_complete(
|
2433
|
-
self._async_get_terms_by_name(
|
2434
|
-
|
2823
|
+
self._async_get_terms_by_name(
|
2824
|
+
term,
|
2825
|
+
glossary_guid,
|
2826
|
+
status_filter,
|
2827
|
+
server_name,
|
2828
|
+
effective_time,
|
2829
|
+
for_lineage,
|
2830
|
+
for_duplicate_processing,
|
2831
|
+
start_from,
|
2832
|
+
page_size,
|
2833
|
+
)
|
2834
|
+
)
|
2435
2835
|
return response
|
2436
2836
|
|
2437
|
-
async def _async_get_terms_by_guid(
|
2438
|
-
|
2837
|
+
async def _async_get_terms_by_guid(
|
2838
|
+
self, term_guid: str, server_name: str = None
|
2839
|
+
) -> dict | str:
|
2840
|
+
"""Retrieve a term using its unique id. Async version.
|
2439
2841
|
Parameters
|
2440
2842
|
----------
|
2441
2843
|
term_guid : str
|
@@ -2463,14 +2865,16 @@ class GlossaryManager(GlossaryBrowser):
|
|
2463
2865
|
|
2464
2866
|
validate_guid(term_guid)
|
2465
2867
|
|
2466
|
-
url = (
|
2467
|
-
|
2868
|
+
url = (
|
2869
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/terms/"
|
2870
|
+
f"{term_guid}/retrieve"
|
2871
|
+
)
|
2468
2872
|
|
2469
2873
|
response = await self._async_make_request("POST", url)
|
2470
2874
|
return response.json().get("element", "No term found")
|
2471
2875
|
|
2472
2876
|
def get_terms_by_guid(self, term_guid: str, server_name: str = None) -> dict | str:
|
2473
|
-
"""
|
2877
|
+
"""Retrieve a term using its unique id. Async version.
|
2474
2878
|
Parameters
|
2475
2879
|
----------
|
2476
2880
|
term_guid : str
|
@@ -2495,13 +2899,20 @@ class GlossaryManager(GlossaryBrowser):
|
|
2495
2899
|
"""
|
2496
2900
|
|
2497
2901
|
loop = asyncio.get_event_loop()
|
2498
|
-
response = loop.run_until_complete(
|
2902
|
+
response = loop.run_until_complete(
|
2903
|
+
self._async_get_terms_by_guid(term_guid, server_name)
|
2904
|
+
)
|
2499
2905
|
|
2500
2906
|
return response
|
2501
2907
|
|
2502
|
-
async def _async_get_terms_versions(
|
2503
|
-
|
2504
|
-
|
2908
|
+
async def _async_get_terms_versions(
|
2909
|
+
self,
|
2910
|
+
term_guid: str,
|
2911
|
+
server_name: str = None,
|
2912
|
+
start_from: int = 0,
|
2913
|
+
page_size=None,
|
2914
|
+
) -> dict | str:
|
2915
|
+
"""Retrieve the versions of a glossary term. Async version.
|
2505
2916
|
Parameters
|
2506
2917
|
----------
|
2507
2918
|
term_guid : str
|
@@ -2535,15 +2946,22 @@ class GlossaryManager(GlossaryBrowser):
|
|
2535
2946
|
|
2536
2947
|
validate_guid(term_guid)
|
2537
2948
|
|
2538
|
-
url = (
|
2539
|
-
|
2949
|
+
url = (
|
2950
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/terms/"
|
2951
|
+
f"{term_guid}/history?startFrom={start_from}&pageSize={page_size}"
|
2952
|
+
)
|
2540
2953
|
|
2541
2954
|
response = await self._async_make_request("POST", url)
|
2542
2955
|
return response.json().get("element", "No term found")
|
2543
2956
|
|
2544
|
-
def get_terms_versions(
|
2545
|
-
|
2546
|
-
|
2957
|
+
def get_terms_versions(
|
2958
|
+
self,
|
2959
|
+
term_guid: str,
|
2960
|
+
server_name: str = None,
|
2961
|
+
start_from: int = 0,
|
2962
|
+
page_size=None,
|
2963
|
+
) -> dict | str:
|
2964
|
+
"""Retrieve the versions of a glossary term.
|
2547
2965
|
Parameters
|
2548
2966
|
----------
|
2549
2967
|
term_guid : str
|
@@ -2572,13 +2990,21 @@ class GlossaryManager(GlossaryBrowser):
|
|
2572
2990
|
|
2573
2991
|
loop = asyncio.get_event_loop()
|
2574
2992
|
response = loop.run_until_complete(
|
2575
|
-
self._async_get_terms_versions(
|
2993
|
+
self._async_get_terms_versions(
|
2994
|
+
term_guid, server_name, start_from, page_size
|
2995
|
+
)
|
2996
|
+
)
|
2576
2997
|
|
2577
2998
|
return response
|
2578
2999
|
|
2579
|
-
async def _async_get_term_revision_logs(
|
2580
|
-
|
2581
|
-
|
3000
|
+
async def _async_get_term_revision_logs(
|
3001
|
+
self,
|
3002
|
+
term_guid: str,
|
3003
|
+
server_name: str = None,
|
3004
|
+
start_from: int = 0,
|
3005
|
+
page_size=None,
|
3006
|
+
) -> dict | str:
|
3007
|
+
"""Retrieve the revision log history for a term. Async version.
|
2582
3008
|
Parameters
|
2583
3009
|
----------
|
2584
3010
|
term_guid : str
|
@@ -2612,15 +3038,22 @@ class GlossaryManager(GlossaryBrowser):
|
|
2612
3038
|
|
2613
3039
|
validate_guid(term_guid)
|
2614
3040
|
|
2615
|
-
url = (
|
2616
|
-
|
3041
|
+
url = (
|
3042
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/elements/"
|
3043
|
+
f"{term_guid}/notes/retrieve?startFrom={start_from}&pageSize={page_size}"
|
3044
|
+
)
|
2617
3045
|
|
2618
3046
|
response = await self._async_make_request("POST", url)
|
2619
3047
|
return response.json().get("elementList", "No log found")
|
2620
3048
|
|
2621
|
-
def get_term_revision_logs(
|
2622
|
-
|
2623
|
-
|
3049
|
+
def get_term_revision_logs(
|
3050
|
+
self,
|
3051
|
+
term_guid: str,
|
3052
|
+
server_name: str = None,
|
3053
|
+
start_from: int = 0,
|
3054
|
+
page_size=None,
|
3055
|
+
) -> dict | str:
|
3056
|
+
"""Retrieve the revision log history for a term.
|
2624
3057
|
Parameters
|
2625
3058
|
----------
|
2626
3059
|
term_guid : str
|
@@ -2649,13 +3082,21 @@ class GlossaryManager(GlossaryBrowser):
|
|
2649
3082
|
|
2650
3083
|
loop = asyncio.get_event_loop()
|
2651
3084
|
response = loop.run_until_complete(
|
2652
|
-
self._async_get_term_revision_logs(
|
3085
|
+
self._async_get_term_revision_logs(
|
3086
|
+
term_guid, server_name, start_from, page_size
|
3087
|
+
)
|
3088
|
+
)
|
2653
3089
|
|
2654
3090
|
return response
|
2655
3091
|
|
2656
|
-
async def _async_get_term_revision_history(
|
2657
|
-
|
2658
|
-
|
3092
|
+
async def _async_get_term_revision_history(
|
3093
|
+
self,
|
3094
|
+
term_revision_log_guid: str,
|
3095
|
+
server_name: str = None,
|
3096
|
+
start_from: int = 0,
|
3097
|
+
page_size=None,
|
3098
|
+
) -> dict | str:
|
3099
|
+
"""Retrieve the revision history for a glossary term. Async version.
|
2659
3100
|
|
2660
3101
|
Parameters
|
2661
3102
|
----------
|
@@ -2695,15 +3136,22 @@ class GlossaryManager(GlossaryBrowser):
|
|
2695
3136
|
|
2696
3137
|
validate_guid(term_revision_log_guid)
|
2697
3138
|
|
2698
|
-
url = (
|
2699
|
-
|
3139
|
+
url = (
|
3140
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/note-logs/"
|
3141
|
+
f"{term_revision_log_guid}/notes/retrieve?startFrom={start_from}&pageSize={page_size}"
|
3142
|
+
)
|
2700
3143
|
|
2701
3144
|
response = await self._async_make_request("POST", url)
|
2702
3145
|
return response.json().get("elementList", "No logs found")
|
2703
3146
|
|
2704
|
-
def get_term_revision_history(
|
2705
|
-
|
2706
|
-
|
3147
|
+
def get_term_revision_history(
|
3148
|
+
self,
|
3149
|
+
term_revision_log_guid: str,
|
3150
|
+
server_name: str = None,
|
3151
|
+
start_from: int = 0,
|
3152
|
+
page_size=None,
|
3153
|
+
) -> dict | str:
|
3154
|
+
"""Retrieve the revision history for a glossary term.
|
2707
3155
|
|
2708
3156
|
Parameters
|
2709
3157
|
----------
|
@@ -2738,17 +3186,29 @@ class GlossaryManager(GlossaryBrowser):
|
|
2738
3186
|
|
2739
3187
|
loop = asyncio.get_event_loop()
|
2740
3188
|
response = loop.run_until_complete(
|
2741
|
-
self._async_get_term_revision_history(
|
3189
|
+
self._async_get_term_revision_history(
|
3190
|
+
term_revision_log_guid, server_name, start_from, page_size
|
3191
|
+
)
|
3192
|
+
)
|
2742
3193
|
|
2743
3194
|
return response
|
2744
3195
|
|
2745
|
-
async def _async_find_glossary_terms(
|
2746
|
-
|
2747
|
-
|
2748
|
-
|
2749
|
-
|
2750
|
-
|
2751
|
-
|
3196
|
+
async def _async_find_glossary_terms(
|
3197
|
+
self,
|
3198
|
+
search_string: str,
|
3199
|
+
glossary_guid: str = None,
|
3200
|
+
status_filter: list = [],
|
3201
|
+
effective_time: str = None,
|
3202
|
+
starts_with: bool = False,
|
3203
|
+
ends_with: bool = False,
|
3204
|
+
ignore_case: bool = False,
|
3205
|
+
for_lineage: bool = False,
|
3206
|
+
for_duplicate_processing: bool = False,
|
3207
|
+
server_name: str = None,
|
3208
|
+
start_from: int = 0,
|
3209
|
+
page_size: int = None,
|
3210
|
+
) -> list | str:
|
3211
|
+
"""Retrieve the list of glossary term metadata elements that contain the search string.
|
2752
3212
|
|
2753
3213
|
Parameters
|
2754
3214
|
----------
|
@@ -2812,89 +3272,119 @@ class GlossaryManager(GlossaryBrowser):
|
|
2812
3272
|
ignore_case_s = str(ignore_case).lower()
|
2813
3273
|
for_lineage_s = str(for_lineage).lower()
|
2814
3274
|
for_duplicate_processing_s = str(for_duplicate_processing).lower()
|
2815
|
-
if search_string ==
|
3275
|
+
if search_string == "*":
|
2816
3276
|
search_string = None
|
2817
3277
|
|
2818
3278
|
# validate_search_string(search_string)
|
2819
3279
|
|
2820
|
-
body = {
|
2821
|
-
|
3280
|
+
body = {
|
3281
|
+
"class": "GlossarySearchStringRequestBody",
|
3282
|
+
"glossaryGUID": glossary_guid,
|
3283
|
+
"searchString": search_string,
|
3284
|
+
"effectiveTime": effective_time,
|
3285
|
+
"limitResultsByStatus": status_filter,
|
3286
|
+
}
|
2822
3287
|
# body = body_slimmer(body)
|
2823
3288
|
|
2824
|
-
url = (
|
2825
|
-
|
2826
|
-
|
2827
|
-
|
3289
|
+
url = (
|
3290
|
+
f"{self.platform_url}/servers/{server_name}/api/open-metadata/glossary-browser/glossaries/"
|
3291
|
+
f"terms/by-search-string?startFrom={start_from}&pageSize={page_size}&startsWith={starts_with_s}&"
|
3292
|
+
f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}&forLineage={for_lineage_s}&"
|
3293
|
+
f"forDuplicateProcessing={for_duplicate_processing_s}"
|
3294
|
+
)
|
2828
3295
|
|
2829
3296
|
# print(f"\n\nURL is: \n {url}\n\nBody is: \n{body}")
|
2830
3297
|
|
2831
3298
|
response = await self._async_make_request("POST", url, body)
|
2832
|
-
return response.json().get(
|
2833
|
-
|
2834
|
-
|
2835
|
-
|
2836
|
-
|
2837
|
-
|
2838
|
-
|
2839
|
-
|
2840
|
-
|
2841
|
-
|
2842
|
-
|
2843
|
-
|
2844
|
-
|
2845
|
-
|
2846
|
-
|
2847
|
-
|
2848
|
-
|
2849
|
-
|
2850
|
-
|
2851
|
-
|
2852
|
-
|
2853
|
-
|
2854
|
-
|
2855
|
-
|
2856
|
-
|
2857
|
-
|
2858
|
-
|
2859
|
-
|
2860
|
-
|
2861
|
-
|
2862
|
-
|
2863
|
-
|
2864
|
-
|
2865
|
-
|
2866
|
-
|
2867
|
-
|
2868
|
-
|
2869
|
-
|
2870
|
-
|
2871
|
-
|
2872
|
-
|
2873
|
-
|
2874
|
-
|
2875
|
-
|
2876
|
-
|
2877
|
-
|
2878
|
-
|
2879
|
-
|
2880
|
-
|
2881
|
-
|
2882
|
-
|
2883
|
-
|
2884
|
-
|
2885
|
-
|
2886
|
-
|
2887
|
-
|
2888
|
-
|
2889
|
-
|
2890
|
-
|
2891
|
-
|
3299
|
+
return response.json().get(
|
3300
|
+
"elementList", "No terms found"
|
3301
|
+
) # return response.text
|
3302
|
+
|
3303
|
+
def find_glossary_terms(
|
3304
|
+
self,
|
3305
|
+
search_string: str,
|
3306
|
+
glossary_guid: str = None,
|
3307
|
+
status_filter: list = [],
|
3308
|
+
effective_time: str = None,
|
3309
|
+
starts_with: bool = False,
|
3310
|
+
ends_with: bool = False,
|
3311
|
+
ignore_case: bool = False,
|
3312
|
+
for_lineage: bool = False,
|
3313
|
+
for_duplicate_processing: bool = False,
|
3314
|
+
server_name: str = None,
|
3315
|
+
start_from: int = 0,
|
3316
|
+
page_size: int = None,
|
3317
|
+
) -> list | str:
|
3318
|
+
"""Retrieve the list of glossary term metadata elements that contain the search string.
|
3319
|
+
|
3320
|
+
Parameters
|
3321
|
+
----------
|
3322
|
+
search_string: str
|
3323
|
+
Search string to use to find matching glossaries. If the search string is '*' then all glossaries returned.
|
3324
|
+
glossary_guid str
|
3325
|
+
Identifier of the glossary to search within. If None, then all glossaries are searched.
|
3326
|
+
status_filter: list, default = [], optional
|
3327
|
+
Filters the results by the included Term statuses (such as 'ACTIVE', 'DRAFT'). If not specified,
|
3328
|
+
the results will not be filtered.
|
3329
|
+
effective_time: str, [default=None], optional
|
3330
|
+
If specified, the term information will be retrieved if it is active at the `effective_time`.
|
3331
|
+
Time format is "YYYY-MM-DDTHH:MM:SS" (ISO 8601)
|
3332
|
+
server_name : str, optional
|
3333
|
+
The name of the server to configure.
|
3334
|
+
If not provided, the server name associated with the instance is used.
|
3335
|
+
starts_with : bool, [default=False], optional
|
3336
|
+
Starts with the supplied string.
|
3337
|
+
ends_with : bool, [default=False], optional
|
3338
|
+
Ends with the supplied string
|
3339
|
+
ignore_case : bool, [default=False], optional
|
3340
|
+
Ignore case when searching
|
3341
|
+
for_lineage : bool, [default=False], optional
|
3342
|
+
|
3343
|
+
for_duplicate_processing : bool, [default=False], optional
|
3344
|
+
|
3345
|
+
start_from: str, [default=0], optional
|
3346
|
+
Page of results to start from
|
3347
|
+
page_size : int, optional
|
3348
|
+
Number of elements to return per page - if None, then default for class will be used.
|
3349
|
+
|
3350
|
+
Returns
|
3351
|
+
-------
|
3352
|
+
List | str
|
3353
|
+
|
3354
|
+
A list of term definitions
|
3355
|
+
|
3356
|
+
Raises
|
3357
|
+
------
|
3358
|
+
InvalidParameterException
|
3359
|
+
If the client passes incorrect parameters on the request - such as bad URLs or invalid values
|
3360
|
+
PropertyServerException
|
3361
|
+
Raised by the server when an issue arises in processing a valid request
|
3362
|
+
NotAuthorizedException
|
3363
|
+
The principle specified by the user_id does not have authorization for the requested action
|
3364
|
+
|
3365
|
+
Notes
|
3366
|
+
-----
|
3367
|
+
The search string is located in the request body and is interpreted as a plain string.
|
3368
|
+
The request parameters, startsWith, endsWith and ignoreCase can be used to allow a fuzzy search.
|
3369
|
+
The request body also supports the specification of a glossaryGUID to restrict the search to within a single glossary.
|
3370
|
+
"""
|
2892
3371
|
|
2893
3372
|
loop = asyncio.get_event_loop()
|
2894
3373
|
response = loop.run_until_complete(
|
2895
|
-
self._async_find_glossary_terms(
|
2896
|
-
|
2897
|
-
|
3374
|
+
self._async_find_glossary_terms(
|
3375
|
+
search_string,
|
3376
|
+
glossary_guid,
|
3377
|
+
status_filter,
|
3378
|
+
effective_time,
|
3379
|
+
starts_with,
|
3380
|
+
ends_with,
|
3381
|
+
ignore_case,
|
3382
|
+
for_lineage,
|
3383
|
+
for_duplicate_processing,
|
3384
|
+
server_name,
|
3385
|
+
start_from,
|
3386
|
+
page_size,
|
3387
|
+
)
|
3388
|
+
)
|
2898
3389
|
|
2899
3390
|
return response
|
2900
|
-
|