pyegeria 0.2.4__py3-none-any.whl → 5.3.0.dev3__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.
- pyegeria/README.md +35 -0
- pyegeria/__init__.py +345 -14
- pyegeria/_client.py +376 -126
- pyegeria/_deprecated_gov_engine.py +451 -0
- pyegeria/_exceptions.py +6 -6
- pyegeria/_globals.py +7 -1
- pyegeria/_validators.py +9 -6
- pyegeria/asset_catalog_omvs.py +807 -0
- pyegeria/automated_curation_omvs.py +3760 -0
- pyegeria/classification_manager_omvs.py +5238 -0
- pyegeria/collection_manager_omvs.py +2727 -0
- pyegeria/commands/README.md +47 -0
- pyegeria/commands/__init__.py +22 -0
- pyegeria/commands/cat/README.md +16 -0
- pyegeria/commands/cat/__init__.py +1 -0
- pyegeria/commands/cat/exp_list_glossaries.py +156 -0
- pyegeria/commands/cat/get_asset_graph.py +319 -0
- pyegeria/commands/cat/get_collection.py +148 -0
- pyegeria/commands/cat/get_project_dependencies.py +168 -0
- pyegeria/commands/cat/get_project_structure.py +168 -0
- pyegeria/commands/cat/get_tech_type_elements.py +174 -0
- pyegeria/commands/cat/glossary_actions.py +362 -0
- pyegeria/commands/cat/list_assets.py +176 -0
- pyegeria/commands/cat/list_cert_types.py +194 -0
- pyegeria/commands/cat/list_collections.py +162 -0
- pyegeria/commands/cat/list_deployed_catalogs.py +217 -0
- pyegeria/commands/cat/list_deployed_database_schemas.py +251 -0
- pyegeria/commands/cat/list_deployed_databases.py +202 -0
- pyegeria/commands/cat/list_glossaries.py +150 -0
- pyegeria/commands/cat/list_projects.py +221 -0
- pyegeria/commands/cat/list_servers_deployed_imp.py +158 -0
- pyegeria/commands/cat/list_tech_type_elements.py +190 -0
- pyegeria/commands/cat/list_tech_types.py +140 -0
- pyegeria/commands/cat/list_terms.py +242 -0
- pyegeria/commands/cat/list_todos.py +189 -0
- pyegeria/commands/cat/list_user_ids.py +145 -0
- pyegeria/commands/cli/__init__.py +13 -0
- pyegeria/commands/cli/egeria.py +1844 -0
- pyegeria/commands/cli/egeria_cat.py +638 -0
- pyegeria/commands/cli/egeria_login_tui.py +313 -0
- pyegeria/commands/cli/egeria_my.py +248 -0
- pyegeria/commands/cli/egeria_ops.py +502 -0
- pyegeria/commands/cli/egeria_tech.py +618 -0
- pyegeria/commands/cli/ops_config.py +45 -0
- pyegeria/commands/cli/txt_custom_v2.tcss +19 -0
- pyegeria/commands/doc/README.md +145 -0
- pyegeria/commands/doc/Visual Command Reference/README.md +511 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/asset-graph 2024-11-20 at 15.56.42.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/assets-in-domain 2024-11-20 at 15.49.55@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/elements-of-type 2024-11-20 at 16.01.35.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/assets/tech-type-elements 2024-11-20 at 16.05.05.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs 2024-12-17 at 15.43.27@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs-2024-11-20 at 16.17.43@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-11-25 at 20.14.50@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-12-17 at 15.48.38@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-11-25 at 20.21.25@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-12-17 at 15.52.16@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed_databases 2024-12-16 at 16.40.31@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-glossaries 2024-11-25 at 20.30.02.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-terms 2024-11-25 at 20.32.11.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/asset-types 2024-11-25 at 20.34.19@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/certification-types 2024-11-25 at 20.37.07.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/collection-graph 2024-12-12 at 11.33.18@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-collections 2024-12-10 at 14.25.51@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-todos 2024-12-12 at 11.46.30@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-user-ids 2024-12-12 at 11.51.09@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/tech-types 2024-12-12 at 11.37.20@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_dependencies 2024-12-14 at 16.24.39@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_structure 2024-12-14 at 16.21.35@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/projects 2024-12-14 at 16.18.10@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/hey_egeria tui 2024-12-16 at 16.58.22@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_profile 2024-12-14 at 16.29.27@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_roles 2024-12-14 at 16.32.10@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_todos 2024-12-15 at 16.24.13@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/open_todos 2024-12-14 at 16.36.12@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/list_engine_activity compressed 2024-12-15 at 16.48.48@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity 2024-12-15 at 16.32.55@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity compressed 2024-12-15 at 16.38.29@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_status 2024-12-15 at 16.51.26.jpeg +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_daemon_status 2024-12-15 at 16.57.12@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_targets 2024-12-15 at 17.02.19@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/platforms/monitor_platform_status 2024-12-15 at 19.53.18@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status 2024-12-15 at 19.59.39@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status full 2024-12-15 at 20.01.57@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_startup_servers 2024-12-15 at 19.56.07@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_anchored_elements 2024-12-15 at 21.25.41@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_elements_of_om_type 2024-12-16 at 14.39.59@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/info_for_guid 2024-12-16 at 11.35.29@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type 2024-12-16 at 14.24.18@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type extended 2024-12-16 at 14.28.46@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_of_om_type_by_classification 2024-12-16 at 14.35.26@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/related_elements 2024-12-16 at 14.55.01@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/show_related_specifications 2024-12-16 at 15.04.55@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/asset_types 2024-12-16 at 15.10.16@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/detailed_governance_action_processes 2024-12-16 at 15.16.26@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/governance_action_processes 2024-12-16 at 15.13.01@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/registered_services 2024-12-16 at 16.44.54@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-16 at 16.20.34@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-19 at 10.51.54@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/valid_metadata_values 2024-12-16 at 15.31.56@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_tech_type_template_specs 2024-12-16 at 16.03.22@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_technology_types 2024-12-16 at 15.39.20@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_details 2024-12-16 at 15.37.21@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_templates 2024-12-16 at 16.11.48@2x.png +0 -0
- pyegeria/commands/doc/glossary/basic-glossary-tui.md +109 -0
- pyegeria/commands/doc/glossary/images/delete-glossary-step1 2024-11-06 at 15.47.23@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/delete-glossary-step2 2024-11-06 at 15.51.29@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/delete-glossary-step3 2024-11-06 at 15.53.19@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/delete-glossary-step4 2024-11-06 at 15.55.11@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/out-create-glossary example 2024-11-05 at 20.38.04@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/out-create-term 2024-11-06 at 20.48.29.png +0 -0
- pyegeria/commands/doc/glossary/images/out-delete-term 2024-11-07 at 03.57.25.png +0 -0
- pyegeria/commands/doc/glossary/images/out-display-terms-for-glossary-test 2024-11-06 at 20.51.28.png +0 -0
- pyegeria/commands/doc/glossary/images/out-export-example 2024-11-07 at 09.54.57.png +0 -0
- pyegeria/commands/doc/glossary/images/out-exported-terms 2024-11-06 at 21.06.32.png +0 -0
- pyegeria/commands/doc/glossary/images/out-glossary-list example 2024-11-05 at 20.41.02@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/out-import-terms 2024-11-07 at 08.15.18.png +0 -0
- pyegeria/commands/doc/glossary/images/out-list-all-terms 2024-11-06 at 16.22.20@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/out-list-terms-for-example 2024-11-06 at 16.40.12.png +0 -0
- pyegeria/commands/doc/glossary/images/out-list-terms-second 2024-11-06 at 16.45.13.png +0 -0
- pyegeria/commands/doc/glossary/images/out-pipx install pyegeria 2024-11-10 at 18.12.21.png +0 -0
- pyegeria/commands/doc/glossary/images/out-server-status-full 2024-11-10 at 18.25.14.png +0 -0
- pyegeria/commands/doc/glossary/images/out-servers-status 2024-11-10 at 18.15.42.png +0 -0
- pyegeria/commands/doc/glossary/images/out-upsert-import 2024-11-07 at 19.37.00.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-2024-11-10 at 18.26.29.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-create-glossary example 2024-11-05 at 20.34.24@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-create-term 2024-11-06 at 20.46.35.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-delete-term 2024-11-07 at 03.51.57.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-display-terms-for-example 2024-11-06 at 20.56.49.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-export-example 2024-11-07 at 09.52.59.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-hey-egeria 2024-11-10 at 18.31.01.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-import-upsert-example 2024-11-07 at 10.08.37.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-list-terms-second 2024-11-06 at 16.46.34.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-load-archive.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-server-status-full 2024-11-10 at 19.14.36.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-show-glossaries 2024-11-07 at 20.00.05.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-show-glossary-terms 2024-11-05 at 19.37.53@2x.png +0 -0
- pyegeria/commands/doc/glossary/images/tui-upsert 2024-11-07 at 11.49.04.png +0 -0
- pyegeria/commands/doc/glossary/images/upsert-example.om-terms 2024-11-07 at 11.44.05.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/README.md +346 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/CleanShot 2024-11-18 at 21.32.03@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/Xmind 1731421782704.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/Xmind 1731422134920.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/hey_egeria 2024-11-12 at 20.38.43.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/hey_egeria cat 2024-11-12 at 21.41.43.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-integ-status-list 2024-11-12 at 16.45.26.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-integ-status-live 2024-11-12 at 16.44.12@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-server-status 2024-11-10 at 18.15.42@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/out-server-status-full 2024-11-10 at 18.25.14@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/short-cut commands 2024-11-12 at 22.22.13.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-hey-egeria.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-integration-status-paging.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-load-archive 2024-11-10 at 19.19.09@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-show-server-status 2024-11-10 at 18.52.01@2x.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-show-server-status-full 2024-11-10.png +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/tui-status-paging 2024-11-12 at 16.26.14@2x.png +0 -0
- pyegeria/commands/my/README.md +17 -0
- pyegeria/commands/my/__init__.py +0 -0
- pyegeria/commands/my/list_my_profile.py +163 -0
- pyegeria/commands/my/list_my_roles.py +151 -0
- pyegeria/commands/my/monitor_my_todos.py +205 -0
- pyegeria/commands/my/monitor_open_todos.py +175 -0
- pyegeria/commands/my/todo_actions.py +242 -0
- pyegeria/commands/ops/README.md +24 -0
- pyegeria/commands/ops/__init__.py +22 -0
- pyegeria/commands/ops/gov_server_actions.py +177 -0
- pyegeria/commands/ops/list_archives.py +161 -0
- pyegeria/commands/ops/list_catalog_targets.py +203 -0
- pyegeria/commands/ops/load_archive.py +75 -0
- pyegeria/commands/ops/monitor_asset_events.py +107 -0
- pyegeria/commands/ops/monitor_engine_activity.py +270 -0
- pyegeria/commands/ops/monitor_engine_activity_c.py +286 -0
- pyegeria/commands/ops/monitor_gov_eng_status.py +288 -0
- pyegeria/commands/ops/monitor_integ_daemon_status.py +321 -0
- pyegeria/commands/ops/monitor_platform_status.py +188 -0
- pyegeria/commands/ops/monitor_server_startup.py +117 -0
- pyegeria/commands/ops/monitor_server_status.py +182 -0
- pyegeria/commands/ops/orig_monitor_server_list.py +140 -0
- pyegeria/commands/ops/orig_monitor_server_status.py +124 -0
- pyegeria/commands/ops/refresh_integration_daemon.py +83 -0
- pyegeria/commands/ops/restart_integration_daemon.py +82 -0
- pyegeria/commands/ops/table_integ_daemon_status.py +237 -0
- pyegeria/commands/ops/x_engine_actions.py +76 -0
- pyegeria/commands/tech/README.md +24 -0
- pyegeria/commands/tech/__init__.py +0 -0
- pyegeria/commands/tech/get_element_info.py +144 -0
- pyegeria/commands/tech/get_guid_info.py +134 -0
- pyegeria/commands/tech/get_tech_details.py +173 -0
- pyegeria/commands/tech/get_tech_type_template.py +166 -0
- pyegeria/commands/tech/list_anchored_elements.py +205 -0
- pyegeria/commands/tech/list_asset_types.py +123 -0
- pyegeria/commands/tech/list_elements.py +168 -0
- pyegeria/commands/tech/list_elements_for_classification.py +171 -0
- pyegeria/commands/tech/list_elements_x.py +191 -0
- pyegeria/commands/tech/list_gov_action_processes.py +139 -0
- pyegeria/commands/tech/list_registered_services.py +180 -0
- pyegeria/commands/tech/list_related_elements.py +207 -0
- pyegeria/commands/tech/list_related_specification.py +169 -0
- pyegeria/commands/tech/list_relationship_types.py +164 -0
- pyegeria/commands/tech/list_relationships.py +179 -0
- pyegeria/commands/tech/list_tech_templates.py +360 -0
- pyegeria/commands/tech/list_valid_metadata_values.py +178 -0
- pyegeria/commands/tech/table_tech_templates.py +238 -0
- pyegeria/commands/tech/x_list_related_elements.py +165 -0
- pyegeria/core_omag_server_config.py +550 -313
- pyegeria/create_tech_guid_lists.py +105 -0
- pyegeria/egeria_cat_client.py +78 -0
- pyegeria/egeria_client.py +117 -0
- pyegeria/egeria_config_client.py +45 -0
- pyegeria/egeria_my_client.py +56 -0
- pyegeria/egeria_tech_client.py +93 -0
- pyegeria/feedback_manager_omvs.py +4573 -0
- pyegeria/full_omag_server_config.py +1337 -0
- pyegeria/glossary_browser_omvs.py +2507 -0
- pyegeria/glossary_manager_omvs.py +3597 -0
- pyegeria/mermaid_utilities.py +218 -0
- pyegeria/metadata_explorer_omvs.py +2371 -0
- pyegeria/my_profile_omvs.py +1021 -0
- pyegeria/platform_services.py +259 -218
- pyegeria/project_manager_omvs.py +1854 -0
- pyegeria/registered_info.py +111 -108
- pyegeria/runtime_manager_omvs.py +2299 -0
- pyegeria/server_operations.py +178 -71
- pyegeria/template_manager_omvs.py +1414 -0
- pyegeria/utils.py +75 -85
- pyegeria/valid_metadata_omvs.py +1911 -0
- pyegeria/x_action_author_omvs.py +200 -0
- pyegeria-5.3.0.dev3.dist-info/METADATA +70 -0
- pyegeria-5.3.0.dev3.dist-info/RECORD +232 -0
- {pyegeria-0.2.4.dist-info → pyegeria-5.3.0.dev3.dist-info}/WHEEL +1 -1
- pyegeria-5.3.0.dev3.dist-info/entry_points.txt +81 -0
- pyegeria/config.toml +0 -11
- pyegeria/curation_omvs.py +0 -458
- pyegeria/exceptions.py +0 -382
- pyegeria/glossary_omvs.py +0 -639
- pyegeria/gov_engine.py +0 -573
- pyegeria-0.2.4.dist-info/METADATA +0 -57
- pyegeria-0.2.4.dist-info/RECORD +0 -19
- {pyegeria-0.2.4.dist-info/licenses → pyegeria-5.3.0.dev3.dist-info}/LICENSE +0 -0
@@ -0,0 +1,4573 @@
|
|
1
|
+
"""PDX-License-Identifier: Apache-2.0
|
2
|
+
Copyright Contributors to the ODPi Egeria project.
|
3
|
+
|
4
|
+
This module contains an initial version of the feedback_manager_omvs
|
5
|
+
module.
|
6
|
+
|
7
|
+
"""
|
8
|
+
|
9
|
+
import asyncio
|
10
|
+
import json
|
11
|
+
|
12
|
+
# import json
|
13
|
+
from pyegeria._client import Client, max_paging_size
|
14
|
+
|
15
|
+
|
16
|
+
def jprint(info, comment=None):
|
17
|
+
if comment:
|
18
|
+
print(comment)
|
19
|
+
print(json.dumps(info, indent=2))
|
20
|
+
|
21
|
+
|
22
|
+
def query_seperator(current_string):
|
23
|
+
if current_string == "":
|
24
|
+
return "?"
|
25
|
+
else:
|
26
|
+
return "&"
|
27
|
+
|
28
|
+
|
29
|
+
"params are in the form of [(paramName, value), (param2Name, value)] if the value is not None, it will be added to the query string"
|
30
|
+
|
31
|
+
|
32
|
+
def query_string(params):
|
33
|
+
result = ""
|
34
|
+
for i in range(len(params)):
|
35
|
+
if params[i][1] is not None:
|
36
|
+
result = f"{result}{query_seperator(result)}{params[i][0]}={params[i][1]}"
|
37
|
+
return result
|
38
|
+
|
39
|
+
|
40
|
+
def base_path(fm_client, view_server: str):
|
41
|
+
return f"{fm_client.platform_url}/servers/{view_server}/api/open-metadata/feedback-manager"
|
42
|
+
|
43
|
+
|
44
|
+
def extract_relationships_plus(element):
|
45
|
+
type_name = element["relatedElement"]["type"]["typeName"]
|
46
|
+
guid = element["relationshipHeader"]["guid"]
|
47
|
+
properties = element["relationshipProperties"]["propertiesAsStrings"]
|
48
|
+
name = element["relatedElement"]["uniqueName"]
|
49
|
+
return {"name": name, "typeName": type_name, "guid": guid, "properties": properties}
|
50
|
+
|
51
|
+
|
52
|
+
def extract_related_elements_list(element_list):
|
53
|
+
return [extract_relationships_plus(element) for element in element_list]
|
54
|
+
|
55
|
+
|
56
|
+
def related_elements_response(response: dict, detailed_response: bool):
|
57
|
+
if detailed_response:
|
58
|
+
return response
|
59
|
+
elif not "elementList" in response:
|
60
|
+
return response
|
61
|
+
else:
|
62
|
+
return extract_related_elements_list(response["elementList"])
|
63
|
+
|
64
|
+
|
65
|
+
def element_properties_plus(element):
|
66
|
+
props_plus = element["properties"]
|
67
|
+
props_plus.update({"guid": element["elementHeader"]["guid"]})
|
68
|
+
props_plus.update({"versions": element["elementHeader"]["versions"]})
|
69
|
+
return props_plus
|
70
|
+
|
71
|
+
|
72
|
+
def element_property_plus_list(element_list):
|
73
|
+
return [element_properties_plus(element) for element in element_list]
|
74
|
+
|
75
|
+
|
76
|
+
def element_response(response: dict, element_type: str, detailed_response: bool):
|
77
|
+
if detailed_response:
|
78
|
+
return response
|
79
|
+
elif not element_type in response:
|
80
|
+
return response
|
81
|
+
else:
|
82
|
+
return element_properties_plus(response[element_type])
|
83
|
+
|
84
|
+
|
85
|
+
def elements_response(response: dict, element_type: str, detailed_response: bool):
|
86
|
+
# print(response)
|
87
|
+
if detailed_response:
|
88
|
+
return response
|
89
|
+
elif not element_type in response:
|
90
|
+
return response
|
91
|
+
else:
|
92
|
+
return element_property_plus_list(response[element_type])
|
93
|
+
|
94
|
+
|
95
|
+
class FeedbackManager(Client):
|
96
|
+
"""FeedbackManager is a class that extends the Client class. It
|
97
|
+
provides methods to CRUD tags, comments and likes for managed
|
98
|
+
elements.
|
99
|
+
|
100
|
+
Attributes:
|
101
|
+
|
102
|
+
view_server: str
|
103
|
+
The name of the View Server to connect to.
|
104
|
+
platform_url : str
|
105
|
+
URL of the server platform to connect to
|
106
|
+
user_id : str
|
107
|
+
The identity of the user calling the method - this sets a
|
108
|
+
default optionally used by the methods when the user
|
109
|
+
doesn't pass the user_id on a method call.
|
110
|
+
user_pwd: str
|
111
|
+
The password associated with the user_id. Defaults to None
|
112
|
+
|
113
|
+
token: str, optional
|
114
|
+
bearer token
|
115
|
+
|
116
|
+
"""
|
117
|
+
|
118
|
+
def __init__(
|
119
|
+
self,
|
120
|
+
view_server: str,
|
121
|
+
platform_url: str,
|
122
|
+
user_id: str,
|
123
|
+
user_pwd: str = None,
|
124
|
+
token: str = None,
|
125
|
+
):
|
126
|
+
self.admin_command_root: str
|
127
|
+
self.view_server = view_server
|
128
|
+
self.platform_url = platform_url
|
129
|
+
self.user_id = user_id
|
130
|
+
self.user_pwd = user_pwd
|
131
|
+
|
132
|
+
Client.__init__(
|
133
|
+
self,
|
134
|
+
view_server,
|
135
|
+
platform_url,
|
136
|
+
user_id,
|
137
|
+
user_pwd,
|
138
|
+
token=token,
|
139
|
+
)
|
140
|
+
|
141
|
+
async def _async_add_comment_reply(
|
142
|
+
self,
|
143
|
+
element_guid: str,
|
144
|
+
comment_guid: str,
|
145
|
+
is_public: bool = True,
|
146
|
+
body: dict = {},
|
147
|
+
view_service_url_marker: str = None,
|
148
|
+
access_service_url_marker: str = None,
|
149
|
+
) -> dict | str:
|
150
|
+
"""
|
151
|
+
Adds a reply to a comment.
|
152
|
+
|
153
|
+
Parameters
|
154
|
+
----------
|
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
|
+
|
160
|
+
is_public
|
161
|
+
- is this visible to other people
|
162
|
+
body
|
163
|
+
- containing type of comment enum and the text of the comment.
|
164
|
+
view_service_url_marker
|
165
|
+
- optional view service URL marker (overrides access_service_url_marker)
|
166
|
+
access_service_url_marker
|
167
|
+
- optional access service URL marker used to identify which back end service to call
|
168
|
+
|
169
|
+
Returns
|
170
|
+
-------
|
171
|
+
ElementGUID
|
172
|
+
|
173
|
+
Raises
|
174
|
+
------
|
175
|
+
InvalidParameterException
|
176
|
+
one of the parameters is null or invalid or
|
177
|
+
PropertyServerException
|
178
|
+
There is a problem adding the element properties to the metadata repository or
|
179
|
+
UserNotAuthorizedException
|
180
|
+
the requesting user is not authorized to issue this request.
|
181
|
+
"""
|
182
|
+
|
183
|
+
possible_query_params = query_string(
|
184
|
+
[
|
185
|
+
("isPublic", is_public),
|
186
|
+
("viewServiceUrlMarker", view_service_url_marker),
|
187
|
+
("accessServiceUrlMarker", access_service_url_marker),
|
188
|
+
]
|
189
|
+
)
|
190
|
+
url = f"{base_path(self, self.view_server)}/elements/{element_guid}/comments/{comment_guid}/replies{possible_query_params}"
|
191
|
+
response = await self._async_make_request("POST", url, body)
|
192
|
+
return response.json()
|
193
|
+
|
194
|
+
def add_comment_reply(
|
195
|
+
self,
|
196
|
+
element_guid: str,
|
197
|
+
comment_guid: str,
|
198
|
+
is_public: bool = True,
|
199
|
+
body: dict = {},
|
200
|
+
view_service_url_marker: str = None,
|
201
|
+
access_service_url_marker: str = None,
|
202
|
+
) -> dict | str:
|
203
|
+
"""
|
204
|
+
Adds a reply to a comment.
|
205
|
+
|
206
|
+
Parameters
|
207
|
+
----------
|
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
|
+
|
213
|
+
is_public
|
214
|
+
- is this visible to other people
|
215
|
+
body
|
216
|
+
- containing type of comment enum and the text of the comment.
|
217
|
+
view_service_url_marker
|
218
|
+
- optional view service URL marker (overrides access_service_url_marker)
|
219
|
+
access_service_url_marker
|
220
|
+
- optional access service URL marker used to identify which back end service to call
|
221
|
+
|
222
|
+
Returns
|
223
|
+
-------
|
224
|
+
ElementGUID
|
225
|
+
|
226
|
+
Raises
|
227
|
+
------
|
228
|
+
InvalidParameterException
|
229
|
+
one of the parameters is null or invalid or
|
230
|
+
PropertyServerException
|
231
|
+
There is a problem adding the element properties to the metadata repository or
|
232
|
+
UserNotAuthorizedException
|
233
|
+
the requesting user is not authorized to issue this request.
|
234
|
+
"""
|
235
|
+
loop = asyncio.get_event_loop()
|
236
|
+
response = loop.run_until_complete(
|
237
|
+
self._async_add_comment_reply(
|
238
|
+
element_guid,
|
239
|
+
comment_guid,
|
240
|
+
is_public,
|
241
|
+
body,
|
242
|
+
view_service_url_marker,
|
243
|
+
access_service_url_marker,
|
244
|
+
)
|
245
|
+
)
|
246
|
+
return response
|
247
|
+
|
248
|
+
#
|
249
|
+
## add_comment_to_element implementation
|
250
|
+
#
|
251
|
+
|
252
|
+
async def _async_add_comment_to_element(
|
253
|
+
self,
|
254
|
+
element_guid: str,
|
255
|
+
is_public: bool = True,
|
256
|
+
body: dict = {},
|
257
|
+
view_service_url_marker: str = None,
|
258
|
+
access_service_url_marker: str = None,
|
259
|
+
) -> dict | str:
|
260
|
+
"""
|
261
|
+
Creates a comment and attaches it to an element.
|
262
|
+
|
263
|
+
Parameters
|
264
|
+
----------
|
265
|
+
|
266
|
+
element_guid
|
267
|
+
- String - unique id for the element.
|
268
|
+
is_public
|
269
|
+
- is this visible to other people
|
270
|
+
body
|
271
|
+
- containing type of comment enum and the text of the comment.
|
272
|
+
view_service_url_marker
|
273
|
+
- optional view service URL marker (overrides access_service_url_marker)
|
274
|
+
access_service_url_marker
|
275
|
+
- optional access service URL marker used to identify which back end service to call
|
276
|
+
|
277
|
+
Returns
|
278
|
+
-------
|
279
|
+
ElementGUID
|
280
|
+
|
281
|
+
Raises
|
282
|
+
------
|
283
|
+
InvalidParameterException
|
284
|
+
one of the parameters is null or invalid or
|
285
|
+
PropertyServerException
|
286
|
+
There is a problem adding the element properties to the metadata repository or
|
287
|
+
UserNotAuthorizedException
|
288
|
+
the requesting user is not authorized to issue this request.
|
289
|
+
"""
|
290
|
+
|
291
|
+
possible_query_params = query_string(
|
292
|
+
[
|
293
|
+
("isPublic", is_public),
|
294
|
+
("viewServiceUrlMarker", view_service_url_marker),
|
295
|
+
("accessServiceUrlMarker", access_service_url_marker),
|
296
|
+
]
|
297
|
+
)
|
298
|
+
url = f"{base_path(self, self.view_server)}/elements/{element_guid}/comments{possible_query_params}"
|
299
|
+
|
300
|
+
response = await self._async_make_request("POST", url, body)
|
301
|
+
return response.json()
|
302
|
+
|
303
|
+
def add_comment_to_element(
|
304
|
+
self,
|
305
|
+
element_guid: str,
|
306
|
+
is_public: bool = True,
|
307
|
+
body: dict = {},
|
308
|
+
view_service_url_marker: str = None,
|
309
|
+
access_service_url_marker: str = None,
|
310
|
+
) -> dict | str:
|
311
|
+
"""
|
312
|
+
Creates a comment and attaches it to an element.
|
313
|
+
|
314
|
+
Parameters
|
315
|
+
----------
|
316
|
+
|
317
|
+
element_guid
|
318
|
+
- String - unique id for the element.
|
319
|
+
is_public
|
320
|
+
- is this visible to other people
|
321
|
+
view_service_url_marker
|
322
|
+
- optional view service URL marker (overrides access_service_url_marker)
|
323
|
+
access_service_url_marker
|
324
|
+
- optional access service URL marker used to identify which back end service to call
|
325
|
+
body
|
326
|
+
- containing type of comment enum and the text of the comment.
|
327
|
+
|
328
|
+
Returns
|
329
|
+
-------
|
330
|
+
ElementGUID
|
331
|
+
|
332
|
+
Raises
|
333
|
+
------
|
334
|
+
InvalidParameterException
|
335
|
+
one of the parameters is null or invalid or
|
336
|
+
PropertyServerException
|
337
|
+
There is a problem adding the element properties to the metadata repository or
|
338
|
+
UserNotAuthorizedException
|
339
|
+
the requesting user is not authorized to issue this request.
|
340
|
+
"""
|
341
|
+
|
342
|
+
loop = asyncio.get_event_loop()
|
343
|
+
response = loop.run_until_complete(
|
344
|
+
self._async_add_comment_to_element(
|
345
|
+
element_guid,
|
346
|
+
is_public,
|
347
|
+
body,
|
348
|
+
view_service_url_marker,
|
349
|
+
access_service_url_marker,
|
350
|
+
)
|
351
|
+
)
|
352
|
+
return response
|
353
|
+
|
354
|
+
#
|
355
|
+
## add_like_to_element implementation
|
356
|
+
#
|
357
|
+
|
358
|
+
async def _async_add_like_to_element(
|
359
|
+
self,
|
360
|
+
element_guid: str,
|
361
|
+
is_public: bool = True,
|
362
|
+
body: dict = {},
|
363
|
+
view_service_url_marker: str = None,
|
364
|
+
access_service_url_marker: str = None,
|
365
|
+
) -> dict | str:
|
366
|
+
"""
|
367
|
+
Creates a "like" object and attaches it to an element.
|
368
|
+
|
369
|
+
Parameters
|
370
|
+
----------
|
371
|
+
|
372
|
+
element_guid
|
373
|
+
- String - unique id for the element.
|
374
|
+
is_public
|
375
|
+
- is this visible to other people
|
376
|
+
view_service_url_marker
|
377
|
+
- optional view service URL marker (overrides access_service_url_marker)
|
378
|
+
access_service_url_marker
|
379
|
+
- optional access service URL marker used to identify which back end service to call
|
380
|
+
body
|
381
|
+
- optional effective time
|
382
|
+
|
383
|
+
Returns
|
384
|
+
-------
|
385
|
+
Void
|
386
|
+
|
387
|
+
Raises
|
388
|
+
------
|
389
|
+
InvalidParameterException
|
390
|
+
one of the parameters is null or invalid or
|
391
|
+
PropertyServerException
|
392
|
+
There is a problem adding the element properties to the metadata repository or
|
393
|
+
UserNotAuthorizedException
|
394
|
+
the requesting user is not authorized to issue this request.
|
395
|
+
"""
|
396
|
+
|
397
|
+
possible_query_params = query_string(
|
398
|
+
[
|
399
|
+
("isPublic", is_public),
|
400
|
+
("viewServiceUrlMarker", view_service_url_marker),
|
401
|
+
("accessServiceUrlMarker", access_service_url_marker),
|
402
|
+
]
|
403
|
+
)
|
404
|
+
|
405
|
+
url = f"{base_path(self, self.view_server)}/elements/{element_guid}/likes{possible_query_params}"
|
406
|
+
|
407
|
+
response = await self._async_make_request("POST", url, body)
|
408
|
+
return response.json()
|
409
|
+
|
410
|
+
def add_like_to_element(
|
411
|
+
self,
|
412
|
+
element_guid: str,
|
413
|
+
is_public: bool = True,
|
414
|
+
body: dict = {},
|
415
|
+
view_service_url_marker: str = None,
|
416
|
+
access_service_url_marker: str = None,
|
417
|
+
) -> dict | str:
|
418
|
+
"""
|
419
|
+
Creates a "like" object and attaches it to an element.
|
420
|
+
|
421
|
+
Parameters
|
422
|
+
----------
|
423
|
+
|
424
|
+
element_guid
|
425
|
+
- String - unique id for the element.
|
426
|
+
is_public
|
427
|
+
- is this visible to other people
|
428
|
+
view_service_url_marker
|
429
|
+
- optional view service URL marker (overrides access_service_url_marker)
|
430
|
+
access_service_url_marker
|
431
|
+
- optional access service URL marker used to identify which back end service to call
|
432
|
+
body
|
433
|
+
- optional effective time
|
434
|
+
|
435
|
+
Returns
|
436
|
+
-------
|
437
|
+
Void
|
438
|
+
|
439
|
+
Raises
|
440
|
+
------
|
441
|
+
InvalidParameterException
|
442
|
+
one of the parameters is null or invalid or
|
443
|
+
PropertyServerException
|
444
|
+
There is a problem adding the element properties to the metadata repository or
|
445
|
+
UserNotAuthorizedException
|
446
|
+
the requesting user is not authorized to issue this request.
|
447
|
+
"""
|
448
|
+
loop = asyncio.get_event_loop()
|
449
|
+
response = loop.run_until_complete(
|
450
|
+
self._async_add_like_to_element(
|
451
|
+
element_guid,
|
452
|
+
is_public,
|
453
|
+
body,
|
454
|
+
view_service_url_marker,
|
455
|
+
access_service_url_marker,
|
456
|
+
)
|
457
|
+
)
|
458
|
+
return response
|
459
|
+
|
460
|
+
#
|
461
|
+
## add_rating_to_element implementation
|
462
|
+
#
|
463
|
+
|
464
|
+
async def _async_add_rating_to_element(
|
465
|
+
self,
|
466
|
+
element_guid: str,
|
467
|
+
is_public: bool = True,
|
468
|
+
body: dict = {},
|
469
|
+
view_service_url_marker: str = None,
|
470
|
+
access_service_url_marker: str = None,
|
471
|
+
) -> dict | str:
|
472
|
+
"""
|
473
|
+
Adds a star rating and optional review text to the element.
|
474
|
+
|
475
|
+
Parameters
|
476
|
+
----------
|
477
|
+
|
478
|
+
element_guid
|
479
|
+
- String - unique id for the element.
|
480
|
+
is_public
|
481
|
+
- is this visible to other people
|
482
|
+
view_service_url_marker
|
483
|
+
- optional view service URL marker (overrides access_service_url_marker)
|
484
|
+
access_service_url_marker
|
485
|
+
- 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
|
+
|
489
|
+
Returns
|
490
|
+
-------
|
491
|
+
ElementGUID
|
492
|
+
|
493
|
+
Raises
|
494
|
+
------
|
495
|
+
InvalidParameterException
|
496
|
+
one of the parameters is null or invalid or
|
497
|
+
PropertyServerException
|
498
|
+
There is a problem adding the element properties to the metadata repository or
|
499
|
+
UserNotAuthorizedException
|
500
|
+
the requesting user is not authorized to issue this request.
|
501
|
+
"""
|
502
|
+
|
503
|
+
possible_query_params = query_string(
|
504
|
+
[
|
505
|
+
("isPublic", is_public),
|
506
|
+
("viewServiceUrlMarker", view_service_url_marker),
|
507
|
+
("accessServiceUrlMarker", access_service_url_marker),
|
508
|
+
]
|
509
|
+
)
|
510
|
+
url = f"{base_path(self, self.view_server)}/elements/{element_guid}/ratings{possible_query_params}"
|
511
|
+
|
512
|
+
response = await self._async_make_request("POST", url, body)
|
513
|
+
return response.json()
|
514
|
+
|
515
|
+
def add_rating_to_element(
|
516
|
+
self,
|
517
|
+
element_guid: str,
|
518
|
+
is_public: bool = True,
|
519
|
+
body: dict = {},
|
520
|
+
view_service_url_marker: str = None,
|
521
|
+
access_service_url_marker: str = None,
|
522
|
+
) -> dict | str:
|
523
|
+
"""
|
524
|
+
Adds a star rating and optional review text to the element.
|
525
|
+
|
526
|
+
Parameters
|
527
|
+
----------
|
528
|
+
|
529
|
+
element_guid
|
530
|
+
- String - unique id for the element.
|
531
|
+
is_public
|
532
|
+
- is this visible to other people
|
533
|
+
view_service_url_marker
|
534
|
+
- optional view service URL marker (overrides access_service_url_marker)
|
535
|
+
access_service_url_marker
|
536
|
+
- 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
|
+
|
540
|
+
Returns
|
541
|
+
-------
|
542
|
+
ElementGUID
|
543
|
+
|
544
|
+
Raises
|
545
|
+
------
|
546
|
+
InvalidParameterException
|
547
|
+
one of the parameters is null or invalid or
|
548
|
+
PropertyServerException
|
549
|
+
There is a problem adding the element properties to the metadata repository or
|
550
|
+
UserNotAuthorizedException
|
551
|
+
the requesting user is not authorized to issue this request.
|
552
|
+
"""
|
553
|
+
loop = asyncio.get_event_loop()
|
554
|
+
response = loop.run_until_complete(
|
555
|
+
self._async_add_rating_to_element(
|
556
|
+
element_guid,
|
557
|
+
is_public,
|
558
|
+
body,
|
559
|
+
view_service_url_marker,
|
560
|
+
access_service_url_marker,
|
561
|
+
)
|
562
|
+
)
|
563
|
+
return response
|
564
|
+
|
565
|
+
#
|
566
|
+
## add_tag_to_element implementation
|
567
|
+
#
|
568
|
+
|
569
|
+
async def _async_add_tag_to_element(
|
570
|
+
self,
|
571
|
+
element_guid: str,
|
572
|
+
tag_guid: str,
|
573
|
+
is_public: bool = False,
|
574
|
+
body: dict = {},
|
575
|
+
view_service_url_marker: str = None,
|
576
|
+
access_service_url_marker: str = None,
|
577
|
+
) -> dict | str:
|
578
|
+
"""
|
579
|
+
Adds an informal tag (either private of public) to an element.
|
580
|
+
|
581
|
+
Parameters
|
582
|
+
----------
|
583
|
+
|
584
|
+
element_guid
|
585
|
+
- unique id for the element.
|
586
|
+
tag_guid
|
587
|
+
- unique id of the tag.
|
588
|
+
view_service_url_marker
|
589
|
+
- optional view service URL marker (overrides access_service_url_marker)
|
590
|
+
access_service_url_marker
|
591
|
+
- optional access service URL marker used to identify which back end service to call
|
592
|
+
body
|
593
|
+
- optional effective time
|
594
|
+
|
595
|
+
Returns
|
596
|
+
-------
|
597
|
+
Void
|
598
|
+
|
599
|
+
Raises
|
600
|
+
------
|
601
|
+
InvalidParameterException
|
602
|
+
one of the parameters is null or invalid or
|
603
|
+
PropertyServerException
|
604
|
+
There is a problem adding the element properties to the metadata repository or
|
605
|
+
UserNotAuthorizedException
|
606
|
+
the requesting user is not authorized to issue this request.
|
607
|
+
"""
|
608
|
+
|
609
|
+
possible_query_params = query_string(
|
610
|
+
[
|
611
|
+
("isPublic", is_public),
|
612
|
+
("viewServiceUrlMarker", view_service_url_marker),
|
613
|
+
("accessServiceUrlMarker", access_service_url_marker),
|
614
|
+
]
|
615
|
+
)
|
616
|
+
url = f"{base_path(self, self.view_server)}/elements/{element_guid}/tags/{tag_guid}{possible_query_params}"
|
617
|
+
response = await self._async_make_request("POST", url, body)
|
618
|
+
return response.json()
|
619
|
+
|
620
|
+
def add_tag_to_element(
|
621
|
+
self,
|
622
|
+
element_guid: str,
|
623
|
+
tag_guid: str,
|
624
|
+
is_public: bool = False,
|
625
|
+
body: dict = {},
|
626
|
+
view_service_url_marker: str = None,
|
627
|
+
access_service_url_marker: str = None,
|
628
|
+
) -> dict | str:
|
629
|
+
"""
|
630
|
+
Adds an informal tag (either private of public) to an element.
|
631
|
+
|
632
|
+
Parameters
|
633
|
+
----------
|
634
|
+
element_guid
|
635
|
+
- unique id for the element.
|
636
|
+
tag_guid
|
637
|
+
- unique id of the tag.
|
638
|
+
|
639
|
+
is_public
|
640
|
+
- is this visible to other people
|
641
|
+
body
|
642
|
+
- optional effective time
|
643
|
+
view_service_url_marker
|
644
|
+
- optional view service URL marker (overrides access_service_url_marker)
|
645
|
+
access_service_url_marker
|
646
|
+
- optional access service URL marker used to identify which back end service to call
|
647
|
+
|
648
|
+
Returns
|
649
|
+
-------
|
650
|
+
Void
|
651
|
+
|
652
|
+
Raises
|
653
|
+
------
|
654
|
+
InvalidParameterException
|
655
|
+
one of the parameters is null or invalid or
|
656
|
+
PropertyServerException
|
657
|
+
There is a problem adding the element properties to the metadata repository or
|
658
|
+
UserNotAuthorizedException
|
659
|
+
the requesting user is not authorized to issue this request.
|
660
|
+
"""
|
661
|
+
loop = asyncio.get_event_loop()
|
662
|
+
response = loop.run_until_complete(
|
663
|
+
self._async_add_tag_to_element(
|
664
|
+
element_guid,
|
665
|
+
tag_guid,
|
666
|
+
is_public,
|
667
|
+
body,
|
668
|
+
view_service_url_marker,
|
669
|
+
access_service_url_marker,
|
670
|
+
)
|
671
|
+
)
|
672
|
+
return response
|
673
|
+
|
674
|
+
#
|
675
|
+
## clear_accepted_answer implementation
|
676
|
+
#
|
677
|
+
|
678
|
+
async def _async_clear_accepted_answer(
|
679
|
+
self,
|
680
|
+
question_comment_guid: str,
|
681
|
+
answer_comment_guid: str,
|
682
|
+
body: dict = {},
|
683
|
+
view_service_url_marker: str = None,
|
684
|
+
access_service_url_marker: str = None,
|
685
|
+
) -> dict | str:
|
686
|
+
"""
|
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.
|
4172
|
+
|
4173
|
+
Parameters
|
4174
|
+
----------
|
4175
|
+
|
4176
|
+
comment_guid
|
4177
|
+
- unique identifier for the comment to change.
|
4178
|
+
is_public
|
4179
|
+
- is this visible to other people
|
4180
|
+
view_service_url_marker
|
4181
|
+
- optional view service URL marker (overrides access_service_url_marker)
|
4182
|
+
access_service_url_marker
|
4183
|
+
- optional access service URL marker used to identify which back end service to call
|
4184
|
+
body
|
4185
|
+
- containing type of comment enum and the text of the comment.
|
4186
|
+
|
4187
|
+
Returns
|
4188
|
+
-------
|
4189
|
+
Void
|
4190
|
+
|
4191
|
+
Raises
|
4192
|
+
------
|
4193
|
+
InvalidParameterException
|
4194
|
+
one of the parameters is null or invalid or
|
4195
|
+
PropertyServerException
|
4196
|
+
There is a problem adding the element properties to the metadata repository or
|
4197
|
+
UserNotAuthorizedException
|
4198
|
+
the requesting user is not authorized to issue this request.
|
4199
|
+
"""
|
4200
|
+
|
4201
|
+
possible_query_params = query_string(
|
4202
|
+
[
|
4203
|
+
("isPublic", is_public),
|
4204
|
+
("viewServiceUrlMarker", view_service_url_marker),
|
4205
|
+
("accessServiceUrlMarker", access_service_url_marker),
|
4206
|
+
]
|
4207
|
+
)
|
4208
|
+
url = f"{base_path(self, self.view_server)}/parents/{parent_guid}/comments/{comment_guid}/update-visibility{possible_query_params}"
|
4209
|
+
response = await self._async_make_request("POST", url, body)
|
4210
|
+
return response.json()
|
4211
|
+
|
4212
|
+
def update_comment_visibility(
|
4213
|
+
self,
|
4214
|
+
parent_guid: str,
|
4215
|
+
comment_guid: str,
|
4216
|
+
is_public: bool,
|
4217
|
+
body: dict = {},
|
4218
|
+
view_service_url_marker: str = None,
|
4219
|
+
access_service_url_marker: str = None,
|
4220
|
+
) -> dict | str:
|
4221
|
+
"""
|
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.
|
4382
|
+
|
4383
|
+
Parameters
|
4384
|
+
----------
|
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
|
+
|
4390
|
+
is_merge_update
|
4391
|
+
- should the new properties be merged with existing properties (true) or completely replace them (false)?
|
4392
|
+
view_service_url_marker
|
4393
|
+
- optional view service URL marker (overrides access_service_url_marker)
|
4394
|
+
access_service_url_marker
|
4395
|
+
- 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
|
+
body
|
4438
|
+
- containing type of comment enum and the text of the comment.
|
4439
|
+
|
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
|
+
Returns
|
4448
|
+
-------
|
4449
|
+
Void
|
4450
|
+
|
4451
|
+
Raises
|
4452
|
+
------
|
4453
|
+
InvalidParameterException
|
4454
|
+
one of the parameters is null or invalid or
|
4455
|
+
PropertyServerException
|
4456
|
+
There is a problem adding the element properties to the metadata repository or
|
4457
|
+
UserNotAuthorizedException
|
4458
|
+
the requesting user is not authorized to issue this request.
|
4459
|
+
"""
|
4460
|
+
loop = asyncio.get_event_loop()
|
4461
|
+
response = loop.run_until_complete(
|
4462
|
+
self._async_update_note_log(
|
4463
|
+
note_log_guid,
|
4464
|
+
body,
|
4465
|
+
is_merge_update,
|
4466
|
+
view_service_url_marker,
|
4467
|
+
access_service_url_marker,
|
4468
|
+
)
|
4469
|
+
)
|
4470
|
+
return response
|
4471
|
+
|
4472
|
+
#
|
4473
|
+
## update_tag_description implementation
|
4474
|
+
#
|
4475
|
+
|
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
|
+
|
4571
|
+
|
4572
|
+
if __name__ == "__main__":
|
4573
|
+
print("Main-Feedback Manager")
|