qanswer-sdk 0.46.0.dev0__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.
- qanswer_sdk/__init__.py +1268 -0
- qanswer_sdk/api/__init__.py +64 -0
- qanswer_sdk/api/admin_api.py +7383 -0
- qanswer_sdk/api/ai_assistant_access_rights_api.py +5879 -0
- qanswer_sdk/api/ai_assistant_api.py +8960 -0
- qanswer_sdk/api/auto_complete_api.py +612 -0
- qanswer_sdk/api/bot_slack_api.py +1069 -0
- qanswer_sdk/api/branding_api.py +5723 -0
- qanswer_sdk/api/chatbot_api.py +1102 -0
- qanswer_sdk/api/connector_audio_api.py +3264 -0
- qanswer_sdk/api/connector_document_api.py +1990 -0
- qanswer_sdk/api/connector_e_consilium_api.py +313 -0
- qanswer_sdk/api/connector_e_consilium_search_index_api_api.py +1164 -0
- qanswer_sdk/api/connector_google_drive_api.py +1896 -0
- qanswer_sdk/api/connector_imapapi_api.py +1775 -0
- qanswer_sdk/api/connector_one_drive_api.py +1579 -0
- qanswer_sdk/api/connector_onenote_api.py +1596 -0
- qanswer_sdk/api/connector_pinecone_api.py +893 -0
- qanswer_sdk/api/connector_publication_office_api_api.py +1230 -0
- qanswer_sdk/api/connector_qn_a_api.py +1521 -0
- qanswer_sdk/api/connector_rdf_answer_api.py +1393 -0
- qanswer_sdk/api/connector_rdf_api.py +5093 -0
- qanswer_sdk/api/connector_sharepoint_api.py +3445 -0
- qanswer_sdk/api/connector_websearch_api.py +332 -0
- qanswer_sdk/api/connector_website_api.py +2829 -0
- qanswer_sdk/api/connectors_api.py +6824 -0
- qanswer_sdk/api/connectors_data_api.py +5415 -0
- qanswer_sdk/api/conversation_logs_api.py +13159 -0
- qanswer_sdk/api/dataset_api.py +6487 -0
- qanswer_sdk/api/dataset_config_api.py +4643 -0
- qanswer_sdk/api/debug_api.py +278 -0
- qanswer_sdk/api/default_api.py +763 -0
- qanswer_sdk/api/embedder_endpoint_api.py +3330 -0
- qanswer_sdk/api/frontend_config_api.py +270 -0
- qanswer_sdk/api/health_check_api_api.py +278 -0
- qanswer_sdk/api/llm_endpoint_api.py +4660 -0
- qanswer_sdk/api/mcp_api.py +11201 -0
- qanswer_sdk/api/metadata_api.py +2070 -0
- qanswer_sdk/api/notifications_api.py +1841 -0
- qanswer_sdk/api/o_auth2_api.py +648 -0
- qanswer_sdk/api/payment_api.py +1852 -0
- qanswer_sdk/api/socket_api.py +4220 -0
- qanswer_sdk/api/speech_to_text_api.py +919 -0
- qanswer_sdk/api/task_ai_excel_api.py +7541 -0
- qanswer_sdk/api/task_chat_api.py +2598 -0
- qanswer_sdk/api/task_document_parsing_api.py +619 -0
- qanswer_sdk/api/task_entity_linking_api.py +315 -0
- qanswer_sdk/api/task_rdf_linker_api.py +4408 -0
- qanswer_sdk/api/task_rdf_sparql_endpoint_api.py +3189 -0
- qanswer_sdk/api/task_rdf_text_linker_api.py +1452 -0
- qanswer_sdk/api/task_report_copilot_api.py +7010 -0
- qanswer_sdk/api/task_search_api.py +2012 -0
- qanswer_sdk/api/task_text2sparql_api.py +902 -0
- qanswer_sdk/api/task_text_classification_api.py +592 -0
- qanswer_sdk/api/tasks_api.py +318 -0
- qanswer_sdk/api/tool_embedder_api.py +5208 -0
- qanswer_sdk/api/tool_llm_api.py +6518 -0
- qanswer_sdk/api/unit_organizations_api.py +7086 -0
- qanswer_sdk/api/unit_teams_api.py +4255 -0
- qanswer_sdk/api/unit_user_api.py +11948 -0
- qanswer_sdk/api/v1_chat_completion_api.py +330 -0
- qanswer_sdk/api/v1_embeddings_api.py +297 -0
- qanswer_sdk/api_client.py +804 -0
- qanswer_sdk/api_response.py +21 -0
- qanswer_sdk/configuration.py +614 -0
- qanswer_sdk/exceptions.py +216 -0
- qanswer_sdk/models/__init__.py +567 -0
- qanswer_sdk/models/access_audio_spans_response_model.py +91 -0
- qanswer_sdk/models/access_pdf_payload_model.py +111 -0
- qanswer_sdk/models/access_type.py +42 -0
- qanswer_sdk/models/access_type_shared.py +38 -0
- qanswer_sdk/models/add_qn_a_request.py +103 -0
- qanswer_sdk/models/add_synonyms.py +93 -0
- qanswer_sdk/models/add_synonyms_resp.py +89 -0
- qanswer_sdk/models/admin_overall_stats_response.py +105 -0
- qanswer_sdk/models/admin_user_overall_stats.py +99 -0
- qanswer_sdk/models/advanced_o_auth2_mcp_authentication_config.py +95 -0
- qanswer_sdk/models/aggregate.py +93 -0
- qanswer_sdk/models/aggregation.py +116 -0
- qanswer_sdk/models/aggregation_type.py +41 -0
- qanswer_sdk/models/aggregations_group.py +102 -0
- qanswer_sdk/models/ai_assistant_clone_response.py +91 -0
- qanswer_sdk/models/ai_assistant_dto.py +122 -0
- qanswer_sdk/models/ai_assistant_filter_dto.py +113 -0
- qanswer_sdk/models/ai_assistant_list.py +101 -0
- qanswer_sdk/models/ai_assistant_share_response.py +93 -0
- qanswer_sdk/models/ai_assistant_shared_access.py +113 -0
- qanswer_sdk/models/ai_excel_task_settings.py +125 -0
- qanswer_sdk/models/ai_excel_task_update.py +125 -0
- qanswer_sdk/models/ai_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/ai_template_base_with_id.py +95 -0
- qanswer_sdk/models/ai_template_cell.py +113 -0
- qanswer_sdk/models/ai_template_cell_base.py +87 -0
- qanswer_sdk/models/ai_template_cell_update_payload.py +95 -0
- qanswer_sdk/models/ai_template_column.py +99 -0
- qanswer_sdk/models/ai_template_column_base.py +93 -0
- qanswer_sdk/models/ai_template_column_update_payload.py +109 -0
- qanswer_sdk/models/ai_template_column_with_cells.py +109 -0
- qanswer_sdk/models/ai_template_create_payload.py +128 -0
- qanswer_sdk/models/ai_template_row.py +93 -0
- qanswer_sdk/models/ai_template_row_base.py +87 -0
- qanswer_sdk/models/ai_template_row_update_payload.py +103 -0
- qanswer_sdk/models/ai_template_row_with_cells.py +103 -0
- qanswer_sdk/models/ai_template_with_cells.py +134 -0
- qanswer_sdk/models/ai_template_with_cells_new_column_id.py +136 -0
- qanswer_sdk/models/allowed_extension.py +53 -0
- qanswer_sdk/models/allowed_file_extensions.py +98 -0
- qanswer_sdk/models/api_key_header_type.py +38 -0
- qanswer_sdk/models/api_key_mcp_authentication_config.py +94 -0
- qanswer_sdk/models/applied_filter_type.py +37 -0
- qanswer_sdk/models/applied_metadata_filter.py +103 -0
- qanswer_sdk/models/apply_template_task_settings_to_slots_response.py +89 -0
- qanswer_sdk/models/assistant_category_color_definition.py +89 -0
- qanswer_sdk/models/assistant_category_color_item.py +89 -0
- qanswer_sdk/models/assistant_category_colors_update_payload.py +95 -0
- qanswer_sdk/models/assistant_category_count.py +91 -0
- qanswer_sdk/models/assistant_message_stop.py +93 -0
- qanswer_sdk/models/assistant_task.py +43 -0
- qanswer_sdk/models/assistant_template.py +111 -0
- qanswer_sdk/models/assistant_template_filter_dto.py +120 -0
- qanswer_sdk/models/assistant_template_with_tools_selection_dto.py +121 -0
- qanswer_sdk/models/audio_allowed_file_extensions.py +87 -0
- qanswer_sdk/models/audio_file_upload_payload.py +107 -0
- qanswer_sdk/models/audio_format.py +37 -0
- qanswer_sdk/models/audio_segment.py +95 -0
- qanswer_sdk/models/audio_segment_update_payload.py +97 -0
- qanswer_sdk/models/audio_segment_update_response.py +91 -0
- qanswer_sdk/models/audio_speaker_update_payload.py +99 -0
- qanswer_sdk/models/audio_speaker_update_response.py +91 -0
- qanswer_sdk/models/audio_transcription_list_response.py +101 -0
- qanswer_sdk/models/audio_transcription_mode.py +37 -0
- qanswer_sdk/models/audio_transcription_record.py +101 -0
- qanswer_sdk/models/audio_upload_response.py +99 -0
- qanswer_sdk/models/audio_upload_transcription.py +99 -0
- qanswer_sdk/models/audio_word_segment.py +93 -0
- qanswer_sdk/models/audio_word_span_change.py +94 -0
- qanswer_sdk/models/audio_word_span_update_payload.py +104 -0
- qanswer_sdk/models/audio_word_span_update_response.py +91 -0
- qanswer_sdk/models/audio_word_update_payload.py +100 -0
- qanswer_sdk/models/audio_word_update_response.py +91 -0
- qanswer_sdk/models/auth_link_response.py +91 -0
- qanswer_sdk/models/auto_bot_description_request.py +89 -0
- qanswer_sdk/models/auto_bot_description_response.py +87 -0
- qanswer_sdk/models/available_aggregation.py +98 -0
- qanswer_sdk/models/available_connectors_response.py +99 -0
- qanswer_sdk/models/available_embedding_models_response.py +95 -0
- qanswer_sdk/models/available_endpoints_response.py +95 -0
- qanswer_sdk/models/available_logs_visibility_policy.py +103 -0
- qanswer_sdk/models/available_space_quota_for_dataset.py +95 -0
- qanswer_sdk/models/available_storage_preference.py +103 -0
- qanswer_sdk/models/base_connectors_response.py +89 -0
- qanswer_sdk/models/base_conversation_response.py +89 -0
- qanswer_sdk/models/base_feedback_response.py +89 -0
- qanswer_sdk/models/bot_answer_length.py +38 -0
- qanswer_sdk/models/branding_app_title.py +87 -0
- qanswer_sdk/models/branding_system_message.py +87 -0
- qanswer_sdk/models/bulk_update_tool_selections_request.py +87 -0
- qanswer_sdk/models/capability_type.py +37 -0
- qanswer_sdk/models/cell.py +89 -0
- qanswer_sdk/models/change_password.py +89 -0
- qanswer_sdk/models/change_password_admin.py +89 -0
- qanswer_sdk/models/change_role.py +96 -0
- qanswer_sdk/models/chat_task_settings.py +141 -0
- qanswer_sdk/models/chat_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/chat_task_update.py +139 -0
- qanswer_sdk/models/chatbot_chat_payload.py +148 -0
- qanswer_sdk/models/chatbot_default_settings_response.py +95 -0
- qanswer_sdk/models/chatbot_llm_dto.py +147 -0
- qanswer_sdk/models/chatbot_response.py +151 -0
- qanswer_sdk/models/chatbot_setting_dto.py +99 -0
- qanswer_sdk/models/chatbot_setting_request.py +91 -0
- qanswer_sdk/models/class_info.py +89 -0
- qanswer_sdk/models/clone_dataset_request.py +104 -0
- qanswer_sdk/models/clone_dataset_response.py +91 -0
- qanswer_sdk/models/config.py +228 -0
- qanswer_sdk/models/config1.py +138 -0
- qanswer_sdk/models/connector_config_list_response.py +99 -0
- qanswer_sdk/models/connector_config_model.py +102 -0
- qanswer_sdk/models/connector_config_patch_payload.py +93 -0
- qanswer_sdk/models/connector_config_response.py +95 -0
- qanswer_sdk/models/connector_config_sync_response.py +93 -0
- qanswer_sdk/models/connector_config_type.py +37 -0
- qanswer_sdk/models/connector_model.py +118 -0
- qanswer_sdk/models/connector_type.py +50 -0
- qanswer_sdk/models/connector_type_dto.py +98 -0
- qanswer_sdk/models/connector_type_list_dto.py +95 -0
- qanswer_sdk/models/content_item.py +130 -0
- qanswer_sdk/models/content_item_type.py +39 -0
- qanswer_sdk/models/conversation_message.py +259 -0
- qanswer_sdk/models/conversation_message_error_key.py +52 -0
- qanswer_sdk/models/conversation_message_search_result.py +121 -0
- qanswer_sdk/models/conversation_model.py +169 -0
- qanswer_sdk/models/conversation_overall_stats.py +97 -0
- qanswer_sdk/models/conversation_overall_stats_response.py +95 -0
- qanswer_sdk/models/conversation_retention_response.py +91 -0
- qanswer_sdk/models/conversation_statistics.py +95 -0
- qanswer_sdk/models/conversation_update.py +93 -0
- qanswer_sdk/models/conversation_users_stats.py +99 -0
- qanswer_sdk/models/conversation_users_stats_response.py +99 -0
- qanswer_sdk/models/coordinates.py +89 -0
- qanswer_sdk/models/cost_summary_dto.py +99 -0
- qanswer_sdk/models/create_connector_request.py +95 -0
- qanswer_sdk/models/create_connector_response.py +95 -0
- qanswer_sdk/models/create_dataset_request.py +145 -0
- qanswer_sdk/models/create_imap_connector_request.py +105 -0
- qanswer_sdk/models/create_pinecone_connector_request.py +97 -0
- qanswer_sdk/models/create_sharepoint_connector_from_certificate_request.py +105 -0
- qanswer_sdk/models/create_sharepoint_connector_request.py +103 -0
- qanswer_sdk/models/credits_info_global_dto.py +97 -0
- qanswer_sdk/models/credits_info_organization_dto.py +95 -0
- qanswer_sdk/models/currency.py +38 -0
- qanswer_sdk/models/data_filling_mode.py +39 -0
- qanswer_sdk/models/data_storage_preference.py +38 -0
- qanswer_sdk/models/dataset_config_request.py +138 -0
- qanswer_sdk/models/dataset_default_values_model.py +138 -0
- qanswer_sdk/models/dataset_detail.py +137 -0
- qanswer_sdk/models/dataset_detail_kg.py +97 -0
- qanswer_sdk/models/dataset_schema.py +242 -0
- qanswer_sdk/models/dataset_size_response.py +91 -0
- qanswer_sdk/models/dataset_type.py +38 -0
- qanswer_sdk/models/dataset_update_object.py +216 -0
- qanswer_sdk/models/dataset_users_response.py +87 -0
- qanswer_sdk/models/default_prompt.py +106 -0
- qanswer_sdk/models/delete_connector_model.py +96 -0
- qanswer_sdk/models/delete_connector_request.py +99 -0
- qanswer_sdk/models/delete_connectors_response.py +89 -0
- qanswer_sdk/models/delete_files_status_response.py +91 -0
- qanswer_sdk/models/delete_index.py +91 -0
- qanswer_sdk/models/delete_index_resp.py +89 -0
- qanswer_sdk/models/delete_qn_a_pair_request.py +95 -0
- qanswer_sdk/models/delete_qn_a_pair_response.py +89 -0
- qanswer_sdk/models/delete_synonym.py +93 -0
- qanswer_sdk/models/delete_synonym_resp.py +89 -0
- qanswer_sdk/models/delete_synonyms.py +91 -0
- qanswer_sdk/models/delete_user_response.py +89 -0
- qanswer_sdk/models/diarization_queue_status.py +99 -0
- qanswer_sdk/models/document_content_response.py +91 -0
- qanswer_sdk/models/document_content_update_model.py +99 -0
- qanswer_sdk/models/document_file_delete_by_connector_model.py +101 -0
- qanswer_sdk/models/document_file_delete_by_id_model.py +91 -0
- qanswer_sdk/models/document_metadata.py +173 -0
- qanswer_sdk/models/document_metadata_list_wrapper.py +100 -0
- qanswer_sdk/models/document_parsing_task_settings.py +130 -0
- qanswer_sdk/models/document_parsing_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/document_parsing_task_update.py +127 -0
- qanswer_sdk/models/document_status_response.py +89 -0
- qanswer_sdk/models/dummy_error.py +89 -0
- qanswer_sdk/models/duplicate_report_template_payload.py +97 -0
- qanswer_sdk/models/duplicate_report_template_response.py +87 -0
- qanswer_sdk/models/e_consilium_connector_config.py +108 -0
- qanswer_sdk/models/e_consilium_search_index_search_response.py +113 -0
- qanswer_sdk/models/econsilium_file_metadata.py +105 -0
- qanswer_sdk/models/econsilium_search_index_add_payload.py +107 -0
- qanswer_sdk/models/econsilium_search_index_additional_fields.py +103 -0
- qanswer_sdk/models/email_folder.py +91 -0
- qanswer_sdk/models/email_request.py +87 -0
- qanswer_sdk/models/embedder_cost_entry.py +91 -0
- qanswer_sdk/models/embedder_cost_filter.py +112 -0
- qanswer_sdk/models/embedder_cost_list.py +111 -0
- qanswer_sdk/models/embedder_create_dto.py +149 -0
- qanswer_sdk/models/embedder_detailed_dto.py +171 -0
- qanswer_sdk/models/embedder_dto.py +101 -0
- qanswer_sdk/models/embedder_list_dto.py +101 -0
- qanswer_sdk/models/embedder_update_dto.py +143 -0
- qanswer_sdk/models/embedding_endpoint.py +149 -0
- qanswer_sdk/models/embedding_endpoint_create.py +147 -0
- qanswer_sdk/models/embedding_endpoint_export_payload.py +87 -0
- qanswer_sdk/models/embedding_endpoint_import_failure.py +89 -0
- qanswer_sdk/models/embedding_endpoint_import_response.py +99 -0
- qanswer_sdk/models/embedding_endpoint_modality.py +37 -0
- qanswer_sdk/models/embedding_endpoint_names_validation_payload.py +87 -0
- qanswer_sdk/models/embedding_endpoint_update.py +141 -0
- qanswer_sdk/models/embedding_endpoint_validation_response.py +96 -0
- qanswer_sdk/models/embedding_model.py +96 -0
- qanswer_sdk/models/embedding_provider.py +44 -0
- qanswer_sdk/models/enable_enhanced_context_payload.py +91 -0
- qanswer_sdk/models/enable_enhanced_context_response.py +87 -0
- qanswer_sdk/models/endpoint_status.py +38 -0
- qanswer_sdk/models/entity_description.py +93 -0
- qanswer_sdk/models/entity_description_dto.py +93 -0
- qanswer_sdk/models/entity_linking_payload.py +97 -0
- qanswer_sdk/models/entity_linking_response.py +97 -0
- qanswer_sdk/models/entity_model_in_linking.py +95 -0
- qanswer_sdk/models/es_meta_data.py +98 -0
- qanswer_sdk/models/es_meta_data_value.py +87 -0
- qanswer_sdk/models/evaluate_feedback_response.py +109 -0
- qanswer_sdk/models/evaluate_single_feedback_response.py +97 -0
- qanswer_sdk/models/external_sources_quota_request.py +91 -0
- qanswer_sdk/models/external_sources_quota_response.py +89 -0
- qanswer_sdk/models/extra_body.py +91 -0
- qanswer_sdk/models/extract_hyper_links_payload.py +100 -0
- qanswer_sdk/models/extract_robot_links_payload.py +88 -0
- qanswer_sdk/models/extract_robot_links_response.py +88 -0
- qanswer_sdk/models/fact.py +96 -0
- qanswer_sdk/models/feedback_evaluation_history_entries_response.py +101 -0
- qanswer_sdk/models/feedback_evaluation_history_entry_model.py +105 -0
- qanswer_sdk/models/feedback_model.py +141 -0
- qanswer_sdk/models/feedback_response.py +95 -0
- qanswer_sdk/models/feedback_update.py +105 -0
- qanswer_sdk/models/file_es_meta_data.py +116 -0
- qanswer_sdk/models/file_failure_reason.py +48 -0
- qanswer_sdk/models/file_folder_model.py +115 -0
- qanswer_sdk/models/file_model.py +130 -0
- qanswer_sdk/models/file_status.py +43 -0
- qanswer_sdk/models/file_type.py +37 -0
- qanswer_sdk/models/file_upload_payload.py +107 -0
- qanswer_sdk/models/files_by_connector_model.py +89 -0
- qanswer_sdk/models/g_drive_connector_info.py +96 -0
- qanswer_sdk/models/g_drive_download_by_ids.py +89 -0
- qanswer_sdk/models/g_drive_download_request.py +103 -0
- qanswer_sdk/models/generate_ai_cells_by_dimension_payload.py +91 -0
- qanswer_sdk/models/generate_ai_cells_payload.py +95 -0
- qanswer_sdk/models/generation_params.py +89 -0
- qanswer_sdk/models/get_aggregations_payload.py +104 -0
- qanswer_sdk/models/get_connector_by_id_response.py +91 -0
- qanswer_sdk/models/get_conversation_response.py +95 -0
- qanswer_sdk/models/global_config_dto.py +135 -0
- qanswer_sdk/models/google_drive_connector_config.py +110 -0
- qanswer_sdk/models/guardrail_endpoint.py +121 -0
- qanswer_sdk/models/guardrail_mode.py +38 -0
- qanswer_sdk/models/highlight_audio_payload_model.py +109 -0
- qanswer_sdk/models/http_validation_error.py +95 -0
- qanswer_sdk/models/iframe_strategy.py +38 -0
- qanswer_sdk/models/image_url_detail.py +38 -0
- qanswer_sdk/models/imap_add_payload.py +105 -0
- qanswer_sdk/models/imap_additional_fields.py +101 -0
- qanswer_sdk/models/imap_file_metadata.py +114 -0
- qanswer_sdk/models/imap_search_response.py +113 -0
- qanswer_sdk/models/index_config.py +89 -0
- qanswer_sdk/models/install_response.py +89 -0
- qanswer_sdk/models/interface_origin.py +48 -0
- qanswer_sdk/models/ip2_geo_response.py +91 -0
- qanswer_sdk/models/is_enabled_response.py +87 -0
- qanswer_sdk/models/jwt_authentication_response.py +93 -0
- qanswer_sdk/models/label.py +89 -0
- qanswer_sdk/models/labeled_node.py +89 -0
- qanswer_sdk/models/language.py +42 -0
- qanswer_sdk/models/last_updated_template_conversation_id_response.py +87 -0
- qanswer_sdk/models/link.py +99 -0
- qanswer_sdk/models/link_extraction_response.py +97 -0
- qanswer_sdk/models/link_result_paginated.py +97 -0
- qanswer_sdk/models/linked_entity_model_in_linking.py +99 -0
- qanswer_sdk/models/linker.py +103 -0
- qanswer_sdk/models/linking_result_input.py +95 -0
- qanswer_sdk/models/linking_result_output.py +95 -0
- qanswer_sdk/models/links.py +99 -0
- qanswer_sdk/models/list_ai_templates_response.py +101 -0
- qanswer_sdk/models/list_connectors_response.py +95 -0
- qanswer_sdk/models/list_conversation_response.py +105 -0
- qanswer_sdk/models/list_feedback_response.py +105 -0
- qanswer_sdk/models/list_files_connector_response.py +107 -0
- qanswer_sdk/models/list_published_assistants_payload.py +115 -0
- qanswer_sdk/models/list_socket_events.py +95 -0
- qanswer_sdk/models/list_synonyms_model.py +95 -0
- qanswer_sdk/models/llm_context_ranges.py +93 -0
- qanswer_sdk/models/llm_context_ranges_response.py +93 -0
- qanswer_sdk/models/llm_cost_entry.py +97 -0
- qanswer_sdk/models/llm_cost_filter.py +112 -0
- qanswer_sdk/models/llm_cost_list.py +111 -0
- qanswer_sdk/models/llm_create_dto.py +208 -0
- qanswer_sdk/models/llm_detailed_dto.py +231 -0
- qanswer_sdk/models/llm_details.py +123 -0
- qanswer_sdk/models/llm_dto.py +147 -0
- qanswer_sdk/models/llm_endpoint.py +212 -0
- qanswer_sdk/models/llm_endpoint_create.py +204 -0
- qanswer_sdk/models/llm_endpoint_default_prompts.py +93 -0
- qanswer_sdk/models/llm_endpoint_export_payload.py +87 -0
- qanswer_sdk/models/llm_endpoint_import_failure.py +89 -0
- qanswer_sdk/models/llm_endpoint_import_response.py +99 -0
- qanswer_sdk/models/llm_endpoint_input.py +212 -0
- qanswer_sdk/models/llm_endpoint_modality.py +37 -0
- qanswer_sdk/models/llm_endpoint_names_validation_payload.py +87 -0
- qanswer_sdk/models/llm_endpoint_provider.py +44 -0
- qanswer_sdk/models/llm_endpoint_read_input.py +212 -0
- qanswer_sdk/models/llm_endpoint_read_output.py +212 -0
- qanswer_sdk/models/llm_endpoint_update.py +204 -0
- qanswer_sdk/models/llm_endpoint_usage_migration_response.py +93 -0
- qanswer_sdk/models/llm_endpoint_validation_response.py +96 -0
- qanswer_sdk/models/llm_filter_dto.py +111 -0
- qanswer_sdk/models/llm_health_response.py +89 -0
- qanswer_sdk/models/llm_list_detailed_dto.py +101 -0
- qanswer_sdk/models/llm_list_dto.py +101 -0
- qanswer_sdk/models/llm_update_dto.py +208 -0
- qanswer_sdk/models/llm_usage_origin.py +63 -0
- qanswer_sdk/models/location_details.py +97 -0
- qanswer_sdk/models/log_request.py +125 -0
- qanswer_sdk/models/login_request.py +89 -0
- qanswer_sdk/models/logs_visibility_policy.py +38 -0
- qanswer_sdk/models/logs_visibility_policy_payload.py +98 -0
- qanswer_sdk/models/logs_visibility_policy_response.py +98 -0
- qanswer_sdk/models/mcp_authentication_type.py +39 -0
- qanswer_sdk/models/mcp_connection.py +105 -0
- qanswer_sdk/models/mcp_connection_create.py +98 -0
- qanswer_sdk/models/mcp_server.py +167 -0
- qanswer_sdk/models/mcp_server0.py +167 -0
- qanswer_sdk/models/mcp_server_create.py +133 -0
- qanswer_sdk/models/mcp_server_dto.py +167 -0
- qanswer_sdk/models/mcp_server_type.py +37 -0
- qanswer_sdk/models/mcp_server_update.py +131 -0
- qanswer_sdk/models/mcp_tool_dto.py +141 -0
- qanswer_sdk/models/mcp_tool_info.py +95 -0
- qanswer_sdk/models/mcp_tool_selection_source.py +37 -0
- qanswer_sdk/models/mcp_tool_update.py +91 -0
- qanswer_sdk/models/mcp_transport.py +37 -0
- qanswer_sdk/models/mcp_visibility.py +38 -0
- qanswer_sdk/models/mcpo_auth2_initiating_origin.py +42 -0
- qanswer_sdk/models/message_role.py +38 -0
- qanswer_sdk/models/messages_stats_per_day_response.py +99 -0
- qanswer_sdk/models/microsoft_connector_config.py +110 -0
- qanswer_sdk/models/modify_connector_request.py +107 -0
- qanswer_sdk/models/modify_file_display_name_request.py +97 -0
- qanswer_sdk/models/notification_dto.py +137 -0
- qanswer_sdk/models/notification_filter.py +116 -0
- qanswer_sdk/models/notification_list_dto.py +101 -0
- qanswer_sdk/models/notification_payload_add_to_org_dto.py +87 -0
- qanswer_sdk/models/notification_payload_add_to_team_dto.py +89 -0
- qanswer_sdk/models/notification_payload_ai_assistant_shared_dto.py +109 -0
- qanswer_sdk/models/notification_payload_conversation_shared_dto.py +105 -0
- qanswer_sdk/models/notification_payload_dto.py +193 -0
- qanswer_sdk/models/notification_payload_human_takeover_requested_dto.py +89 -0
- qanswer_sdk/models/notification_payload_quota_reaching_dto.py +91 -0
- qanswer_sdk/models/notification_read_dto.py +89 -0
- qanswer_sdk/models/notification_type.py +44 -0
- qanswer_sdk/models/o_auth_redirect_response.py +89 -0
- qanswer_sdk/models/o_auth_service_dto.py +89 -0
- qanswer_sdk/models/one_drive_download_by_ids.py +89 -0
- qanswer_sdk/models/one_drive_download_request.py +103 -0
- qanswer_sdk/models/one_note_download_by_ids.py +91 -0
- qanswer_sdk/models/one_note_download_request.py +103 -0
- qanswer_sdk/models/org_llm_detailed_dto.py +105 -0
- qanswer_sdk/models/organization.py +93 -0
- qanswer_sdk/models/organization_creation.py +91 -0
- qanswer_sdk/models/organization_dto.py +93 -0
- qanswer_sdk/models/organization_filter_dto.py +134 -0
- qanswer_sdk/models/organization_list_dto.py +101 -0
- qanswer_sdk/models/paginated_report_templates.py +101 -0
- qanswer_sdk/models/password.py +89 -0
- qanswer_sdk/models/pinecone_index_model.py +91 -0
- qanswer_sdk/models/plan_dto.py +132 -0
- qanswer_sdk/models/predicted_class.py +89 -0
- qanswer_sdk/models/prepare_synonyms_upload_resp.py +99 -0
- qanswer_sdk/models/prepared_synonym_group.py +87 -0
- qanswer_sdk/models/pricing_plan.py +51 -0
- qanswer_sdk/models/pricing_type.py +38 -0
- qanswer_sdk/models/prompt_type.py +51 -0
- qanswer_sdk/models/provider.py +87 -0
- qanswer_sdk/models/publication_add_payload.py +105 -0
- qanswer_sdk/models/publication_file_metadata.py +105 -0
- qanswer_sdk/models/publication_office_additional_fields.py +111 -0
- qanswer_sdk/models/publication_office_connector_config.py +110 -0
- qanswer_sdk/models/publication_search_index_search_response.py +113 -0
- qanswer_sdk/models/published_assistant_from_java.py +94 -0
- qanswer_sdk/models/put_cell_payload.py +89 -0
- qanswer_sdk/models/qa_context.py +129 -0
- qanswer_sdk/models/qa_context_display_type.py +44 -0
- qanswer_sdk/models/qa_contexts.py +116 -0
- qanswer_sdk/models/qa_table.py +100 -0
- qanswer_sdk/models/qn_a_pair_model.py +103 -0
- qanswer_sdk/models/qn_a_pair_response.py +95 -0
- qanswer_sdk/models/question_suggestion_response.py +87 -0
- qanswer_sdk/models/rag_params.py +89 -0
- qanswer_sdk/models/rag_payload.py +186 -0
- qanswer_sdk/models/rag_response.py +155 -0
- qanswer_sdk/models/rdf_entity_linker_response.py +99 -0
- qanswer_sdk/models/rdf_linked_entity.py +97 -0
- qanswer_sdk/models/reasoning_effort.py +39 -0
- qanswer_sdk/models/reference_model.py +99 -0
- qanswer_sdk/models/refresh_frequency.py +39 -0
- qanswer_sdk/models/refresh_token_request.py +87 -0
- qanswer_sdk/models/refresh_website_connector_payload.py +94 -0
- qanswer_sdk/models/register_pinecone_connector_request.py +95 -0
- qanswer_sdk/models/report_copilot_generation_from_slots_ack.py +91 -0
- qanswer_sdk/models/report_copilot_generation_from_slots_payload.py +95 -0
- qanswer_sdk/models/report_copilot_refinement_payload.py +106 -0
- qanswer_sdk/models/report_copilot_refinement_response.py +87 -0
- qanswer_sdk/models/report_copilot_slot_feedback_update.py +95 -0
- qanswer_sdk/models/report_copilot_slot_feedback_update_response.py +95 -0
- qanswer_sdk/models/report_copilot_slot_task_settings.py +127 -0
- qanswer_sdk/models/report_copilot_slot_task_settings_update.py +127 -0
- qanswer_sdk/models/report_copilot_task_settings.py +125 -0
- qanswer_sdk/models/report_copilot_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/report_copilot_task_update.py +125 -0
- qanswer_sdk/models/report_template.py +139 -0
- qanswer_sdk/models/report_template_create_payload.py +117 -0
- qanswer_sdk/models/report_template_image_upload_response.py +87 -0
- qanswer_sdk/models/report_template_simplified.py +115 -0
- qanswer_sdk/models/report_template_simplified_payload.py +91 -0
- qanswer_sdk/models/report_template_task_settings_update_payload.py +91 -0
- qanswer_sdk/models/report_template_update_payload.py +121 -0
- qanswer_sdk/models/report_templates_search_payload.py +106 -0
- qanswer_sdk/models/reset_password.py +87 -0
- qanswer_sdk/models/response_audit_model.py +99 -0
- qanswer_sdk/models/response_audit_stats_response.py +101 -0
- qanswer_sdk/models/response_get_dummy_union_connector_config_model_backend_api_connectors_config_dummy_models_union_get.py +228 -0
- qanswer_sdk/models/retreive_all_synonyms_resp.py +99 -0
- qanswer_sdk/models/retry_params.py +89 -0
- qanswer_sdk/models/return_type.py +38 -0
- qanswer_sdk/models/role.py +99 -0
- qanswer_sdk/models/role_name.py +37 -0
- qanswer_sdk/models/scrolling_strategy.py +37 -0
- qanswer_sdk/models/search_conversation_messages_response.py +105 -0
- qanswer_sdk/models/search_document_response.py +105 -0
- qanswer_sdk/models/search_index_payload.py +114 -0
- qanswer_sdk/models/search_metadata_filter.py +94 -0
- qanswer_sdk/models/search_payload.py +146 -0
- qanswer_sdk/models/search_response.py +125 -0
- qanswer_sdk/models/search_synonyms_resp.py +91 -0
- qanswer_sdk/models/search_task_settings.py +139 -0
- qanswer_sdk/models/search_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/search_task_update.py +137 -0
- qanswer_sdk/models/sender_type.py +38 -0
- qanswer_sdk/models/share_point_connector_settings.py +94 -0
- qanswer_sdk/models/share_point_download_by_ids.py +99 -0
- qanswer_sdk/models/share_point_download_request.py +103 -0
- qanswer_sdk/models/shared_by.py +38 -0
- qanswer_sdk/models/shared_entity_type.py +38 -0
- qanswer_sdk/models/shared_organization_access.py +125 -0
- qanswer_sdk/models/shared_organization_access_dto.py +125 -0
- qanswer_sdk/models/shared_team_access.py +125 -0
- qanswer_sdk/models/shared_team_access_dto.py +125 -0
- qanswer_sdk/models/shared_user.py +99 -0
- qanswer_sdk/models/sign_up_request.py +108 -0
- qanswer_sdk/models/signout_request.py +87 -0
- qanswer_sdk/models/slot.py +162 -0
- qanswer_sdk/models/slot_history_entry.py +127 -0
- qanswer_sdk/models/slot_in_prompt.py +91 -0
- qanswer_sdk/models/slot_info_with_latest_version.py +95 -0
- qanswer_sdk/models/slot_update.py +142 -0
- qanswer_sdk/models/socker_join_user.py +91 -0
- qanswer_sdk/models/socket_ai_cell_generation.py +99 -0
- qanswer_sdk/models/socket_conversation_message.py +280 -0
- qanswer_sdk/models/socket_events_q_answer.py +51 -0
- qanswer_sdk/models/socket_feedback_evaluation_progress.py +114 -0
- qanswer_sdk/models/socket_file_metadata.py +207 -0
- qanswer_sdk/models/socket_join_conversation.py +97 -0
- qanswer_sdk/models/socket_join_dataset.py +93 -0
- qanswer_sdk/models/socket_message_status.py +40 -0
- qanswer_sdk/models/socket_notification.py +127 -0
- qanswer_sdk/models/socket_report_continuation_response.py +106 -0
- qanswer_sdk/models/socket_report_copilot_generation_from_slots_response.py +122 -0
- qanswer_sdk/models/socket_report_copilot_generation_from_template_response.py +122 -0
- qanswer_sdk/models/socket_report_copilot_refinement_response.py +108 -0
- qanswer_sdk/models/socket_speech2_text_response.py +131 -0
- qanswer_sdk/models/socket_stop_conversation.py +97 -0
- qanswer_sdk/models/source.py +125 -0
- qanswer_sdk/models/source_metadata.py +109 -0
- qanswer_sdk/models/speech2_text_response.py +119 -0
- qanswer_sdk/models/stat_per_date.py +89 -0
- qanswer_sdk/models/status_response.py +89 -0
- qanswer_sdk/models/stop_template_generation_payload.py +91 -0
- qanswer_sdk/models/storage_active_status.py +37 -0
- qanswer_sdk/models/subscription_response.py +101 -0
- qanswer_sdk/models/subscription_status.py +39 -0
- qanswer_sdk/models/suggestion_list_response.py +87 -0
- qanswer_sdk/models/summa_server.py +101 -0
- qanswer_sdk/models/task_category.py +58 -0
- qanswer_sdk/models/task_name.py +43 -0
- qanswer_sdk/models/team.py +93 -0
- qanswer_sdk/models/team_creation.py +89 -0
- qanswer_sdk/models/team_creation_dto.py +89 -0
- qanswer_sdk/models/team_dto.py +93 -0
- qanswer_sdk/models/team_filter_dto.py +141 -0
- qanswer_sdk/models/team_list_dto.py +101 -0
- qanswer_sdk/models/template_clip_structure.py +114 -0
- qanswer_sdk/models/template_toggle_request.py +93 -0
- qanswer_sdk/models/terms_bucket.py +94 -0
- qanswer_sdk/models/test_imap_connection_payload.py +95 -0
- qanswer_sdk/models/text2_sparql_payload.py +188 -0
- qanswer_sdk/models/text2_sparql_task_settings.py +125 -0
- qanswer_sdk/models/text2_sparql_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/text2_sparql_task_update.py +125 -0
- qanswer_sdk/models/text_classification_payload.py +99 -0
- qanswer_sdk/models/text_classification_response.py +87 -0
- qanswer_sdk/models/text_classification_v2_payload.py +99 -0
- qanswer_sdk/models/text_classification_v2_response.py +95 -0
- qanswer_sdk/models/thinking_block.py +91 -0
- qanswer_sdk/models/tool_selection.py +89 -0
- qanswer_sdk/models/total_stat.py +96 -0
- qanswer_sdk/models/ui_mappings.py +141 -0
- qanswer_sdk/models/update_cells_payload.py +93 -0
- qanswer_sdk/models/update_file_es_meta_data.py +116 -0
- qanswer_sdk/models/update_metadata_model_input.py +97 -0
- qanswer_sdk/models/update_metadata_model_output.py +97 -0
- qanswer_sdk/models/update_qn_a_pair_request.py +101 -0
- qanswer_sdk/models/update_qn_a_pair_response.py +89 -0
- qanswer_sdk/models/update_synonyms.py +95 -0
- qanswer_sdk/models/update_synonyms_resp.py +89 -0
- qanswer_sdk/models/update_template_cells_payload.py +101 -0
- qanswer_sdk/models/upload_metadata.py +115 -0
- qanswer_sdk/models/user.py +91 -0
- qanswer_sdk/models/user_credits_config_dto.py +99 -0
- qanswer_sdk/models/user_credits_dto.py +106 -0
- qanswer_sdk/models/user_dataset_api_key.py +120 -0
- qanswer_sdk/models/user_dataset_api_key_dto.py +120 -0
- qanswer_sdk/models/user_dataset_mcp_tool_selection_dto.py +102 -0
- qanswer_sdk/models/user_dto.py +91 -0
- qanswer_sdk/models/user_filter_dto.py +155 -0
- qanswer_sdk/models/user_identity_availability.py +87 -0
- qanswer_sdk/models/user_info_dto.py +95 -0
- qanswer_sdk/models/user_list_dto.py +101 -0
- qanswer_sdk/models/user_log.py +102 -0
- qanswer_sdk/models/user_log_dto.py +102 -0
- qanswer_sdk/models/user_logs_list_dto.py +97 -0
- qanswer_sdk/models/user_mcp_tool_selection_dto.py +118 -0
- qanswer_sdk/models/user_oauth_token.py +96 -0
- qanswer_sdk/models/user_oauth_token_dto.py +96 -0
- qanswer_sdk/models/user_profile_dto.py +200 -0
- qanswer_sdk/models/user_profile_list_dto.py +101 -0
- qanswer_sdk/models/user_stat_per_date.py +90 -0
- qanswer_sdk/models/validation_error.py +108 -0
- qanswer_sdk/models/validation_error_loc_inner.py +138 -0
- qanswer_sdk/models/warn_visibility.py +40 -0
- qanswer_sdk/models/websearch_connector_config.py +102 -0
- qanswer_sdk/models/websearch_scraping_site.py +91 -0
- qanswer_sdk/models/website_add_payload.py +102 -0
- qanswer_sdk/models/website_connector_config.py +102 -0
- qanswer_sdk/models/website_connector_settings.py +160 -0
- qanswer_sdk/models/widget_configs.py +109 -0
- qanswer_sdk/py.typed +0 -0
- qanswer_sdk/rest.py +258 -0
- qanswer_sdk-0.46.0.dev0.dist-info/METADATA +252 -0
- qanswer_sdk-0.46.0.dev0.dist-info/RECORD +624 -0
- qanswer_sdk-0.46.0.dev0.dist-info/WHEEL +5 -0
- qanswer_sdk-0.46.0.dev0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,3189 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
free-text-client
|
|
5
|
+
|
|
6
|
+
QAnswer 2.0 API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import StrictBool, StrictBytes, StrictStr
|
|
20
|
+
from typing import Any, Dict, Optional, Tuple, Union
|
|
21
|
+
|
|
22
|
+
from qanswer_sdk.api_client import ApiClient, RequestSerialized
|
|
23
|
+
from qanswer_sdk.api_response import ApiResponse
|
|
24
|
+
from qanswer_sdk.rest import RESTResponseType
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class TaskRDFSparqlEndpointApi:
|
|
28
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
29
|
+
Ref: https://openapi-generator.tech
|
|
30
|
+
|
|
31
|
+
Do not edit the class manually.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
def __init__(self, api_client=None) -> None:
|
|
35
|
+
if api_client is None:
|
|
36
|
+
api_client = ApiClient.get_default()
|
|
37
|
+
self.api_client = api_client
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
@validate_call
|
|
41
|
+
def format(
|
|
42
|
+
self,
|
|
43
|
+
username: StrictStr,
|
|
44
|
+
dataset: StrictStr,
|
|
45
|
+
query: Optional[StrictStr] = None,
|
|
46
|
+
base_uri: Optional[StrictStr] = None,
|
|
47
|
+
_request_timeout: Union[
|
|
48
|
+
None,
|
|
49
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
50
|
+
Tuple[
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
53
|
+
]
|
|
54
|
+
] = None,
|
|
55
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
56
|
+
_content_type: Optional[StrictStr] = None,
|
|
57
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
59
|
+
) -> Dict[str, object]:
|
|
60
|
+
"""Pretty-format a SPARQL query
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
:param username: (required)
|
|
64
|
+
:type username: str
|
|
65
|
+
:param dataset: (required)
|
|
66
|
+
:type dataset: str
|
|
67
|
+
:param query:
|
|
68
|
+
:type query: str
|
|
69
|
+
:param base_uri:
|
|
70
|
+
:type base_uri: str
|
|
71
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
72
|
+
number provided, it will be total request
|
|
73
|
+
timeout. It can also be a pair (tuple) of
|
|
74
|
+
(connection, read) timeouts.
|
|
75
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
76
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
77
|
+
request; this effectively ignores the
|
|
78
|
+
authentication in the spec for a single request.
|
|
79
|
+
:type _request_auth: dict, optional
|
|
80
|
+
:param _content_type: force content-type for the request.
|
|
81
|
+
:type _content_type: str, Optional
|
|
82
|
+
:param _headers: set to override the headers for a single
|
|
83
|
+
request; this effectively ignores the headers
|
|
84
|
+
in the spec for a single request.
|
|
85
|
+
:type _headers: dict, optional
|
|
86
|
+
:param _host_index: set to override the host_index for a single
|
|
87
|
+
request; this effectively ignores the host_index
|
|
88
|
+
in the spec for a single request.
|
|
89
|
+
:type _host_index: int, optional
|
|
90
|
+
:return: Returns the result object.
|
|
91
|
+
""" # noqa: E501
|
|
92
|
+
|
|
93
|
+
_param = self._format_serialize(
|
|
94
|
+
username=username,
|
|
95
|
+
dataset=dataset,
|
|
96
|
+
query=query,
|
|
97
|
+
base_uri=base_uri,
|
|
98
|
+
_request_auth=_request_auth,
|
|
99
|
+
_content_type=_content_type,
|
|
100
|
+
_headers=_headers,
|
|
101
|
+
_host_index=_host_index
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
105
|
+
'200': "Dict[str, object]",
|
|
106
|
+
'422': "HTTPValidationError",
|
|
107
|
+
}
|
|
108
|
+
response_data = self.api_client.call_api(
|
|
109
|
+
*_param,
|
|
110
|
+
_request_timeout=_request_timeout
|
|
111
|
+
)
|
|
112
|
+
response_data.read()
|
|
113
|
+
return self.api_client.response_deserialize(
|
|
114
|
+
response_data=response_data,
|
|
115
|
+
response_types_map=_response_types_map,
|
|
116
|
+
).data
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
@validate_call
|
|
120
|
+
def format_with_http_info(
|
|
121
|
+
self,
|
|
122
|
+
username: StrictStr,
|
|
123
|
+
dataset: StrictStr,
|
|
124
|
+
query: Optional[StrictStr] = None,
|
|
125
|
+
base_uri: Optional[StrictStr] = None,
|
|
126
|
+
_request_timeout: Union[
|
|
127
|
+
None,
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
129
|
+
Tuple[
|
|
130
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
131
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
132
|
+
]
|
|
133
|
+
] = None,
|
|
134
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
135
|
+
_content_type: Optional[StrictStr] = None,
|
|
136
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
137
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
138
|
+
) -> ApiResponse[Dict[str, object]]:
|
|
139
|
+
"""Pretty-format a SPARQL query
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
:param username: (required)
|
|
143
|
+
:type username: str
|
|
144
|
+
:param dataset: (required)
|
|
145
|
+
:type dataset: str
|
|
146
|
+
:param query:
|
|
147
|
+
:type query: str
|
|
148
|
+
:param base_uri:
|
|
149
|
+
:type base_uri: str
|
|
150
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
151
|
+
number provided, it will be total request
|
|
152
|
+
timeout. It can also be a pair (tuple) of
|
|
153
|
+
(connection, read) timeouts.
|
|
154
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
155
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
156
|
+
request; this effectively ignores the
|
|
157
|
+
authentication in the spec for a single request.
|
|
158
|
+
:type _request_auth: dict, optional
|
|
159
|
+
:param _content_type: force content-type for the request.
|
|
160
|
+
:type _content_type: str, Optional
|
|
161
|
+
:param _headers: set to override the headers for a single
|
|
162
|
+
request; this effectively ignores the headers
|
|
163
|
+
in the spec for a single request.
|
|
164
|
+
:type _headers: dict, optional
|
|
165
|
+
:param _host_index: set to override the host_index for a single
|
|
166
|
+
request; this effectively ignores the host_index
|
|
167
|
+
in the spec for a single request.
|
|
168
|
+
:type _host_index: int, optional
|
|
169
|
+
:return: Returns the result object.
|
|
170
|
+
""" # noqa: E501
|
|
171
|
+
|
|
172
|
+
_param = self._format_serialize(
|
|
173
|
+
username=username,
|
|
174
|
+
dataset=dataset,
|
|
175
|
+
query=query,
|
|
176
|
+
base_uri=base_uri,
|
|
177
|
+
_request_auth=_request_auth,
|
|
178
|
+
_content_type=_content_type,
|
|
179
|
+
_headers=_headers,
|
|
180
|
+
_host_index=_host_index
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
184
|
+
'200': "Dict[str, object]",
|
|
185
|
+
'422': "HTTPValidationError",
|
|
186
|
+
}
|
|
187
|
+
response_data = self.api_client.call_api(
|
|
188
|
+
*_param,
|
|
189
|
+
_request_timeout=_request_timeout
|
|
190
|
+
)
|
|
191
|
+
response_data.read()
|
|
192
|
+
return self.api_client.response_deserialize(
|
|
193
|
+
response_data=response_data,
|
|
194
|
+
response_types_map=_response_types_map,
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
@validate_call
|
|
199
|
+
def format_without_preload_content(
|
|
200
|
+
self,
|
|
201
|
+
username: StrictStr,
|
|
202
|
+
dataset: StrictStr,
|
|
203
|
+
query: Optional[StrictStr] = None,
|
|
204
|
+
base_uri: Optional[StrictStr] = None,
|
|
205
|
+
_request_timeout: Union[
|
|
206
|
+
None,
|
|
207
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
208
|
+
Tuple[
|
|
209
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
210
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
211
|
+
]
|
|
212
|
+
] = None,
|
|
213
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
214
|
+
_content_type: Optional[StrictStr] = None,
|
|
215
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
216
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
217
|
+
) -> RESTResponseType:
|
|
218
|
+
"""Pretty-format a SPARQL query
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
:param username: (required)
|
|
222
|
+
:type username: str
|
|
223
|
+
:param dataset: (required)
|
|
224
|
+
:type dataset: str
|
|
225
|
+
:param query:
|
|
226
|
+
:type query: str
|
|
227
|
+
:param base_uri:
|
|
228
|
+
:type base_uri: str
|
|
229
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
230
|
+
number provided, it will be total request
|
|
231
|
+
timeout. It can also be a pair (tuple) of
|
|
232
|
+
(connection, read) timeouts.
|
|
233
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
234
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
235
|
+
request; this effectively ignores the
|
|
236
|
+
authentication in the spec for a single request.
|
|
237
|
+
:type _request_auth: dict, optional
|
|
238
|
+
:param _content_type: force content-type for the request.
|
|
239
|
+
:type _content_type: str, Optional
|
|
240
|
+
:param _headers: set to override the headers for a single
|
|
241
|
+
request; this effectively ignores the headers
|
|
242
|
+
in the spec for a single request.
|
|
243
|
+
:type _headers: dict, optional
|
|
244
|
+
:param _host_index: set to override the host_index for a single
|
|
245
|
+
request; this effectively ignores the host_index
|
|
246
|
+
in the spec for a single request.
|
|
247
|
+
:type _host_index: int, optional
|
|
248
|
+
:return: Returns the result object.
|
|
249
|
+
""" # noqa: E501
|
|
250
|
+
|
|
251
|
+
_param = self._format_serialize(
|
|
252
|
+
username=username,
|
|
253
|
+
dataset=dataset,
|
|
254
|
+
query=query,
|
|
255
|
+
base_uri=base_uri,
|
|
256
|
+
_request_auth=_request_auth,
|
|
257
|
+
_content_type=_content_type,
|
|
258
|
+
_headers=_headers,
|
|
259
|
+
_host_index=_host_index
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
263
|
+
'200': "Dict[str, object]",
|
|
264
|
+
'422': "HTTPValidationError",
|
|
265
|
+
}
|
|
266
|
+
response_data = self.api_client.call_api(
|
|
267
|
+
*_param,
|
|
268
|
+
_request_timeout=_request_timeout
|
|
269
|
+
)
|
|
270
|
+
return response_data.response
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
def _format_serialize(
|
|
274
|
+
self,
|
|
275
|
+
username,
|
|
276
|
+
dataset,
|
|
277
|
+
query,
|
|
278
|
+
base_uri,
|
|
279
|
+
_request_auth,
|
|
280
|
+
_content_type,
|
|
281
|
+
_headers,
|
|
282
|
+
_host_index,
|
|
283
|
+
) -> RequestSerialized:
|
|
284
|
+
|
|
285
|
+
_host = None
|
|
286
|
+
|
|
287
|
+
_collection_formats: Dict[str, str] = {
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
_path_params: Dict[str, str] = {}
|
|
291
|
+
_query_params: List[Tuple[str, str]] = []
|
|
292
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
293
|
+
_form_params: List[Tuple[str, str]] = []
|
|
294
|
+
_files: Dict[
|
|
295
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
296
|
+
] = {}
|
|
297
|
+
_body_params: Optional[bytes] = None
|
|
298
|
+
|
|
299
|
+
# process the path parameters
|
|
300
|
+
if username is not None:
|
|
301
|
+
_path_params['username'] = username
|
|
302
|
+
if dataset is not None:
|
|
303
|
+
_path_params['dataset'] = dataset
|
|
304
|
+
# process the query parameters
|
|
305
|
+
if query is not None:
|
|
306
|
+
|
|
307
|
+
_query_params.append(('query', query))
|
|
308
|
+
|
|
309
|
+
if base_uri is not None:
|
|
310
|
+
|
|
311
|
+
_query_params.append(('baseURI', base_uri))
|
|
312
|
+
|
|
313
|
+
# process the header parameters
|
|
314
|
+
# process the form parameters
|
|
315
|
+
# process the body parameter
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
# set the HTTP header `Accept`
|
|
319
|
+
if 'Accept' not in _header_params:
|
|
320
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
321
|
+
[
|
|
322
|
+
'application/json'
|
|
323
|
+
]
|
|
324
|
+
)
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
# authentication setting
|
|
328
|
+
_auth_settings: List[str] = [
|
|
329
|
+
]
|
|
330
|
+
|
|
331
|
+
return self.api_client.param_serialize(
|
|
332
|
+
method='GET',
|
|
333
|
+
resource_path='/backend/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/format',
|
|
334
|
+
path_params=_path_params,
|
|
335
|
+
query_params=_query_params,
|
|
336
|
+
header_params=_header_params,
|
|
337
|
+
body=_body_params,
|
|
338
|
+
post_params=_form_params,
|
|
339
|
+
files=_files,
|
|
340
|
+
auth_settings=_auth_settings,
|
|
341
|
+
collection_formats=_collection_formats,
|
|
342
|
+
_host=_host,
|
|
343
|
+
_request_auth=_request_auth
|
|
344
|
+
)
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
@validate_call
|
|
350
|
+
def has_index(
|
|
351
|
+
self,
|
|
352
|
+
username: StrictStr,
|
|
353
|
+
dataset: StrictStr,
|
|
354
|
+
_request_timeout: Union[
|
|
355
|
+
None,
|
|
356
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
357
|
+
Tuple[
|
|
358
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
359
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
360
|
+
]
|
|
361
|
+
] = None,
|
|
362
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
363
|
+
_content_type: Optional[StrictStr] = None,
|
|
364
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
365
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
366
|
+
) -> bool:
|
|
367
|
+
"""Check if dataset has an index
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
:param username: (required)
|
|
371
|
+
:type username: str
|
|
372
|
+
:param dataset: (required)
|
|
373
|
+
:type dataset: str
|
|
374
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
375
|
+
number provided, it will be total request
|
|
376
|
+
timeout. It can also be a pair (tuple) of
|
|
377
|
+
(connection, read) timeouts.
|
|
378
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
379
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
380
|
+
request; this effectively ignores the
|
|
381
|
+
authentication in the spec for a single request.
|
|
382
|
+
:type _request_auth: dict, optional
|
|
383
|
+
:param _content_type: force content-type for the request.
|
|
384
|
+
:type _content_type: str, Optional
|
|
385
|
+
:param _headers: set to override the headers for a single
|
|
386
|
+
request; this effectively ignores the headers
|
|
387
|
+
in the spec for a single request.
|
|
388
|
+
:type _headers: dict, optional
|
|
389
|
+
:param _host_index: set to override the host_index for a single
|
|
390
|
+
request; this effectively ignores the host_index
|
|
391
|
+
in the spec for a single request.
|
|
392
|
+
:type _host_index: int, optional
|
|
393
|
+
:return: Returns the result object.
|
|
394
|
+
""" # noqa: E501
|
|
395
|
+
|
|
396
|
+
_param = self._has_index_serialize(
|
|
397
|
+
username=username,
|
|
398
|
+
dataset=dataset,
|
|
399
|
+
_request_auth=_request_auth,
|
|
400
|
+
_content_type=_content_type,
|
|
401
|
+
_headers=_headers,
|
|
402
|
+
_host_index=_host_index
|
|
403
|
+
)
|
|
404
|
+
|
|
405
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
406
|
+
'200': "bool",
|
|
407
|
+
'422': "HTTPValidationError",
|
|
408
|
+
}
|
|
409
|
+
response_data = self.api_client.call_api(
|
|
410
|
+
*_param,
|
|
411
|
+
_request_timeout=_request_timeout
|
|
412
|
+
)
|
|
413
|
+
response_data.read()
|
|
414
|
+
return self.api_client.response_deserialize(
|
|
415
|
+
response_data=response_data,
|
|
416
|
+
response_types_map=_response_types_map,
|
|
417
|
+
).data
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
@validate_call
|
|
421
|
+
def has_index_with_http_info(
|
|
422
|
+
self,
|
|
423
|
+
username: StrictStr,
|
|
424
|
+
dataset: StrictStr,
|
|
425
|
+
_request_timeout: Union[
|
|
426
|
+
None,
|
|
427
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
428
|
+
Tuple[
|
|
429
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
430
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
431
|
+
]
|
|
432
|
+
] = None,
|
|
433
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
434
|
+
_content_type: Optional[StrictStr] = None,
|
|
435
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
436
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
437
|
+
) -> ApiResponse[bool]:
|
|
438
|
+
"""Check if dataset has an index
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
:param username: (required)
|
|
442
|
+
:type username: str
|
|
443
|
+
:param dataset: (required)
|
|
444
|
+
:type dataset: str
|
|
445
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
446
|
+
number provided, it will be total request
|
|
447
|
+
timeout. It can also be a pair (tuple) of
|
|
448
|
+
(connection, read) timeouts.
|
|
449
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
450
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
451
|
+
request; this effectively ignores the
|
|
452
|
+
authentication in the spec for a single request.
|
|
453
|
+
:type _request_auth: dict, optional
|
|
454
|
+
:param _content_type: force content-type for the request.
|
|
455
|
+
:type _content_type: str, Optional
|
|
456
|
+
:param _headers: set to override the headers for a single
|
|
457
|
+
request; this effectively ignores the headers
|
|
458
|
+
in the spec for a single request.
|
|
459
|
+
:type _headers: dict, optional
|
|
460
|
+
:param _host_index: set to override the host_index for a single
|
|
461
|
+
request; this effectively ignores the host_index
|
|
462
|
+
in the spec for a single request.
|
|
463
|
+
:type _host_index: int, optional
|
|
464
|
+
:return: Returns the result object.
|
|
465
|
+
""" # noqa: E501
|
|
466
|
+
|
|
467
|
+
_param = self._has_index_serialize(
|
|
468
|
+
username=username,
|
|
469
|
+
dataset=dataset,
|
|
470
|
+
_request_auth=_request_auth,
|
|
471
|
+
_content_type=_content_type,
|
|
472
|
+
_headers=_headers,
|
|
473
|
+
_host_index=_host_index
|
|
474
|
+
)
|
|
475
|
+
|
|
476
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
477
|
+
'200': "bool",
|
|
478
|
+
'422': "HTTPValidationError",
|
|
479
|
+
}
|
|
480
|
+
response_data = self.api_client.call_api(
|
|
481
|
+
*_param,
|
|
482
|
+
_request_timeout=_request_timeout
|
|
483
|
+
)
|
|
484
|
+
response_data.read()
|
|
485
|
+
return self.api_client.response_deserialize(
|
|
486
|
+
response_data=response_data,
|
|
487
|
+
response_types_map=_response_types_map,
|
|
488
|
+
)
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
@validate_call
|
|
492
|
+
def has_index_without_preload_content(
|
|
493
|
+
self,
|
|
494
|
+
username: StrictStr,
|
|
495
|
+
dataset: StrictStr,
|
|
496
|
+
_request_timeout: Union[
|
|
497
|
+
None,
|
|
498
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
499
|
+
Tuple[
|
|
500
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
501
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
502
|
+
]
|
|
503
|
+
] = None,
|
|
504
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
505
|
+
_content_type: Optional[StrictStr] = None,
|
|
506
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
507
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
508
|
+
) -> RESTResponseType:
|
|
509
|
+
"""Check if dataset has an index
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
:param username: (required)
|
|
513
|
+
:type username: str
|
|
514
|
+
:param dataset: (required)
|
|
515
|
+
:type dataset: str
|
|
516
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
517
|
+
number provided, it will be total request
|
|
518
|
+
timeout. It can also be a pair (tuple) of
|
|
519
|
+
(connection, read) timeouts.
|
|
520
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
521
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
522
|
+
request; this effectively ignores the
|
|
523
|
+
authentication in the spec for a single request.
|
|
524
|
+
:type _request_auth: dict, optional
|
|
525
|
+
:param _content_type: force content-type for the request.
|
|
526
|
+
:type _content_type: str, Optional
|
|
527
|
+
:param _headers: set to override the headers for a single
|
|
528
|
+
request; this effectively ignores the headers
|
|
529
|
+
in the spec for a single request.
|
|
530
|
+
:type _headers: dict, optional
|
|
531
|
+
:param _host_index: set to override the host_index for a single
|
|
532
|
+
request; this effectively ignores the host_index
|
|
533
|
+
in the spec for a single request.
|
|
534
|
+
:type _host_index: int, optional
|
|
535
|
+
:return: Returns the result object.
|
|
536
|
+
""" # noqa: E501
|
|
537
|
+
|
|
538
|
+
_param = self._has_index_serialize(
|
|
539
|
+
username=username,
|
|
540
|
+
dataset=dataset,
|
|
541
|
+
_request_auth=_request_auth,
|
|
542
|
+
_content_type=_content_type,
|
|
543
|
+
_headers=_headers,
|
|
544
|
+
_host_index=_host_index
|
|
545
|
+
)
|
|
546
|
+
|
|
547
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
548
|
+
'200': "bool",
|
|
549
|
+
'422': "HTTPValidationError",
|
|
550
|
+
}
|
|
551
|
+
response_data = self.api_client.call_api(
|
|
552
|
+
*_param,
|
|
553
|
+
_request_timeout=_request_timeout
|
|
554
|
+
)
|
|
555
|
+
return response_data.response
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
def _has_index_serialize(
|
|
559
|
+
self,
|
|
560
|
+
username,
|
|
561
|
+
dataset,
|
|
562
|
+
_request_auth,
|
|
563
|
+
_content_type,
|
|
564
|
+
_headers,
|
|
565
|
+
_host_index,
|
|
566
|
+
) -> RequestSerialized:
|
|
567
|
+
|
|
568
|
+
_host = None
|
|
569
|
+
|
|
570
|
+
_collection_formats: Dict[str, str] = {
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
_path_params: Dict[str, str] = {}
|
|
574
|
+
_query_params: List[Tuple[str, str]] = []
|
|
575
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
576
|
+
_form_params: List[Tuple[str, str]] = []
|
|
577
|
+
_files: Dict[
|
|
578
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
579
|
+
] = {}
|
|
580
|
+
_body_params: Optional[bytes] = None
|
|
581
|
+
|
|
582
|
+
# process the path parameters
|
|
583
|
+
if username is not None:
|
|
584
|
+
_path_params['username'] = username
|
|
585
|
+
if dataset is not None:
|
|
586
|
+
_path_params['dataset'] = dataset
|
|
587
|
+
# process the query parameters
|
|
588
|
+
# process the header parameters
|
|
589
|
+
# process the form parameters
|
|
590
|
+
# process the body parameter
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
# set the HTTP header `Accept`
|
|
594
|
+
if 'Accept' not in _header_params:
|
|
595
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
596
|
+
[
|
|
597
|
+
'application/json'
|
|
598
|
+
]
|
|
599
|
+
)
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
# authentication setting
|
|
603
|
+
_auth_settings: List[str] = [
|
|
604
|
+
'QAnswer-Api-Key',
|
|
605
|
+
'Bearer token'
|
|
606
|
+
]
|
|
607
|
+
|
|
608
|
+
return self.api_client.param_serialize(
|
|
609
|
+
method='GET',
|
|
610
|
+
resource_path='/backend/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/has-index',
|
|
611
|
+
path_params=_path_params,
|
|
612
|
+
query_params=_query_params,
|
|
613
|
+
header_params=_header_params,
|
|
614
|
+
body=_body_params,
|
|
615
|
+
post_params=_form_params,
|
|
616
|
+
files=_files,
|
|
617
|
+
auth_settings=_auth_settings,
|
|
618
|
+
collection_formats=_collection_formats,
|
|
619
|
+
_host=_host,
|
|
620
|
+
_request_auth=_request_auth
|
|
621
|
+
)
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
@validate_call
|
|
627
|
+
def is_merging(
|
|
628
|
+
self,
|
|
629
|
+
username: StrictStr,
|
|
630
|
+
dataset: StrictStr,
|
|
631
|
+
_request_timeout: Union[
|
|
632
|
+
None,
|
|
633
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
634
|
+
Tuple[
|
|
635
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
636
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
637
|
+
]
|
|
638
|
+
] = None,
|
|
639
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
640
|
+
_content_type: Optional[StrictStr] = None,
|
|
641
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
642
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
643
|
+
) -> Dict[str, object]:
|
|
644
|
+
"""Check if dataset is merging
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
:param username: (required)
|
|
648
|
+
:type username: str
|
|
649
|
+
:param dataset: (required)
|
|
650
|
+
:type dataset: str
|
|
651
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
652
|
+
number provided, it will be total request
|
|
653
|
+
timeout. It can also be a pair (tuple) of
|
|
654
|
+
(connection, read) timeouts.
|
|
655
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
656
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
657
|
+
request; this effectively ignores the
|
|
658
|
+
authentication in the spec for a single request.
|
|
659
|
+
:type _request_auth: dict, optional
|
|
660
|
+
:param _content_type: force content-type for the request.
|
|
661
|
+
:type _content_type: str, Optional
|
|
662
|
+
:param _headers: set to override the headers for a single
|
|
663
|
+
request; this effectively ignores the headers
|
|
664
|
+
in the spec for a single request.
|
|
665
|
+
:type _headers: dict, optional
|
|
666
|
+
:param _host_index: set to override the host_index for a single
|
|
667
|
+
request; this effectively ignores the host_index
|
|
668
|
+
in the spec for a single request.
|
|
669
|
+
:type _host_index: int, optional
|
|
670
|
+
:return: Returns the result object.
|
|
671
|
+
""" # noqa: E501
|
|
672
|
+
|
|
673
|
+
_param = self._is_merging_serialize(
|
|
674
|
+
username=username,
|
|
675
|
+
dataset=dataset,
|
|
676
|
+
_request_auth=_request_auth,
|
|
677
|
+
_content_type=_content_type,
|
|
678
|
+
_headers=_headers,
|
|
679
|
+
_host_index=_host_index
|
|
680
|
+
)
|
|
681
|
+
|
|
682
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
683
|
+
'200': "Dict[str, object]",
|
|
684
|
+
'422': "HTTPValidationError",
|
|
685
|
+
}
|
|
686
|
+
response_data = self.api_client.call_api(
|
|
687
|
+
*_param,
|
|
688
|
+
_request_timeout=_request_timeout
|
|
689
|
+
)
|
|
690
|
+
response_data.read()
|
|
691
|
+
return self.api_client.response_deserialize(
|
|
692
|
+
response_data=response_data,
|
|
693
|
+
response_types_map=_response_types_map,
|
|
694
|
+
).data
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
@validate_call
|
|
698
|
+
def is_merging_with_http_info(
|
|
699
|
+
self,
|
|
700
|
+
username: StrictStr,
|
|
701
|
+
dataset: StrictStr,
|
|
702
|
+
_request_timeout: Union[
|
|
703
|
+
None,
|
|
704
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
705
|
+
Tuple[
|
|
706
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
707
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
708
|
+
]
|
|
709
|
+
] = None,
|
|
710
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
711
|
+
_content_type: Optional[StrictStr] = None,
|
|
712
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
713
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
714
|
+
) -> ApiResponse[Dict[str, object]]:
|
|
715
|
+
"""Check if dataset is merging
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
:param username: (required)
|
|
719
|
+
:type username: str
|
|
720
|
+
:param dataset: (required)
|
|
721
|
+
:type dataset: str
|
|
722
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
723
|
+
number provided, it will be total request
|
|
724
|
+
timeout. It can also be a pair (tuple) of
|
|
725
|
+
(connection, read) timeouts.
|
|
726
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
727
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
728
|
+
request; this effectively ignores the
|
|
729
|
+
authentication in the spec for a single request.
|
|
730
|
+
:type _request_auth: dict, optional
|
|
731
|
+
:param _content_type: force content-type for the request.
|
|
732
|
+
:type _content_type: str, Optional
|
|
733
|
+
:param _headers: set to override the headers for a single
|
|
734
|
+
request; this effectively ignores the headers
|
|
735
|
+
in the spec for a single request.
|
|
736
|
+
:type _headers: dict, optional
|
|
737
|
+
:param _host_index: set to override the host_index for a single
|
|
738
|
+
request; this effectively ignores the host_index
|
|
739
|
+
in the spec for a single request.
|
|
740
|
+
:type _host_index: int, optional
|
|
741
|
+
:return: Returns the result object.
|
|
742
|
+
""" # noqa: E501
|
|
743
|
+
|
|
744
|
+
_param = self._is_merging_serialize(
|
|
745
|
+
username=username,
|
|
746
|
+
dataset=dataset,
|
|
747
|
+
_request_auth=_request_auth,
|
|
748
|
+
_content_type=_content_type,
|
|
749
|
+
_headers=_headers,
|
|
750
|
+
_host_index=_host_index
|
|
751
|
+
)
|
|
752
|
+
|
|
753
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
754
|
+
'200': "Dict[str, object]",
|
|
755
|
+
'422': "HTTPValidationError",
|
|
756
|
+
}
|
|
757
|
+
response_data = self.api_client.call_api(
|
|
758
|
+
*_param,
|
|
759
|
+
_request_timeout=_request_timeout
|
|
760
|
+
)
|
|
761
|
+
response_data.read()
|
|
762
|
+
return self.api_client.response_deserialize(
|
|
763
|
+
response_data=response_data,
|
|
764
|
+
response_types_map=_response_types_map,
|
|
765
|
+
)
|
|
766
|
+
|
|
767
|
+
|
|
768
|
+
@validate_call
|
|
769
|
+
def is_merging_without_preload_content(
|
|
770
|
+
self,
|
|
771
|
+
username: StrictStr,
|
|
772
|
+
dataset: StrictStr,
|
|
773
|
+
_request_timeout: Union[
|
|
774
|
+
None,
|
|
775
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
776
|
+
Tuple[
|
|
777
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
778
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
779
|
+
]
|
|
780
|
+
] = None,
|
|
781
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
782
|
+
_content_type: Optional[StrictStr] = None,
|
|
783
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
784
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
785
|
+
) -> RESTResponseType:
|
|
786
|
+
"""Check if dataset is merging
|
|
787
|
+
|
|
788
|
+
|
|
789
|
+
:param username: (required)
|
|
790
|
+
:type username: str
|
|
791
|
+
:param dataset: (required)
|
|
792
|
+
:type dataset: str
|
|
793
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
794
|
+
number provided, it will be total request
|
|
795
|
+
timeout. It can also be a pair (tuple) of
|
|
796
|
+
(connection, read) timeouts.
|
|
797
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
798
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
799
|
+
request; this effectively ignores the
|
|
800
|
+
authentication in the spec for a single request.
|
|
801
|
+
:type _request_auth: dict, optional
|
|
802
|
+
:param _content_type: force content-type for the request.
|
|
803
|
+
:type _content_type: str, Optional
|
|
804
|
+
:param _headers: set to override the headers for a single
|
|
805
|
+
request; this effectively ignores the headers
|
|
806
|
+
in the spec for a single request.
|
|
807
|
+
:type _headers: dict, optional
|
|
808
|
+
:param _host_index: set to override the host_index for a single
|
|
809
|
+
request; this effectively ignores the host_index
|
|
810
|
+
in the spec for a single request.
|
|
811
|
+
:type _host_index: int, optional
|
|
812
|
+
:return: Returns the result object.
|
|
813
|
+
""" # noqa: E501
|
|
814
|
+
|
|
815
|
+
_param = self._is_merging_serialize(
|
|
816
|
+
username=username,
|
|
817
|
+
dataset=dataset,
|
|
818
|
+
_request_auth=_request_auth,
|
|
819
|
+
_content_type=_content_type,
|
|
820
|
+
_headers=_headers,
|
|
821
|
+
_host_index=_host_index
|
|
822
|
+
)
|
|
823
|
+
|
|
824
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
825
|
+
'200': "Dict[str, object]",
|
|
826
|
+
'422': "HTTPValidationError",
|
|
827
|
+
}
|
|
828
|
+
response_data = self.api_client.call_api(
|
|
829
|
+
*_param,
|
|
830
|
+
_request_timeout=_request_timeout
|
|
831
|
+
)
|
|
832
|
+
return response_data.response
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
def _is_merging_serialize(
|
|
836
|
+
self,
|
|
837
|
+
username,
|
|
838
|
+
dataset,
|
|
839
|
+
_request_auth,
|
|
840
|
+
_content_type,
|
|
841
|
+
_headers,
|
|
842
|
+
_host_index,
|
|
843
|
+
) -> RequestSerialized:
|
|
844
|
+
|
|
845
|
+
_host = None
|
|
846
|
+
|
|
847
|
+
_collection_formats: Dict[str, str] = {
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
_path_params: Dict[str, str] = {}
|
|
851
|
+
_query_params: List[Tuple[str, str]] = []
|
|
852
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
853
|
+
_form_params: List[Tuple[str, str]] = []
|
|
854
|
+
_files: Dict[
|
|
855
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
856
|
+
] = {}
|
|
857
|
+
_body_params: Optional[bytes] = None
|
|
858
|
+
|
|
859
|
+
# process the path parameters
|
|
860
|
+
if username is not None:
|
|
861
|
+
_path_params['username'] = username
|
|
862
|
+
if dataset is not None:
|
|
863
|
+
_path_params['dataset'] = dataset
|
|
864
|
+
# process the query parameters
|
|
865
|
+
# process the header parameters
|
|
866
|
+
# process the form parameters
|
|
867
|
+
# process the body parameter
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
# set the HTTP header `Accept`
|
|
871
|
+
if 'Accept' not in _header_params:
|
|
872
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
873
|
+
[
|
|
874
|
+
'application/json'
|
|
875
|
+
]
|
|
876
|
+
)
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
# authentication setting
|
|
880
|
+
_auth_settings: List[str] = [
|
|
881
|
+
'QAnswer-Api-Key',
|
|
882
|
+
'Bearer token'
|
|
883
|
+
]
|
|
884
|
+
|
|
885
|
+
return self.api_client.param_serialize(
|
|
886
|
+
method='GET',
|
|
887
|
+
resource_path='/backend/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/is-merging',
|
|
888
|
+
path_params=_path_params,
|
|
889
|
+
query_params=_query_params,
|
|
890
|
+
header_params=_header_params,
|
|
891
|
+
body=_body_params,
|
|
892
|
+
post_params=_form_params,
|
|
893
|
+
files=_files,
|
|
894
|
+
auth_settings=_auth_settings,
|
|
895
|
+
collection_formats=_collection_formats,
|
|
896
|
+
_host=_host,
|
|
897
|
+
_request_auth=_request_auth
|
|
898
|
+
)
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
@validate_call
|
|
904
|
+
def load_data(
|
|
905
|
+
self,
|
|
906
|
+
username: StrictStr,
|
|
907
|
+
dataset: StrictStr,
|
|
908
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
909
|
+
_request_timeout: Union[
|
|
910
|
+
None,
|
|
911
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
912
|
+
Tuple[
|
|
913
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
914
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
915
|
+
]
|
|
916
|
+
] = None,
|
|
917
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
918
|
+
_content_type: Optional[StrictStr] = None,
|
|
919
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
920
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
921
|
+
) -> object:
|
|
922
|
+
"""Load data into a dataset
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
:param username: (required)
|
|
926
|
+
:type username: str
|
|
927
|
+
:param dataset: (required)
|
|
928
|
+
:type dataset: str
|
|
929
|
+
:param file: (required)
|
|
930
|
+
:type file: bytearray
|
|
931
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
932
|
+
number provided, it will be total request
|
|
933
|
+
timeout. It can also be a pair (tuple) of
|
|
934
|
+
(connection, read) timeouts.
|
|
935
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
936
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
937
|
+
request; this effectively ignores the
|
|
938
|
+
authentication in the spec for a single request.
|
|
939
|
+
:type _request_auth: dict, optional
|
|
940
|
+
:param _content_type: force content-type for the request.
|
|
941
|
+
:type _content_type: str, Optional
|
|
942
|
+
:param _headers: set to override the headers for a single
|
|
943
|
+
request; this effectively ignores the headers
|
|
944
|
+
in the spec for a single request.
|
|
945
|
+
:type _headers: dict, optional
|
|
946
|
+
:param _host_index: set to override the host_index for a single
|
|
947
|
+
request; this effectively ignores the host_index
|
|
948
|
+
in the spec for a single request.
|
|
949
|
+
:type _host_index: int, optional
|
|
950
|
+
:return: Returns the result object.
|
|
951
|
+
""" # noqa: E501
|
|
952
|
+
|
|
953
|
+
_param = self._load_data_serialize(
|
|
954
|
+
username=username,
|
|
955
|
+
dataset=dataset,
|
|
956
|
+
file=file,
|
|
957
|
+
_request_auth=_request_auth,
|
|
958
|
+
_content_type=_content_type,
|
|
959
|
+
_headers=_headers,
|
|
960
|
+
_host_index=_host_index
|
|
961
|
+
)
|
|
962
|
+
|
|
963
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
964
|
+
'200': "object",
|
|
965
|
+
'422': "HTTPValidationError",
|
|
966
|
+
}
|
|
967
|
+
response_data = self.api_client.call_api(
|
|
968
|
+
*_param,
|
|
969
|
+
_request_timeout=_request_timeout
|
|
970
|
+
)
|
|
971
|
+
response_data.read()
|
|
972
|
+
return self.api_client.response_deserialize(
|
|
973
|
+
response_data=response_data,
|
|
974
|
+
response_types_map=_response_types_map,
|
|
975
|
+
).data
|
|
976
|
+
|
|
977
|
+
|
|
978
|
+
@validate_call
|
|
979
|
+
def load_data_with_http_info(
|
|
980
|
+
self,
|
|
981
|
+
username: StrictStr,
|
|
982
|
+
dataset: StrictStr,
|
|
983
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
984
|
+
_request_timeout: Union[
|
|
985
|
+
None,
|
|
986
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
987
|
+
Tuple[
|
|
988
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
989
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
990
|
+
]
|
|
991
|
+
] = None,
|
|
992
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
993
|
+
_content_type: Optional[StrictStr] = None,
|
|
994
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
995
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
996
|
+
) -> ApiResponse[object]:
|
|
997
|
+
"""Load data into a dataset
|
|
998
|
+
|
|
999
|
+
|
|
1000
|
+
:param username: (required)
|
|
1001
|
+
:type username: str
|
|
1002
|
+
:param dataset: (required)
|
|
1003
|
+
:type dataset: str
|
|
1004
|
+
:param file: (required)
|
|
1005
|
+
:type file: bytearray
|
|
1006
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1007
|
+
number provided, it will be total request
|
|
1008
|
+
timeout. It can also be a pair (tuple) of
|
|
1009
|
+
(connection, read) timeouts.
|
|
1010
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1011
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1012
|
+
request; this effectively ignores the
|
|
1013
|
+
authentication in the spec for a single request.
|
|
1014
|
+
:type _request_auth: dict, optional
|
|
1015
|
+
:param _content_type: force content-type for the request.
|
|
1016
|
+
:type _content_type: str, Optional
|
|
1017
|
+
:param _headers: set to override the headers for a single
|
|
1018
|
+
request; this effectively ignores the headers
|
|
1019
|
+
in the spec for a single request.
|
|
1020
|
+
:type _headers: dict, optional
|
|
1021
|
+
:param _host_index: set to override the host_index for a single
|
|
1022
|
+
request; this effectively ignores the host_index
|
|
1023
|
+
in the spec for a single request.
|
|
1024
|
+
:type _host_index: int, optional
|
|
1025
|
+
:return: Returns the result object.
|
|
1026
|
+
""" # noqa: E501
|
|
1027
|
+
|
|
1028
|
+
_param = self._load_data_serialize(
|
|
1029
|
+
username=username,
|
|
1030
|
+
dataset=dataset,
|
|
1031
|
+
file=file,
|
|
1032
|
+
_request_auth=_request_auth,
|
|
1033
|
+
_content_type=_content_type,
|
|
1034
|
+
_headers=_headers,
|
|
1035
|
+
_host_index=_host_index
|
|
1036
|
+
)
|
|
1037
|
+
|
|
1038
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1039
|
+
'200': "object",
|
|
1040
|
+
'422': "HTTPValidationError",
|
|
1041
|
+
}
|
|
1042
|
+
response_data = self.api_client.call_api(
|
|
1043
|
+
*_param,
|
|
1044
|
+
_request_timeout=_request_timeout
|
|
1045
|
+
)
|
|
1046
|
+
response_data.read()
|
|
1047
|
+
return self.api_client.response_deserialize(
|
|
1048
|
+
response_data=response_data,
|
|
1049
|
+
response_types_map=_response_types_map,
|
|
1050
|
+
)
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
@validate_call
|
|
1054
|
+
def load_data_without_preload_content(
|
|
1055
|
+
self,
|
|
1056
|
+
username: StrictStr,
|
|
1057
|
+
dataset: StrictStr,
|
|
1058
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
1059
|
+
_request_timeout: Union[
|
|
1060
|
+
None,
|
|
1061
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1062
|
+
Tuple[
|
|
1063
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1064
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1065
|
+
]
|
|
1066
|
+
] = None,
|
|
1067
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1068
|
+
_content_type: Optional[StrictStr] = None,
|
|
1069
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1070
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1071
|
+
) -> RESTResponseType:
|
|
1072
|
+
"""Load data into a dataset
|
|
1073
|
+
|
|
1074
|
+
|
|
1075
|
+
:param username: (required)
|
|
1076
|
+
:type username: str
|
|
1077
|
+
:param dataset: (required)
|
|
1078
|
+
:type dataset: str
|
|
1079
|
+
:param file: (required)
|
|
1080
|
+
:type file: bytearray
|
|
1081
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1082
|
+
number provided, it will be total request
|
|
1083
|
+
timeout. It can also be a pair (tuple) of
|
|
1084
|
+
(connection, read) timeouts.
|
|
1085
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1086
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1087
|
+
request; this effectively ignores the
|
|
1088
|
+
authentication in the spec for a single request.
|
|
1089
|
+
:type _request_auth: dict, optional
|
|
1090
|
+
:param _content_type: force content-type for the request.
|
|
1091
|
+
:type _content_type: str, Optional
|
|
1092
|
+
:param _headers: set to override the headers for a single
|
|
1093
|
+
request; this effectively ignores the headers
|
|
1094
|
+
in the spec for a single request.
|
|
1095
|
+
:type _headers: dict, optional
|
|
1096
|
+
:param _host_index: set to override the host_index for a single
|
|
1097
|
+
request; this effectively ignores the host_index
|
|
1098
|
+
in the spec for a single request.
|
|
1099
|
+
:type _host_index: int, optional
|
|
1100
|
+
:return: Returns the result object.
|
|
1101
|
+
""" # noqa: E501
|
|
1102
|
+
|
|
1103
|
+
_param = self._load_data_serialize(
|
|
1104
|
+
username=username,
|
|
1105
|
+
dataset=dataset,
|
|
1106
|
+
file=file,
|
|
1107
|
+
_request_auth=_request_auth,
|
|
1108
|
+
_content_type=_content_type,
|
|
1109
|
+
_headers=_headers,
|
|
1110
|
+
_host_index=_host_index
|
|
1111
|
+
)
|
|
1112
|
+
|
|
1113
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1114
|
+
'200': "object",
|
|
1115
|
+
'422': "HTTPValidationError",
|
|
1116
|
+
}
|
|
1117
|
+
response_data = self.api_client.call_api(
|
|
1118
|
+
*_param,
|
|
1119
|
+
_request_timeout=_request_timeout
|
|
1120
|
+
)
|
|
1121
|
+
return response_data.response
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
def _load_data_serialize(
|
|
1125
|
+
self,
|
|
1126
|
+
username,
|
|
1127
|
+
dataset,
|
|
1128
|
+
file,
|
|
1129
|
+
_request_auth,
|
|
1130
|
+
_content_type,
|
|
1131
|
+
_headers,
|
|
1132
|
+
_host_index,
|
|
1133
|
+
) -> RequestSerialized:
|
|
1134
|
+
|
|
1135
|
+
_host = None
|
|
1136
|
+
|
|
1137
|
+
_collection_formats: Dict[str, str] = {
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
_path_params: Dict[str, str] = {}
|
|
1141
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1142
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1143
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1144
|
+
_files: Dict[
|
|
1145
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1146
|
+
] = {}
|
|
1147
|
+
_body_params: Optional[bytes] = None
|
|
1148
|
+
|
|
1149
|
+
# process the path parameters
|
|
1150
|
+
if username is not None:
|
|
1151
|
+
_path_params['username'] = username
|
|
1152
|
+
if dataset is not None:
|
|
1153
|
+
_path_params['dataset'] = dataset
|
|
1154
|
+
# process the query parameters
|
|
1155
|
+
# process the header parameters
|
|
1156
|
+
# process the form parameters
|
|
1157
|
+
if file is not None:
|
|
1158
|
+
_files['file'] = file
|
|
1159
|
+
# process the body parameter
|
|
1160
|
+
|
|
1161
|
+
|
|
1162
|
+
# set the HTTP header `Accept`
|
|
1163
|
+
if 'Accept' not in _header_params:
|
|
1164
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1165
|
+
[
|
|
1166
|
+
'application/json'
|
|
1167
|
+
]
|
|
1168
|
+
)
|
|
1169
|
+
|
|
1170
|
+
# set the HTTP header `Content-Type`
|
|
1171
|
+
if _content_type:
|
|
1172
|
+
_header_params['Content-Type'] = _content_type
|
|
1173
|
+
else:
|
|
1174
|
+
_default_content_type = (
|
|
1175
|
+
self.api_client.select_header_content_type(
|
|
1176
|
+
[
|
|
1177
|
+
'multipart/form-data'
|
|
1178
|
+
]
|
|
1179
|
+
)
|
|
1180
|
+
)
|
|
1181
|
+
if _default_content_type is not None:
|
|
1182
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1183
|
+
|
|
1184
|
+
# authentication setting
|
|
1185
|
+
_auth_settings: List[str] = [
|
|
1186
|
+
'QAnswer-Api-Key',
|
|
1187
|
+
'Bearer token'
|
|
1188
|
+
]
|
|
1189
|
+
|
|
1190
|
+
return self.api_client.param_serialize(
|
|
1191
|
+
method='POST',
|
|
1192
|
+
resource_path='/backend/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/load',
|
|
1193
|
+
path_params=_path_params,
|
|
1194
|
+
query_params=_query_params,
|
|
1195
|
+
header_params=_header_params,
|
|
1196
|
+
body=_body_params,
|
|
1197
|
+
post_params=_form_params,
|
|
1198
|
+
files=_files,
|
|
1199
|
+
auth_settings=_auth_settings,
|
|
1200
|
+
collection_formats=_collection_formats,
|
|
1201
|
+
_host=_host,
|
|
1202
|
+
_request_auth=_request_auth
|
|
1203
|
+
)
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
|
|
1207
|
+
|
|
1208
|
+
@validate_call
|
|
1209
|
+
def merge_store(
|
|
1210
|
+
self,
|
|
1211
|
+
username: StrictStr,
|
|
1212
|
+
dataset: StrictStr,
|
|
1213
|
+
_request_timeout: Union[
|
|
1214
|
+
None,
|
|
1215
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1216
|
+
Tuple[
|
|
1217
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1218
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1219
|
+
]
|
|
1220
|
+
] = None,
|
|
1221
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1222
|
+
_content_type: Optional[StrictStr] = None,
|
|
1223
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1224
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1225
|
+
) -> Dict[str, object]:
|
|
1226
|
+
"""Trigger HDT dump (merge)
|
|
1227
|
+
|
|
1228
|
+
|
|
1229
|
+
:param username: (required)
|
|
1230
|
+
:type username: str
|
|
1231
|
+
:param dataset: (required)
|
|
1232
|
+
:type dataset: str
|
|
1233
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1234
|
+
number provided, it will be total request
|
|
1235
|
+
timeout. It can also be a pair (tuple) of
|
|
1236
|
+
(connection, read) timeouts.
|
|
1237
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1238
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1239
|
+
request; this effectively ignores the
|
|
1240
|
+
authentication in the spec for a single request.
|
|
1241
|
+
:type _request_auth: dict, optional
|
|
1242
|
+
:param _content_type: force content-type for the request.
|
|
1243
|
+
:type _content_type: str, Optional
|
|
1244
|
+
:param _headers: set to override the headers for a single
|
|
1245
|
+
request; this effectively ignores the headers
|
|
1246
|
+
in the spec for a single request.
|
|
1247
|
+
:type _headers: dict, optional
|
|
1248
|
+
:param _host_index: set to override the host_index for a single
|
|
1249
|
+
request; this effectively ignores the host_index
|
|
1250
|
+
in the spec for a single request.
|
|
1251
|
+
:type _host_index: int, optional
|
|
1252
|
+
:return: Returns the result object.
|
|
1253
|
+
""" # noqa: E501
|
|
1254
|
+
|
|
1255
|
+
_param = self._merge_store_serialize(
|
|
1256
|
+
username=username,
|
|
1257
|
+
dataset=dataset,
|
|
1258
|
+
_request_auth=_request_auth,
|
|
1259
|
+
_content_type=_content_type,
|
|
1260
|
+
_headers=_headers,
|
|
1261
|
+
_host_index=_host_index
|
|
1262
|
+
)
|
|
1263
|
+
|
|
1264
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1265
|
+
'200': "Dict[str, object]",
|
|
1266
|
+
'422': "HTTPValidationError",
|
|
1267
|
+
}
|
|
1268
|
+
response_data = self.api_client.call_api(
|
|
1269
|
+
*_param,
|
|
1270
|
+
_request_timeout=_request_timeout
|
|
1271
|
+
)
|
|
1272
|
+
response_data.read()
|
|
1273
|
+
return self.api_client.response_deserialize(
|
|
1274
|
+
response_data=response_data,
|
|
1275
|
+
response_types_map=_response_types_map,
|
|
1276
|
+
).data
|
|
1277
|
+
|
|
1278
|
+
|
|
1279
|
+
@validate_call
|
|
1280
|
+
def merge_store_with_http_info(
|
|
1281
|
+
self,
|
|
1282
|
+
username: StrictStr,
|
|
1283
|
+
dataset: StrictStr,
|
|
1284
|
+
_request_timeout: Union[
|
|
1285
|
+
None,
|
|
1286
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1287
|
+
Tuple[
|
|
1288
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1289
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1290
|
+
]
|
|
1291
|
+
] = None,
|
|
1292
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1293
|
+
_content_type: Optional[StrictStr] = None,
|
|
1294
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1295
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1296
|
+
) -> ApiResponse[Dict[str, object]]:
|
|
1297
|
+
"""Trigger HDT dump (merge)
|
|
1298
|
+
|
|
1299
|
+
|
|
1300
|
+
:param username: (required)
|
|
1301
|
+
:type username: str
|
|
1302
|
+
:param dataset: (required)
|
|
1303
|
+
:type dataset: str
|
|
1304
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1305
|
+
number provided, it will be total request
|
|
1306
|
+
timeout. It can also be a pair (tuple) of
|
|
1307
|
+
(connection, read) timeouts.
|
|
1308
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1309
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1310
|
+
request; this effectively ignores the
|
|
1311
|
+
authentication in the spec for a single request.
|
|
1312
|
+
:type _request_auth: dict, optional
|
|
1313
|
+
:param _content_type: force content-type for the request.
|
|
1314
|
+
:type _content_type: str, Optional
|
|
1315
|
+
:param _headers: set to override the headers for a single
|
|
1316
|
+
request; this effectively ignores the headers
|
|
1317
|
+
in the spec for a single request.
|
|
1318
|
+
:type _headers: dict, optional
|
|
1319
|
+
:param _host_index: set to override the host_index for a single
|
|
1320
|
+
request; this effectively ignores the host_index
|
|
1321
|
+
in the spec for a single request.
|
|
1322
|
+
:type _host_index: int, optional
|
|
1323
|
+
:return: Returns the result object.
|
|
1324
|
+
""" # noqa: E501
|
|
1325
|
+
|
|
1326
|
+
_param = self._merge_store_serialize(
|
|
1327
|
+
username=username,
|
|
1328
|
+
dataset=dataset,
|
|
1329
|
+
_request_auth=_request_auth,
|
|
1330
|
+
_content_type=_content_type,
|
|
1331
|
+
_headers=_headers,
|
|
1332
|
+
_host_index=_host_index
|
|
1333
|
+
)
|
|
1334
|
+
|
|
1335
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1336
|
+
'200': "Dict[str, object]",
|
|
1337
|
+
'422': "HTTPValidationError",
|
|
1338
|
+
}
|
|
1339
|
+
response_data = self.api_client.call_api(
|
|
1340
|
+
*_param,
|
|
1341
|
+
_request_timeout=_request_timeout
|
|
1342
|
+
)
|
|
1343
|
+
response_data.read()
|
|
1344
|
+
return self.api_client.response_deserialize(
|
|
1345
|
+
response_data=response_data,
|
|
1346
|
+
response_types_map=_response_types_map,
|
|
1347
|
+
)
|
|
1348
|
+
|
|
1349
|
+
|
|
1350
|
+
@validate_call
|
|
1351
|
+
def merge_store_without_preload_content(
|
|
1352
|
+
self,
|
|
1353
|
+
username: StrictStr,
|
|
1354
|
+
dataset: StrictStr,
|
|
1355
|
+
_request_timeout: Union[
|
|
1356
|
+
None,
|
|
1357
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1358
|
+
Tuple[
|
|
1359
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1360
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1361
|
+
]
|
|
1362
|
+
] = None,
|
|
1363
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1364
|
+
_content_type: Optional[StrictStr] = None,
|
|
1365
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1366
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1367
|
+
) -> RESTResponseType:
|
|
1368
|
+
"""Trigger HDT dump (merge)
|
|
1369
|
+
|
|
1370
|
+
|
|
1371
|
+
:param username: (required)
|
|
1372
|
+
:type username: str
|
|
1373
|
+
:param dataset: (required)
|
|
1374
|
+
:type dataset: str
|
|
1375
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1376
|
+
number provided, it will be total request
|
|
1377
|
+
timeout. It can also be a pair (tuple) of
|
|
1378
|
+
(connection, read) timeouts.
|
|
1379
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1380
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1381
|
+
request; this effectively ignores the
|
|
1382
|
+
authentication in the spec for a single request.
|
|
1383
|
+
:type _request_auth: dict, optional
|
|
1384
|
+
:param _content_type: force content-type for the request.
|
|
1385
|
+
:type _content_type: str, Optional
|
|
1386
|
+
:param _headers: set to override the headers for a single
|
|
1387
|
+
request; this effectively ignores the headers
|
|
1388
|
+
in the spec for a single request.
|
|
1389
|
+
:type _headers: dict, optional
|
|
1390
|
+
:param _host_index: set to override the host_index for a single
|
|
1391
|
+
request; this effectively ignores the host_index
|
|
1392
|
+
in the spec for a single request.
|
|
1393
|
+
:type _host_index: int, optional
|
|
1394
|
+
:return: Returns the result object.
|
|
1395
|
+
""" # noqa: E501
|
|
1396
|
+
|
|
1397
|
+
_param = self._merge_store_serialize(
|
|
1398
|
+
username=username,
|
|
1399
|
+
dataset=dataset,
|
|
1400
|
+
_request_auth=_request_auth,
|
|
1401
|
+
_content_type=_content_type,
|
|
1402
|
+
_headers=_headers,
|
|
1403
|
+
_host_index=_host_index
|
|
1404
|
+
)
|
|
1405
|
+
|
|
1406
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1407
|
+
'200': "Dict[str, object]",
|
|
1408
|
+
'422': "HTTPValidationError",
|
|
1409
|
+
}
|
|
1410
|
+
response_data = self.api_client.call_api(
|
|
1411
|
+
*_param,
|
|
1412
|
+
_request_timeout=_request_timeout
|
|
1413
|
+
)
|
|
1414
|
+
return response_data.response
|
|
1415
|
+
|
|
1416
|
+
|
|
1417
|
+
def _merge_store_serialize(
|
|
1418
|
+
self,
|
|
1419
|
+
username,
|
|
1420
|
+
dataset,
|
|
1421
|
+
_request_auth,
|
|
1422
|
+
_content_type,
|
|
1423
|
+
_headers,
|
|
1424
|
+
_host_index,
|
|
1425
|
+
) -> RequestSerialized:
|
|
1426
|
+
|
|
1427
|
+
_host = None
|
|
1428
|
+
|
|
1429
|
+
_collection_formats: Dict[str, str] = {
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
_path_params: Dict[str, str] = {}
|
|
1433
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1434
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1435
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1436
|
+
_files: Dict[
|
|
1437
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1438
|
+
] = {}
|
|
1439
|
+
_body_params: Optional[bytes] = None
|
|
1440
|
+
|
|
1441
|
+
# process the path parameters
|
|
1442
|
+
if username is not None:
|
|
1443
|
+
_path_params['username'] = username
|
|
1444
|
+
if dataset is not None:
|
|
1445
|
+
_path_params['dataset'] = dataset
|
|
1446
|
+
# process the query parameters
|
|
1447
|
+
# process the header parameters
|
|
1448
|
+
# process the form parameters
|
|
1449
|
+
# process the body parameter
|
|
1450
|
+
|
|
1451
|
+
|
|
1452
|
+
# set the HTTP header `Accept`
|
|
1453
|
+
if 'Accept' not in _header_params:
|
|
1454
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1455
|
+
[
|
|
1456
|
+
'application/json'
|
|
1457
|
+
]
|
|
1458
|
+
)
|
|
1459
|
+
|
|
1460
|
+
|
|
1461
|
+
# authentication setting
|
|
1462
|
+
_auth_settings: List[str] = [
|
|
1463
|
+
'QAnswer-Api-Key',
|
|
1464
|
+
'Bearer token'
|
|
1465
|
+
]
|
|
1466
|
+
|
|
1467
|
+
return self.api_client.param_serialize(
|
|
1468
|
+
method='GET',
|
|
1469
|
+
resource_path='/backend/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/merge',
|
|
1470
|
+
path_params=_path_params,
|
|
1471
|
+
query_params=_query_params,
|
|
1472
|
+
header_params=_header_params,
|
|
1473
|
+
body=_body_params,
|
|
1474
|
+
post_params=_form_params,
|
|
1475
|
+
files=_files,
|
|
1476
|
+
auth_settings=_auth_settings,
|
|
1477
|
+
collection_formats=_collection_formats,
|
|
1478
|
+
_host=_host,
|
|
1479
|
+
_request_auth=_request_auth
|
|
1480
|
+
)
|
|
1481
|
+
|
|
1482
|
+
|
|
1483
|
+
|
|
1484
|
+
|
|
1485
|
+
@validate_call
|
|
1486
|
+
def prefixes(
|
|
1487
|
+
self,
|
|
1488
|
+
username: StrictStr,
|
|
1489
|
+
dataset: StrictStr,
|
|
1490
|
+
_request_timeout: Union[
|
|
1491
|
+
None,
|
|
1492
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1493
|
+
Tuple[
|
|
1494
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1495
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1496
|
+
]
|
|
1497
|
+
] = None,
|
|
1498
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1499
|
+
_content_type: Optional[StrictStr] = None,
|
|
1500
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1501
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1502
|
+
) -> Dict[str, Optional[str]]:
|
|
1503
|
+
"""Get SPARQL prefixes for a dataset
|
|
1504
|
+
|
|
1505
|
+
|
|
1506
|
+
:param username: (required)
|
|
1507
|
+
:type username: str
|
|
1508
|
+
:param dataset: (required)
|
|
1509
|
+
:type dataset: str
|
|
1510
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1511
|
+
number provided, it will be total request
|
|
1512
|
+
timeout. It can also be a pair (tuple) of
|
|
1513
|
+
(connection, read) timeouts.
|
|
1514
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1515
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1516
|
+
request; this effectively ignores the
|
|
1517
|
+
authentication in the spec for a single request.
|
|
1518
|
+
:type _request_auth: dict, optional
|
|
1519
|
+
:param _content_type: force content-type for the request.
|
|
1520
|
+
:type _content_type: str, Optional
|
|
1521
|
+
:param _headers: set to override the headers for a single
|
|
1522
|
+
request; this effectively ignores the headers
|
|
1523
|
+
in the spec for a single request.
|
|
1524
|
+
:type _headers: dict, optional
|
|
1525
|
+
:param _host_index: set to override the host_index for a single
|
|
1526
|
+
request; this effectively ignores the host_index
|
|
1527
|
+
in the spec for a single request.
|
|
1528
|
+
:type _host_index: int, optional
|
|
1529
|
+
:return: Returns the result object.
|
|
1530
|
+
""" # noqa: E501
|
|
1531
|
+
|
|
1532
|
+
_param = self._prefixes_serialize(
|
|
1533
|
+
username=username,
|
|
1534
|
+
dataset=dataset,
|
|
1535
|
+
_request_auth=_request_auth,
|
|
1536
|
+
_content_type=_content_type,
|
|
1537
|
+
_headers=_headers,
|
|
1538
|
+
_host_index=_host_index
|
|
1539
|
+
)
|
|
1540
|
+
|
|
1541
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1542
|
+
'200': "Dict[str, Optional[str]]",
|
|
1543
|
+
'422': "HTTPValidationError",
|
|
1544
|
+
}
|
|
1545
|
+
response_data = self.api_client.call_api(
|
|
1546
|
+
*_param,
|
|
1547
|
+
_request_timeout=_request_timeout
|
|
1548
|
+
)
|
|
1549
|
+
response_data.read()
|
|
1550
|
+
return self.api_client.response_deserialize(
|
|
1551
|
+
response_data=response_data,
|
|
1552
|
+
response_types_map=_response_types_map,
|
|
1553
|
+
).data
|
|
1554
|
+
|
|
1555
|
+
|
|
1556
|
+
@validate_call
|
|
1557
|
+
def prefixes_with_http_info(
|
|
1558
|
+
self,
|
|
1559
|
+
username: StrictStr,
|
|
1560
|
+
dataset: StrictStr,
|
|
1561
|
+
_request_timeout: Union[
|
|
1562
|
+
None,
|
|
1563
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1564
|
+
Tuple[
|
|
1565
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1566
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1567
|
+
]
|
|
1568
|
+
] = None,
|
|
1569
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1570
|
+
_content_type: Optional[StrictStr] = None,
|
|
1571
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1572
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1573
|
+
) -> ApiResponse[Dict[str, Optional[str]]]:
|
|
1574
|
+
"""Get SPARQL prefixes for a dataset
|
|
1575
|
+
|
|
1576
|
+
|
|
1577
|
+
:param username: (required)
|
|
1578
|
+
:type username: str
|
|
1579
|
+
:param dataset: (required)
|
|
1580
|
+
:type dataset: str
|
|
1581
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1582
|
+
number provided, it will be total request
|
|
1583
|
+
timeout. It can also be a pair (tuple) of
|
|
1584
|
+
(connection, read) timeouts.
|
|
1585
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1586
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1587
|
+
request; this effectively ignores the
|
|
1588
|
+
authentication in the spec for a single request.
|
|
1589
|
+
:type _request_auth: dict, optional
|
|
1590
|
+
:param _content_type: force content-type for the request.
|
|
1591
|
+
:type _content_type: str, Optional
|
|
1592
|
+
:param _headers: set to override the headers for a single
|
|
1593
|
+
request; this effectively ignores the headers
|
|
1594
|
+
in the spec for a single request.
|
|
1595
|
+
:type _headers: dict, optional
|
|
1596
|
+
:param _host_index: set to override the host_index for a single
|
|
1597
|
+
request; this effectively ignores the host_index
|
|
1598
|
+
in the spec for a single request.
|
|
1599
|
+
:type _host_index: int, optional
|
|
1600
|
+
:return: Returns the result object.
|
|
1601
|
+
""" # noqa: E501
|
|
1602
|
+
|
|
1603
|
+
_param = self._prefixes_serialize(
|
|
1604
|
+
username=username,
|
|
1605
|
+
dataset=dataset,
|
|
1606
|
+
_request_auth=_request_auth,
|
|
1607
|
+
_content_type=_content_type,
|
|
1608
|
+
_headers=_headers,
|
|
1609
|
+
_host_index=_host_index
|
|
1610
|
+
)
|
|
1611
|
+
|
|
1612
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1613
|
+
'200': "Dict[str, Optional[str]]",
|
|
1614
|
+
'422': "HTTPValidationError",
|
|
1615
|
+
}
|
|
1616
|
+
response_data = self.api_client.call_api(
|
|
1617
|
+
*_param,
|
|
1618
|
+
_request_timeout=_request_timeout
|
|
1619
|
+
)
|
|
1620
|
+
response_data.read()
|
|
1621
|
+
return self.api_client.response_deserialize(
|
|
1622
|
+
response_data=response_data,
|
|
1623
|
+
response_types_map=_response_types_map,
|
|
1624
|
+
)
|
|
1625
|
+
|
|
1626
|
+
|
|
1627
|
+
@validate_call
|
|
1628
|
+
def prefixes_without_preload_content(
|
|
1629
|
+
self,
|
|
1630
|
+
username: StrictStr,
|
|
1631
|
+
dataset: StrictStr,
|
|
1632
|
+
_request_timeout: Union[
|
|
1633
|
+
None,
|
|
1634
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1635
|
+
Tuple[
|
|
1636
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1637
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1638
|
+
]
|
|
1639
|
+
] = None,
|
|
1640
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1641
|
+
_content_type: Optional[StrictStr] = None,
|
|
1642
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1643
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1644
|
+
) -> RESTResponseType:
|
|
1645
|
+
"""Get SPARQL prefixes for a dataset
|
|
1646
|
+
|
|
1647
|
+
|
|
1648
|
+
:param username: (required)
|
|
1649
|
+
:type username: str
|
|
1650
|
+
:param dataset: (required)
|
|
1651
|
+
:type dataset: str
|
|
1652
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1653
|
+
number provided, it will be total request
|
|
1654
|
+
timeout. It can also be a pair (tuple) of
|
|
1655
|
+
(connection, read) timeouts.
|
|
1656
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1657
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1658
|
+
request; this effectively ignores the
|
|
1659
|
+
authentication in the spec for a single request.
|
|
1660
|
+
:type _request_auth: dict, optional
|
|
1661
|
+
:param _content_type: force content-type for the request.
|
|
1662
|
+
:type _content_type: str, Optional
|
|
1663
|
+
:param _headers: set to override the headers for a single
|
|
1664
|
+
request; this effectively ignores the headers
|
|
1665
|
+
in the spec for a single request.
|
|
1666
|
+
:type _headers: dict, optional
|
|
1667
|
+
:param _host_index: set to override the host_index for a single
|
|
1668
|
+
request; this effectively ignores the host_index
|
|
1669
|
+
in the spec for a single request.
|
|
1670
|
+
:type _host_index: int, optional
|
|
1671
|
+
:return: Returns the result object.
|
|
1672
|
+
""" # noqa: E501
|
|
1673
|
+
|
|
1674
|
+
_param = self._prefixes_serialize(
|
|
1675
|
+
username=username,
|
|
1676
|
+
dataset=dataset,
|
|
1677
|
+
_request_auth=_request_auth,
|
|
1678
|
+
_content_type=_content_type,
|
|
1679
|
+
_headers=_headers,
|
|
1680
|
+
_host_index=_host_index
|
|
1681
|
+
)
|
|
1682
|
+
|
|
1683
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1684
|
+
'200': "Dict[str, Optional[str]]",
|
|
1685
|
+
'422': "HTTPValidationError",
|
|
1686
|
+
}
|
|
1687
|
+
response_data = self.api_client.call_api(
|
|
1688
|
+
*_param,
|
|
1689
|
+
_request_timeout=_request_timeout
|
|
1690
|
+
)
|
|
1691
|
+
return response_data.response
|
|
1692
|
+
|
|
1693
|
+
|
|
1694
|
+
def _prefixes_serialize(
|
|
1695
|
+
self,
|
|
1696
|
+
username,
|
|
1697
|
+
dataset,
|
|
1698
|
+
_request_auth,
|
|
1699
|
+
_content_type,
|
|
1700
|
+
_headers,
|
|
1701
|
+
_host_index,
|
|
1702
|
+
) -> RequestSerialized:
|
|
1703
|
+
|
|
1704
|
+
_host = None
|
|
1705
|
+
|
|
1706
|
+
_collection_formats: Dict[str, str] = {
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
_path_params: Dict[str, str] = {}
|
|
1710
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1711
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1712
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1713
|
+
_files: Dict[
|
|
1714
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1715
|
+
] = {}
|
|
1716
|
+
_body_params: Optional[bytes] = None
|
|
1717
|
+
|
|
1718
|
+
# process the path parameters
|
|
1719
|
+
if username is not None:
|
|
1720
|
+
_path_params['username'] = username
|
|
1721
|
+
if dataset is not None:
|
|
1722
|
+
_path_params['dataset'] = dataset
|
|
1723
|
+
# process the query parameters
|
|
1724
|
+
# process the header parameters
|
|
1725
|
+
# process the form parameters
|
|
1726
|
+
# process the body parameter
|
|
1727
|
+
|
|
1728
|
+
|
|
1729
|
+
# set the HTTP header `Accept`
|
|
1730
|
+
if 'Accept' not in _header_params:
|
|
1731
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1732
|
+
[
|
|
1733
|
+
'application/json'
|
|
1734
|
+
]
|
|
1735
|
+
)
|
|
1736
|
+
|
|
1737
|
+
|
|
1738
|
+
# authentication setting
|
|
1739
|
+
_auth_settings: List[str] = [
|
|
1740
|
+
'QAnswer-Api-Key',
|
|
1741
|
+
'Bearer token'
|
|
1742
|
+
]
|
|
1743
|
+
|
|
1744
|
+
return self.api_client.param_serialize(
|
|
1745
|
+
method='GET',
|
|
1746
|
+
resource_path='/backend/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/prefixes',
|
|
1747
|
+
path_params=_path_params,
|
|
1748
|
+
query_params=_query_params,
|
|
1749
|
+
header_params=_header_params,
|
|
1750
|
+
body=_body_params,
|
|
1751
|
+
post_params=_form_params,
|
|
1752
|
+
files=_files,
|
|
1753
|
+
auth_settings=_auth_settings,
|
|
1754
|
+
collection_formats=_collection_formats,
|
|
1755
|
+
_host=_host,
|
|
1756
|
+
_request_auth=_request_auth
|
|
1757
|
+
)
|
|
1758
|
+
|
|
1759
|
+
|
|
1760
|
+
|
|
1761
|
+
|
|
1762
|
+
@validate_call
|
|
1763
|
+
def rdf_expansion(
|
|
1764
|
+
self,
|
|
1765
|
+
username: StrictStr,
|
|
1766
|
+
dataset: StrictStr,
|
|
1767
|
+
_request_timeout: Union[
|
|
1768
|
+
None,
|
|
1769
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1770
|
+
Tuple[
|
|
1771
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1772
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1773
|
+
]
|
|
1774
|
+
] = None,
|
|
1775
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1776
|
+
_content_type: Optional[StrictStr] = None,
|
|
1777
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1778
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1779
|
+
) -> object:
|
|
1780
|
+
"""Convert text to RDF triples
|
|
1781
|
+
|
|
1782
|
+
|
|
1783
|
+
:param username: (required)
|
|
1784
|
+
:type username: str
|
|
1785
|
+
:param dataset: (required)
|
|
1786
|
+
:type dataset: str
|
|
1787
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1788
|
+
number provided, it will be total request
|
|
1789
|
+
timeout. It can also be a pair (tuple) of
|
|
1790
|
+
(connection, read) timeouts.
|
|
1791
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1792
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1793
|
+
request; this effectively ignores the
|
|
1794
|
+
authentication in the spec for a single request.
|
|
1795
|
+
:type _request_auth: dict, optional
|
|
1796
|
+
:param _content_type: force content-type for the request.
|
|
1797
|
+
:type _content_type: str, Optional
|
|
1798
|
+
:param _headers: set to override the headers for a single
|
|
1799
|
+
request; this effectively ignores the headers
|
|
1800
|
+
in the spec for a single request.
|
|
1801
|
+
:type _headers: dict, optional
|
|
1802
|
+
:param _host_index: set to override the host_index for a single
|
|
1803
|
+
request; this effectively ignores the host_index
|
|
1804
|
+
in the spec for a single request.
|
|
1805
|
+
:type _host_index: int, optional
|
|
1806
|
+
:return: Returns the result object.
|
|
1807
|
+
""" # noqa: E501
|
|
1808
|
+
|
|
1809
|
+
_param = self._rdf_expansion_serialize(
|
|
1810
|
+
username=username,
|
|
1811
|
+
dataset=dataset,
|
|
1812
|
+
_request_auth=_request_auth,
|
|
1813
|
+
_content_type=_content_type,
|
|
1814
|
+
_headers=_headers,
|
|
1815
|
+
_host_index=_host_index
|
|
1816
|
+
)
|
|
1817
|
+
|
|
1818
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1819
|
+
'200': "object",
|
|
1820
|
+
'422': "HTTPValidationError",
|
|
1821
|
+
}
|
|
1822
|
+
response_data = self.api_client.call_api(
|
|
1823
|
+
*_param,
|
|
1824
|
+
_request_timeout=_request_timeout
|
|
1825
|
+
)
|
|
1826
|
+
response_data.read()
|
|
1827
|
+
return self.api_client.response_deserialize(
|
|
1828
|
+
response_data=response_data,
|
|
1829
|
+
response_types_map=_response_types_map,
|
|
1830
|
+
).data
|
|
1831
|
+
|
|
1832
|
+
|
|
1833
|
+
@validate_call
|
|
1834
|
+
def rdf_expansion_with_http_info(
|
|
1835
|
+
self,
|
|
1836
|
+
username: StrictStr,
|
|
1837
|
+
dataset: StrictStr,
|
|
1838
|
+
_request_timeout: Union[
|
|
1839
|
+
None,
|
|
1840
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1841
|
+
Tuple[
|
|
1842
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1843
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1844
|
+
]
|
|
1845
|
+
] = None,
|
|
1846
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1847
|
+
_content_type: Optional[StrictStr] = None,
|
|
1848
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1849
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1850
|
+
) -> ApiResponse[object]:
|
|
1851
|
+
"""Convert text to RDF triples
|
|
1852
|
+
|
|
1853
|
+
|
|
1854
|
+
:param username: (required)
|
|
1855
|
+
:type username: str
|
|
1856
|
+
:param dataset: (required)
|
|
1857
|
+
:type dataset: str
|
|
1858
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1859
|
+
number provided, it will be total request
|
|
1860
|
+
timeout. It can also be a pair (tuple) of
|
|
1861
|
+
(connection, read) timeouts.
|
|
1862
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1863
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1864
|
+
request; this effectively ignores the
|
|
1865
|
+
authentication in the spec for a single request.
|
|
1866
|
+
:type _request_auth: dict, optional
|
|
1867
|
+
:param _content_type: force content-type for the request.
|
|
1868
|
+
:type _content_type: str, Optional
|
|
1869
|
+
:param _headers: set to override the headers for a single
|
|
1870
|
+
request; this effectively ignores the headers
|
|
1871
|
+
in the spec for a single request.
|
|
1872
|
+
:type _headers: dict, optional
|
|
1873
|
+
:param _host_index: set to override the host_index for a single
|
|
1874
|
+
request; this effectively ignores the host_index
|
|
1875
|
+
in the spec for a single request.
|
|
1876
|
+
:type _host_index: int, optional
|
|
1877
|
+
:return: Returns the result object.
|
|
1878
|
+
""" # noqa: E501
|
|
1879
|
+
|
|
1880
|
+
_param = self._rdf_expansion_serialize(
|
|
1881
|
+
username=username,
|
|
1882
|
+
dataset=dataset,
|
|
1883
|
+
_request_auth=_request_auth,
|
|
1884
|
+
_content_type=_content_type,
|
|
1885
|
+
_headers=_headers,
|
|
1886
|
+
_host_index=_host_index
|
|
1887
|
+
)
|
|
1888
|
+
|
|
1889
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1890
|
+
'200': "object",
|
|
1891
|
+
'422': "HTTPValidationError",
|
|
1892
|
+
}
|
|
1893
|
+
response_data = self.api_client.call_api(
|
|
1894
|
+
*_param,
|
|
1895
|
+
_request_timeout=_request_timeout
|
|
1896
|
+
)
|
|
1897
|
+
response_data.read()
|
|
1898
|
+
return self.api_client.response_deserialize(
|
|
1899
|
+
response_data=response_data,
|
|
1900
|
+
response_types_map=_response_types_map,
|
|
1901
|
+
)
|
|
1902
|
+
|
|
1903
|
+
|
|
1904
|
+
@validate_call
|
|
1905
|
+
def rdf_expansion_without_preload_content(
|
|
1906
|
+
self,
|
|
1907
|
+
username: StrictStr,
|
|
1908
|
+
dataset: StrictStr,
|
|
1909
|
+
_request_timeout: Union[
|
|
1910
|
+
None,
|
|
1911
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1912
|
+
Tuple[
|
|
1913
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1914
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1915
|
+
]
|
|
1916
|
+
] = None,
|
|
1917
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1918
|
+
_content_type: Optional[StrictStr] = None,
|
|
1919
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1920
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1921
|
+
) -> RESTResponseType:
|
|
1922
|
+
"""Convert text to RDF triples
|
|
1923
|
+
|
|
1924
|
+
|
|
1925
|
+
:param username: (required)
|
|
1926
|
+
:type username: str
|
|
1927
|
+
:param dataset: (required)
|
|
1928
|
+
:type dataset: str
|
|
1929
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1930
|
+
number provided, it will be total request
|
|
1931
|
+
timeout. It can also be a pair (tuple) of
|
|
1932
|
+
(connection, read) timeouts.
|
|
1933
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1934
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1935
|
+
request; this effectively ignores the
|
|
1936
|
+
authentication in the spec for a single request.
|
|
1937
|
+
:type _request_auth: dict, optional
|
|
1938
|
+
:param _content_type: force content-type for the request.
|
|
1939
|
+
:type _content_type: str, Optional
|
|
1940
|
+
:param _headers: set to override the headers for a single
|
|
1941
|
+
request; this effectively ignores the headers
|
|
1942
|
+
in the spec for a single request.
|
|
1943
|
+
:type _headers: dict, optional
|
|
1944
|
+
:param _host_index: set to override the host_index for a single
|
|
1945
|
+
request; this effectively ignores the host_index
|
|
1946
|
+
in the spec for a single request.
|
|
1947
|
+
:type _host_index: int, optional
|
|
1948
|
+
:return: Returns the result object.
|
|
1949
|
+
""" # noqa: E501
|
|
1950
|
+
|
|
1951
|
+
_param = self._rdf_expansion_serialize(
|
|
1952
|
+
username=username,
|
|
1953
|
+
dataset=dataset,
|
|
1954
|
+
_request_auth=_request_auth,
|
|
1955
|
+
_content_type=_content_type,
|
|
1956
|
+
_headers=_headers,
|
|
1957
|
+
_host_index=_host_index
|
|
1958
|
+
)
|
|
1959
|
+
|
|
1960
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1961
|
+
'200': "object",
|
|
1962
|
+
'422': "HTTPValidationError",
|
|
1963
|
+
}
|
|
1964
|
+
response_data = self.api_client.call_api(
|
|
1965
|
+
*_param,
|
|
1966
|
+
_request_timeout=_request_timeout
|
|
1967
|
+
)
|
|
1968
|
+
return response_data.response
|
|
1969
|
+
|
|
1970
|
+
|
|
1971
|
+
def _rdf_expansion_serialize(
|
|
1972
|
+
self,
|
|
1973
|
+
username,
|
|
1974
|
+
dataset,
|
|
1975
|
+
_request_auth,
|
|
1976
|
+
_content_type,
|
|
1977
|
+
_headers,
|
|
1978
|
+
_host_index,
|
|
1979
|
+
) -> RequestSerialized:
|
|
1980
|
+
|
|
1981
|
+
_host = None
|
|
1982
|
+
|
|
1983
|
+
_collection_formats: Dict[str, str] = {
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
_path_params: Dict[str, str] = {}
|
|
1987
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1988
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1989
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1990
|
+
_files: Dict[
|
|
1991
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1992
|
+
] = {}
|
|
1993
|
+
_body_params: Optional[bytes] = None
|
|
1994
|
+
|
|
1995
|
+
# process the path parameters
|
|
1996
|
+
if username is not None:
|
|
1997
|
+
_path_params['username'] = username
|
|
1998
|
+
if dataset is not None:
|
|
1999
|
+
_path_params['dataset'] = dataset
|
|
2000
|
+
# process the query parameters
|
|
2001
|
+
# process the header parameters
|
|
2002
|
+
# process the form parameters
|
|
2003
|
+
# process the body parameter
|
|
2004
|
+
|
|
2005
|
+
|
|
2006
|
+
# set the HTTP header `Accept`
|
|
2007
|
+
if 'Accept' not in _header_params:
|
|
2008
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2009
|
+
[
|
|
2010
|
+
'application/json'
|
|
2011
|
+
]
|
|
2012
|
+
)
|
|
2013
|
+
|
|
2014
|
+
|
|
2015
|
+
# authentication setting
|
|
2016
|
+
_auth_settings: List[str] = [
|
|
2017
|
+
'QAnswer-Api-Key',
|
|
2018
|
+
'Bearer token'
|
|
2019
|
+
]
|
|
2020
|
+
|
|
2021
|
+
return self.api_client.param_serialize(
|
|
2022
|
+
method='POST',
|
|
2023
|
+
resource_path='/backend/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/text2rdf',
|
|
2024
|
+
path_params=_path_params,
|
|
2025
|
+
query_params=_query_params,
|
|
2026
|
+
header_params=_header_params,
|
|
2027
|
+
body=_body_params,
|
|
2028
|
+
post_params=_form_params,
|
|
2029
|
+
files=_files,
|
|
2030
|
+
auth_settings=_auth_settings,
|
|
2031
|
+
collection_formats=_collection_formats,
|
|
2032
|
+
_host=_host,
|
|
2033
|
+
_request_auth=_request_auth
|
|
2034
|
+
)
|
|
2035
|
+
|
|
2036
|
+
|
|
2037
|
+
|
|
2038
|
+
|
|
2039
|
+
@validate_call
|
|
2040
|
+
def reindex(
|
|
2041
|
+
self,
|
|
2042
|
+
username: StrictStr,
|
|
2043
|
+
dataset: StrictStr,
|
|
2044
|
+
_request_timeout: Union[
|
|
2045
|
+
None,
|
|
2046
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2047
|
+
Tuple[
|
|
2048
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2049
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2050
|
+
]
|
|
2051
|
+
] = None,
|
|
2052
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2053
|
+
_content_type: Optional[StrictStr] = None,
|
|
2054
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2055
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2056
|
+
) -> object:
|
|
2057
|
+
"""Reindex a dataset
|
|
2058
|
+
|
|
2059
|
+
|
|
2060
|
+
:param username: (required)
|
|
2061
|
+
:type username: str
|
|
2062
|
+
:param dataset: (required)
|
|
2063
|
+
:type dataset: str
|
|
2064
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2065
|
+
number provided, it will be total request
|
|
2066
|
+
timeout. It can also be a pair (tuple) of
|
|
2067
|
+
(connection, read) timeouts.
|
|
2068
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2069
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2070
|
+
request; this effectively ignores the
|
|
2071
|
+
authentication in the spec for a single request.
|
|
2072
|
+
:type _request_auth: dict, optional
|
|
2073
|
+
:param _content_type: force content-type for the request.
|
|
2074
|
+
:type _content_type: str, Optional
|
|
2075
|
+
:param _headers: set to override the headers for a single
|
|
2076
|
+
request; this effectively ignores the headers
|
|
2077
|
+
in the spec for a single request.
|
|
2078
|
+
:type _headers: dict, optional
|
|
2079
|
+
:param _host_index: set to override the host_index for a single
|
|
2080
|
+
request; this effectively ignores the host_index
|
|
2081
|
+
in the spec for a single request.
|
|
2082
|
+
:type _host_index: int, optional
|
|
2083
|
+
:return: Returns the result object.
|
|
2084
|
+
""" # noqa: E501
|
|
2085
|
+
|
|
2086
|
+
_param = self._reindex_serialize(
|
|
2087
|
+
username=username,
|
|
2088
|
+
dataset=dataset,
|
|
2089
|
+
_request_auth=_request_auth,
|
|
2090
|
+
_content_type=_content_type,
|
|
2091
|
+
_headers=_headers,
|
|
2092
|
+
_host_index=_host_index
|
|
2093
|
+
)
|
|
2094
|
+
|
|
2095
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2096
|
+
'200': "object",
|
|
2097
|
+
'422': "HTTPValidationError",
|
|
2098
|
+
}
|
|
2099
|
+
response_data = self.api_client.call_api(
|
|
2100
|
+
*_param,
|
|
2101
|
+
_request_timeout=_request_timeout
|
|
2102
|
+
)
|
|
2103
|
+
response_data.read()
|
|
2104
|
+
return self.api_client.response_deserialize(
|
|
2105
|
+
response_data=response_data,
|
|
2106
|
+
response_types_map=_response_types_map,
|
|
2107
|
+
).data
|
|
2108
|
+
|
|
2109
|
+
|
|
2110
|
+
@validate_call
|
|
2111
|
+
def reindex_with_http_info(
|
|
2112
|
+
self,
|
|
2113
|
+
username: StrictStr,
|
|
2114
|
+
dataset: StrictStr,
|
|
2115
|
+
_request_timeout: Union[
|
|
2116
|
+
None,
|
|
2117
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2118
|
+
Tuple[
|
|
2119
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2120
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2121
|
+
]
|
|
2122
|
+
] = None,
|
|
2123
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2124
|
+
_content_type: Optional[StrictStr] = None,
|
|
2125
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2126
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2127
|
+
) -> ApiResponse[object]:
|
|
2128
|
+
"""Reindex a dataset
|
|
2129
|
+
|
|
2130
|
+
|
|
2131
|
+
:param username: (required)
|
|
2132
|
+
:type username: str
|
|
2133
|
+
:param dataset: (required)
|
|
2134
|
+
:type dataset: str
|
|
2135
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2136
|
+
number provided, it will be total request
|
|
2137
|
+
timeout. It can also be a pair (tuple) of
|
|
2138
|
+
(connection, read) timeouts.
|
|
2139
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2140
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2141
|
+
request; this effectively ignores the
|
|
2142
|
+
authentication in the spec for a single request.
|
|
2143
|
+
:type _request_auth: dict, optional
|
|
2144
|
+
:param _content_type: force content-type for the request.
|
|
2145
|
+
:type _content_type: str, Optional
|
|
2146
|
+
:param _headers: set to override the headers for a single
|
|
2147
|
+
request; this effectively ignores the headers
|
|
2148
|
+
in the spec for a single request.
|
|
2149
|
+
:type _headers: dict, optional
|
|
2150
|
+
:param _host_index: set to override the host_index for a single
|
|
2151
|
+
request; this effectively ignores the host_index
|
|
2152
|
+
in the spec for a single request.
|
|
2153
|
+
:type _host_index: int, optional
|
|
2154
|
+
:return: Returns the result object.
|
|
2155
|
+
""" # noqa: E501
|
|
2156
|
+
|
|
2157
|
+
_param = self._reindex_serialize(
|
|
2158
|
+
username=username,
|
|
2159
|
+
dataset=dataset,
|
|
2160
|
+
_request_auth=_request_auth,
|
|
2161
|
+
_content_type=_content_type,
|
|
2162
|
+
_headers=_headers,
|
|
2163
|
+
_host_index=_host_index
|
|
2164
|
+
)
|
|
2165
|
+
|
|
2166
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2167
|
+
'200': "object",
|
|
2168
|
+
'422': "HTTPValidationError",
|
|
2169
|
+
}
|
|
2170
|
+
response_data = self.api_client.call_api(
|
|
2171
|
+
*_param,
|
|
2172
|
+
_request_timeout=_request_timeout
|
|
2173
|
+
)
|
|
2174
|
+
response_data.read()
|
|
2175
|
+
return self.api_client.response_deserialize(
|
|
2176
|
+
response_data=response_data,
|
|
2177
|
+
response_types_map=_response_types_map,
|
|
2178
|
+
)
|
|
2179
|
+
|
|
2180
|
+
|
|
2181
|
+
@validate_call
|
|
2182
|
+
def reindex_without_preload_content(
|
|
2183
|
+
self,
|
|
2184
|
+
username: StrictStr,
|
|
2185
|
+
dataset: StrictStr,
|
|
2186
|
+
_request_timeout: Union[
|
|
2187
|
+
None,
|
|
2188
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2189
|
+
Tuple[
|
|
2190
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2191
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2192
|
+
]
|
|
2193
|
+
] = None,
|
|
2194
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2195
|
+
_content_type: Optional[StrictStr] = None,
|
|
2196
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2197
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2198
|
+
) -> RESTResponseType:
|
|
2199
|
+
"""Reindex a dataset
|
|
2200
|
+
|
|
2201
|
+
|
|
2202
|
+
:param username: (required)
|
|
2203
|
+
:type username: str
|
|
2204
|
+
:param dataset: (required)
|
|
2205
|
+
:type dataset: str
|
|
2206
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2207
|
+
number provided, it will be total request
|
|
2208
|
+
timeout. It can also be a pair (tuple) of
|
|
2209
|
+
(connection, read) timeouts.
|
|
2210
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2211
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2212
|
+
request; this effectively ignores the
|
|
2213
|
+
authentication in the spec for a single request.
|
|
2214
|
+
:type _request_auth: dict, optional
|
|
2215
|
+
:param _content_type: force content-type for the request.
|
|
2216
|
+
:type _content_type: str, Optional
|
|
2217
|
+
:param _headers: set to override the headers for a single
|
|
2218
|
+
request; this effectively ignores the headers
|
|
2219
|
+
in the spec for a single request.
|
|
2220
|
+
:type _headers: dict, optional
|
|
2221
|
+
:param _host_index: set to override the host_index for a single
|
|
2222
|
+
request; this effectively ignores the host_index
|
|
2223
|
+
in the spec for a single request.
|
|
2224
|
+
:type _host_index: int, optional
|
|
2225
|
+
:return: Returns the result object.
|
|
2226
|
+
""" # noqa: E501
|
|
2227
|
+
|
|
2228
|
+
_param = self._reindex_serialize(
|
|
2229
|
+
username=username,
|
|
2230
|
+
dataset=dataset,
|
|
2231
|
+
_request_auth=_request_auth,
|
|
2232
|
+
_content_type=_content_type,
|
|
2233
|
+
_headers=_headers,
|
|
2234
|
+
_host_index=_host_index
|
|
2235
|
+
)
|
|
2236
|
+
|
|
2237
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2238
|
+
'200': "object",
|
|
2239
|
+
'422': "HTTPValidationError",
|
|
2240
|
+
}
|
|
2241
|
+
response_data = self.api_client.call_api(
|
|
2242
|
+
*_param,
|
|
2243
|
+
_request_timeout=_request_timeout
|
|
2244
|
+
)
|
|
2245
|
+
return response_data.response
|
|
2246
|
+
|
|
2247
|
+
|
|
2248
|
+
def _reindex_serialize(
|
|
2249
|
+
self,
|
|
2250
|
+
username,
|
|
2251
|
+
dataset,
|
|
2252
|
+
_request_auth,
|
|
2253
|
+
_content_type,
|
|
2254
|
+
_headers,
|
|
2255
|
+
_host_index,
|
|
2256
|
+
) -> RequestSerialized:
|
|
2257
|
+
|
|
2258
|
+
_host = None
|
|
2259
|
+
|
|
2260
|
+
_collection_formats: Dict[str, str] = {
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
_path_params: Dict[str, str] = {}
|
|
2264
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2265
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2266
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2267
|
+
_files: Dict[
|
|
2268
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2269
|
+
] = {}
|
|
2270
|
+
_body_params: Optional[bytes] = None
|
|
2271
|
+
|
|
2272
|
+
# process the path parameters
|
|
2273
|
+
if username is not None:
|
|
2274
|
+
_path_params['username'] = username
|
|
2275
|
+
if dataset is not None:
|
|
2276
|
+
_path_params['dataset'] = dataset
|
|
2277
|
+
# process the query parameters
|
|
2278
|
+
# process the header parameters
|
|
2279
|
+
# process the form parameters
|
|
2280
|
+
# process the body parameter
|
|
2281
|
+
|
|
2282
|
+
|
|
2283
|
+
# set the HTTP header `Accept`
|
|
2284
|
+
if 'Accept' not in _header_params:
|
|
2285
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2286
|
+
[
|
|
2287
|
+
'application/json'
|
|
2288
|
+
]
|
|
2289
|
+
)
|
|
2290
|
+
|
|
2291
|
+
|
|
2292
|
+
# authentication setting
|
|
2293
|
+
_auth_settings: List[str] = [
|
|
2294
|
+
'QAnswer-Api-Key',
|
|
2295
|
+
'Bearer token'
|
|
2296
|
+
]
|
|
2297
|
+
|
|
2298
|
+
return self.api_client.param_serialize(
|
|
2299
|
+
method='GET',
|
|
2300
|
+
resource_path='/backend/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/reindex',
|
|
2301
|
+
path_params=_path_params,
|
|
2302
|
+
query_params=_query_params,
|
|
2303
|
+
header_params=_header_params,
|
|
2304
|
+
body=_body_params,
|
|
2305
|
+
post_params=_form_params,
|
|
2306
|
+
files=_files,
|
|
2307
|
+
auth_settings=_auth_settings,
|
|
2308
|
+
collection_formats=_collection_formats,
|
|
2309
|
+
_host=_host,
|
|
2310
|
+
_request_auth=_request_auth
|
|
2311
|
+
)
|
|
2312
|
+
|
|
2313
|
+
|
|
2314
|
+
|
|
2315
|
+
|
|
2316
|
+
@validate_call
|
|
2317
|
+
def set_prefixes(
|
|
2318
|
+
self,
|
|
2319
|
+
username: StrictStr,
|
|
2320
|
+
dataset: StrictStr,
|
|
2321
|
+
request_body: Dict[str, Optional[StrictStr]],
|
|
2322
|
+
_request_timeout: Union[
|
|
2323
|
+
None,
|
|
2324
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2325
|
+
Tuple[
|
|
2326
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2327
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2328
|
+
]
|
|
2329
|
+
] = None,
|
|
2330
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2331
|
+
_content_type: Optional[StrictStr] = None,
|
|
2332
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2333
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2334
|
+
) -> object:
|
|
2335
|
+
"""Set SPARQL prefixes for a dataset
|
|
2336
|
+
|
|
2337
|
+
|
|
2338
|
+
:param username: (required)
|
|
2339
|
+
:type username: str
|
|
2340
|
+
:param dataset: (required)
|
|
2341
|
+
:type dataset: str
|
|
2342
|
+
:param request_body: (required)
|
|
2343
|
+
:type request_body: Dict[str, Optional[str]]
|
|
2344
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2345
|
+
number provided, it will be total request
|
|
2346
|
+
timeout. It can also be a pair (tuple) of
|
|
2347
|
+
(connection, read) timeouts.
|
|
2348
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2349
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2350
|
+
request; this effectively ignores the
|
|
2351
|
+
authentication in the spec for a single request.
|
|
2352
|
+
:type _request_auth: dict, optional
|
|
2353
|
+
:param _content_type: force content-type for the request.
|
|
2354
|
+
:type _content_type: str, Optional
|
|
2355
|
+
:param _headers: set to override the headers for a single
|
|
2356
|
+
request; this effectively ignores the headers
|
|
2357
|
+
in the spec for a single request.
|
|
2358
|
+
:type _headers: dict, optional
|
|
2359
|
+
:param _host_index: set to override the host_index for a single
|
|
2360
|
+
request; this effectively ignores the host_index
|
|
2361
|
+
in the spec for a single request.
|
|
2362
|
+
:type _host_index: int, optional
|
|
2363
|
+
:return: Returns the result object.
|
|
2364
|
+
""" # noqa: E501
|
|
2365
|
+
|
|
2366
|
+
_param = self._set_prefixes_serialize(
|
|
2367
|
+
username=username,
|
|
2368
|
+
dataset=dataset,
|
|
2369
|
+
request_body=request_body,
|
|
2370
|
+
_request_auth=_request_auth,
|
|
2371
|
+
_content_type=_content_type,
|
|
2372
|
+
_headers=_headers,
|
|
2373
|
+
_host_index=_host_index
|
|
2374
|
+
)
|
|
2375
|
+
|
|
2376
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2377
|
+
'200': "object",
|
|
2378
|
+
'422': "HTTPValidationError",
|
|
2379
|
+
}
|
|
2380
|
+
response_data = self.api_client.call_api(
|
|
2381
|
+
*_param,
|
|
2382
|
+
_request_timeout=_request_timeout
|
|
2383
|
+
)
|
|
2384
|
+
response_data.read()
|
|
2385
|
+
return self.api_client.response_deserialize(
|
|
2386
|
+
response_data=response_data,
|
|
2387
|
+
response_types_map=_response_types_map,
|
|
2388
|
+
).data
|
|
2389
|
+
|
|
2390
|
+
|
|
2391
|
+
@validate_call
|
|
2392
|
+
def set_prefixes_with_http_info(
|
|
2393
|
+
self,
|
|
2394
|
+
username: StrictStr,
|
|
2395
|
+
dataset: StrictStr,
|
|
2396
|
+
request_body: Dict[str, Optional[StrictStr]],
|
|
2397
|
+
_request_timeout: Union[
|
|
2398
|
+
None,
|
|
2399
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2400
|
+
Tuple[
|
|
2401
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2402
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2403
|
+
]
|
|
2404
|
+
] = None,
|
|
2405
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2406
|
+
_content_type: Optional[StrictStr] = None,
|
|
2407
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2408
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2409
|
+
) -> ApiResponse[object]:
|
|
2410
|
+
"""Set SPARQL prefixes for a dataset
|
|
2411
|
+
|
|
2412
|
+
|
|
2413
|
+
:param username: (required)
|
|
2414
|
+
:type username: str
|
|
2415
|
+
:param dataset: (required)
|
|
2416
|
+
:type dataset: str
|
|
2417
|
+
:param request_body: (required)
|
|
2418
|
+
:type request_body: Dict[str, Optional[str]]
|
|
2419
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2420
|
+
number provided, it will be total request
|
|
2421
|
+
timeout. It can also be a pair (tuple) of
|
|
2422
|
+
(connection, read) timeouts.
|
|
2423
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2424
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2425
|
+
request; this effectively ignores the
|
|
2426
|
+
authentication in the spec for a single request.
|
|
2427
|
+
:type _request_auth: dict, optional
|
|
2428
|
+
:param _content_type: force content-type for the request.
|
|
2429
|
+
:type _content_type: str, Optional
|
|
2430
|
+
:param _headers: set to override the headers for a single
|
|
2431
|
+
request; this effectively ignores the headers
|
|
2432
|
+
in the spec for a single request.
|
|
2433
|
+
:type _headers: dict, optional
|
|
2434
|
+
:param _host_index: set to override the host_index for a single
|
|
2435
|
+
request; this effectively ignores the host_index
|
|
2436
|
+
in the spec for a single request.
|
|
2437
|
+
:type _host_index: int, optional
|
|
2438
|
+
:return: Returns the result object.
|
|
2439
|
+
""" # noqa: E501
|
|
2440
|
+
|
|
2441
|
+
_param = self._set_prefixes_serialize(
|
|
2442
|
+
username=username,
|
|
2443
|
+
dataset=dataset,
|
|
2444
|
+
request_body=request_body,
|
|
2445
|
+
_request_auth=_request_auth,
|
|
2446
|
+
_content_type=_content_type,
|
|
2447
|
+
_headers=_headers,
|
|
2448
|
+
_host_index=_host_index
|
|
2449
|
+
)
|
|
2450
|
+
|
|
2451
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2452
|
+
'200': "object",
|
|
2453
|
+
'422': "HTTPValidationError",
|
|
2454
|
+
}
|
|
2455
|
+
response_data = self.api_client.call_api(
|
|
2456
|
+
*_param,
|
|
2457
|
+
_request_timeout=_request_timeout
|
|
2458
|
+
)
|
|
2459
|
+
response_data.read()
|
|
2460
|
+
return self.api_client.response_deserialize(
|
|
2461
|
+
response_data=response_data,
|
|
2462
|
+
response_types_map=_response_types_map,
|
|
2463
|
+
)
|
|
2464
|
+
|
|
2465
|
+
|
|
2466
|
+
@validate_call
|
|
2467
|
+
def set_prefixes_without_preload_content(
|
|
2468
|
+
self,
|
|
2469
|
+
username: StrictStr,
|
|
2470
|
+
dataset: StrictStr,
|
|
2471
|
+
request_body: Dict[str, Optional[StrictStr]],
|
|
2472
|
+
_request_timeout: Union[
|
|
2473
|
+
None,
|
|
2474
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2475
|
+
Tuple[
|
|
2476
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2477
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2478
|
+
]
|
|
2479
|
+
] = None,
|
|
2480
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2481
|
+
_content_type: Optional[StrictStr] = None,
|
|
2482
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2483
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2484
|
+
) -> RESTResponseType:
|
|
2485
|
+
"""Set SPARQL prefixes for a dataset
|
|
2486
|
+
|
|
2487
|
+
|
|
2488
|
+
:param username: (required)
|
|
2489
|
+
:type username: str
|
|
2490
|
+
:param dataset: (required)
|
|
2491
|
+
:type dataset: str
|
|
2492
|
+
:param request_body: (required)
|
|
2493
|
+
:type request_body: Dict[str, Optional[str]]
|
|
2494
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2495
|
+
number provided, it will be total request
|
|
2496
|
+
timeout. It can also be a pair (tuple) of
|
|
2497
|
+
(connection, read) timeouts.
|
|
2498
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2499
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2500
|
+
request; this effectively ignores the
|
|
2501
|
+
authentication in the spec for a single request.
|
|
2502
|
+
:type _request_auth: dict, optional
|
|
2503
|
+
:param _content_type: force content-type for the request.
|
|
2504
|
+
:type _content_type: str, Optional
|
|
2505
|
+
:param _headers: set to override the headers for a single
|
|
2506
|
+
request; this effectively ignores the headers
|
|
2507
|
+
in the spec for a single request.
|
|
2508
|
+
:type _headers: dict, optional
|
|
2509
|
+
:param _host_index: set to override the host_index for a single
|
|
2510
|
+
request; this effectively ignores the host_index
|
|
2511
|
+
in the spec for a single request.
|
|
2512
|
+
:type _host_index: int, optional
|
|
2513
|
+
:return: Returns the result object.
|
|
2514
|
+
""" # noqa: E501
|
|
2515
|
+
|
|
2516
|
+
_param = self._set_prefixes_serialize(
|
|
2517
|
+
username=username,
|
|
2518
|
+
dataset=dataset,
|
|
2519
|
+
request_body=request_body,
|
|
2520
|
+
_request_auth=_request_auth,
|
|
2521
|
+
_content_type=_content_type,
|
|
2522
|
+
_headers=_headers,
|
|
2523
|
+
_host_index=_host_index
|
|
2524
|
+
)
|
|
2525
|
+
|
|
2526
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2527
|
+
'200': "object",
|
|
2528
|
+
'422': "HTTPValidationError",
|
|
2529
|
+
}
|
|
2530
|
+
response_data = self.api_client.call_api(
|
|
2531
|
+
*_param,
|
|
2532
|
+
_request_timeout=_request_timeout
|
|
2533
|
+
)
|
|
2534
|
+
return response_data.response
|
|
2535
|
+
|
|
2536
|
+
|
|
2537
|
+
def _set_prefixes_serialize(
|
|
2538
|
+
self,
|
|
2539
|
+
username,
|
|
2540
|
+
dataset,
|
|
2541
|
+
request_body,
|
|
2542
|
+
_request_auth,
|
|
2543
|
+
_content_type,
|
|
2544
|
+
_headers,
|
|
2545
|
+
_host_index,
|
|
2546
|
+
) -> RequestSerialized:
|
|
2547
|
+
|
|
2548
|
+
_host = None
|
|
2549
|
+
|
|
2550
|
+
_collection_formats: Dict[str, str] = {
|
|
2551
|
+
}
|
|
2552
|
+
|
|
2553
|
+
_path_params: Dict[str, str] = {}
|
|
2554
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2555
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2556
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2557
|
+
_files: Dict[
|
|
2558
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2559
|
+
] = {}
|
|
2560
|
+
_body_params: Optional[bytes] = None
|
|
2561
|
+
|
|
2562
|
+
# process the path parameters
|
|
2563
|
+
if username is not None:
|
|
2564
|
+
_path_params['username'] = username
|
|
2565
|
+
if dataset is not None:
|
|
2566
|
+
_path_params['dataset'] = dataset
|
|
2567
|
+
# process the query parameters
|
|
2568
|
+
# process the header parameters
|
|
2569
|
+
# process the form parameters
|
|
2570
|
+
# process the body parameter
|
|
2571
|
+
if request_body is not None:
|
|
2572
|
+
_body_params = request_body
|
|
2573
|
+
|
|
2574
|
+
|
|
2575
|
+
# set the HTTP header `Accept`
|
|
2576
|
+
if 'Accept' not in _header_params:
|
|
2577
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2578
|
+
[
|
|
2579
|
+
'application/json'
|
|
2580
|
+
]
|
|
2581
|
+
)
|
|
2582
|
+
|
|
2583
|
+
# set the HTTP header `Content-Type`
|
|
2584
|
+
if _content_type:
|
|
2585
|
+
_header_params['Content-Type'] = _content_type
|
|
2586
|
+
else:
|
|
2587
|
+
_default_content_type = (
|
|
2588
|
+
self.api_client.select_header_content_type(
|
|
2589
|
+
[
|
|
2590
|
+
'application/json'
|
|
2591
|
+
]
|
|
2592
|
+
)
|
|
2593
|
+
)
|
|
2594
|
+
if _default_content_type is not None:
|
|
2595
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2596
|
+
|
|
2597
|
+
# authentication setting
|
|
2598
|
+
_auth_settings: List[str] = [
|
|
2599
|
+
'QAnswer-Api-Key',
|
|
2600
|
+
'Bearer token'
|
|
2601
|
+
]
|
|
2602
|
+
|
|
2603
|
+
return self.api_client.param_serialize(
|
|
2604
|
+
method='POST',
|
|
2605
|
+
resource_path='/backend/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/set-prefixes',
|
|
2606
|
+
path_params=_path_params,
|
|
2607
|
+
query_params=_query_params,
|
|
2608
|
+
header_params=_header_params,
|
|
2609
|
+
body=_body_params,
|
|
2610
|
+
post_params=_form_params,
|
|
2611
|
+
files=_files,
|
|
2612
|
+
auth_settings=_auth_settings,
|
|
2613
|
+
collection_formats=_collection_formats,
|
|
2614
|
+
_host=_host,
|
|
2615
|
+
_request_auth=_request_auth
|
|
2616
|
+
)
|
|
2617
|
+
|
|
2618
|
+
|
|
2619
|
+
|
|
2620
|
+
|
|
2621
|
+
@validate_call
|
|
2622
|
+
def sparql_endpoint(
|
|
2623
|
+
self,
|
|
2624
|
+
username: StrictStr,
|
|
2625
|
+
dataset: StrictStr,
|
|
2626
|
+
query: StrictStr,
|
|
2627
|
+
_request_timeout: Union[
|
|
2628
|
+
None,
|
|
2629
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2630
|
+
Tuple[
|
|
2631
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2632
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2633
|
+
]
|
|
2634
|
+
] = None,
|
|
2635
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2636
|
+
_content_type: Optional[StrictStr] = None,
|
|
2637
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2638
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2639
|
+
) -> object:
|
|
2640
|
+
"""Execute a SPARQL query on a dataset (GET)
|
|
2641
|
+
|
|
2642
|
+
|
|
2643
|
+
:param username: (required)
|
|
2644
|
+
:type username: str
|
|
2645
|
+
:param dataset: (required)
|
|
2646
|
+
:type dataset: str
|
|
2647
|
+
:param query: (required)
|
|
2648
|
+
:type query: str
|
|
2649
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2650
|
+
number provided, it will be total request
|
|
2651
|
+
timeout. It can also be a pair (tuple) of
|
|
2652
|
+
(connection, read) timeouts.
|
|
2653
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2654
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2655
|
+
request; this effectively ignores the
|
|
2656
|
+
authentication in the spec for a single request.
|
|
2657
|
+
:type _request_auth: dict, optional
|
|
2658
|
+
:param _content_type: force content-type for the request.
|
|
2659
|
+
:type _content_type: str, Optional
|
|
2660
|
+
:param _headers: set to override the headers for a single
|
|
2661
|
+
request; this effectively ignores the headers
|
|
2662
|
+
in the spec for a single request.
|
|
2663
|
+
:type _headers: dict, optional
|
|
2664
|
+
:param _host_index: set to override the host_index for a single
|
|
2665
|
+
request; this effectively ignores the host_index
|
|
2666
|
+
in the spec for a single request.
|
|
2667
|
+
:type _host_index: int, optional
|
|
2668
|
+
:return: Returns the result object.
|
|
2669
|
+
""" # noqa: E501
|
|
2670
|
+
|
|
2671
|
+
_param = self._sparql_endpoint_serialize(
|
|
2672
|
+
username=username,
|
|
2673
|
+
dataset=dataset,
|
|
2674
|
+
query=query,
|
|
2675
|
+
_request_auth=_request_auth,
|
|
2676
|
+
_content_type=_content_type,
|
|
2677
|
+
_headers=_headers,
|
|
2678
|
+
_host_index=_host_index
|
|
2679
|
+
)
|
|
2680
|
+
|
|
2681
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2682
|
+
'200': "object",
|
|
2683
|
+
'422': "HTTPValidationError",
|
|
2684
|
+
}
|
|
2685
|
+
response_data = self.api_client.call_api(
|
|
2686
|
+
*_param,
|
|
2687
|
+
_request_timeout=_request_timeout
|
|
2688
|
+
)
|
|
2689
|
+
response_data.read()
|
|
2690
|
+
return self.api_client.response_deserialize(
|
|
2691
|
+
response_data=response_data,
|
|
2692
|
+
response_types_map=_response_types_map,
|
|
2693
|
+
).data
|
|
2694
|
+
|
|
2695
|
+
|
|
2696
|
+
@validate_call
|
|
2697
|
+
def sparql_endpoint_with_http_info(
|
|
2698
|
+
self,
|
|
2699
|
+
username: StrictStr,
|
|
2700
|
+
dataset: StrictStr,
|
|
2701
|
+
query: StrictStr,
|
|
2702
|
+
_request_timeout: Union[
|
|
2703
|
+
None,
|
|
2704
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2705
|
+
Tuple[
|
|
2706
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2707
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2708
|
+
]
|
|
2709
|
+
] = None,
|
|
2710
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2711
|
+
_content_type: Optional[StrictStr] = None,
|
|
2712
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2713
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2714
|
+
) -> ApiResponse[object]:
|
|
2715
|
+
"""Execute a SPARQL query on a dataset (GET)
|
|
2716
|
+
|
|
2717
|
+
|
|
2718
|
+
:param username: (required)
|
|
2719
|
+
:type username: str
|
|
2720
|
+
:param dataset: (required)
|
|
2721
|
+
:type dataset: str
|
|
2722
|
+
:param query: (required)
|
|
2723
|
+
:type query: str
|
|
2724
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2725
|
+
number provided, it will be total request
|
|
2726
|
+
timeout. It can also be a pair (tuple) of
|
|
2727
|
+
(connection, read) timeouts.
|
|
2728
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2729
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2730
|
+
request; this effectively ignores the
|
|
2731
|
+
authentication in the spec for a single request.
|
|
2732
|
+
:type _request_auth: dict, optional
|
|
2733
|
+
:param _content_type: force content-type for the request.
|
|
2734
|
+
:type _content_type: str, Optional
|
|
2735
|
+
:param _headers: set to override the headers for a single
|
|
2736
|
+
request; this effectively ignores the headers
|
|
2737
|
+
in the spec for a single request.
|
|
2738
|
+
:type _headers: dict, optional
|
|
2739
|
+
:param _host_index: set to override the host_index for a single
|
|
2740
|
+
request; this effectively ignores the host_index
|
|
2741
|
+
in the spec for a single request.
|
|
2742
|
+
:type _host_index: int, optional
|
|
2743
|
+
:return: Returns the result object.
|
|
2744
|
+
""" # noqa: E501
|
|
2745
|
+
|
|
2746
|
+
_param = self._sparql_endpoint_serialize(
|
|
2747
|
+
username=username,
|
|
2748
|
+
dataset=dataset,
|
|
2749
|
+
query=query,
|
|
2750
|
+
_request_auth=_request_auth,
|
|
2751
|
+
_content_type=_content_type,
|
|
2752
|
+
_headers=_headers,
|
|
2753
|
+
_host_index=_host_index
|
|
2754
|
+
)
|
|
2755
|
+
|
|
2756
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2757
|
+
'200': "object",
|
|
2758
|
+
'422': "HTTPValidationError",
|
|
2759
|
+
}
|
|
2760
|
+
response_data = self.api_client.call_api(
|
|
2761
|
+
*_param,
|
|
2762
|
+
_request_timeout=_request_timeout
|
|
2763
|
+
)
|
|
2764
|
+
response_data.read()
|
|
2765
|
+
return self.api_client.response_deserialize(
|
|
2766
|
+
response_data=response_data,
|
|
2767
|
+
response_types_map=_response_types_map,
|
|
2768
|
+
)
|
|
2769
|
+
|
|
2770
|
+
|
|
2771
|
+
@validate_call
|
|
2772
|
+
def sparql_endpoint_without_preload_content(
|
|
2773
|
+
self,
|
|
2774
|
+
username: StrictStr,
|
|
2775
|
+
dataset: StrictStr,
|
|
2776
|
+
query: StrictStr,
|
|
2777
|
+
_request_timeout: Union[
|
|
2778
|
+
None,
|
|
2779
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2780
|
+
Tuple[
|
|
2781
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2782
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2783
|
+
]
|
|
2784
|
+
] = None,
|
|
2785
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2786
|
+
_content_type: Optional[StrictStr] = None,
|
|
2787
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2788
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2789
|
+
) -> RESTResponseType:
|
|
2790
|
+
"""Execute a SPARQL query on a dataset (GET)
|
|
2791
|
+
|
|
2792
|
+
|
|
2793
|
+
:param username: (required)
|
|
2794
|
+
:type username: str
|
|
2795
|
+
:param dataset: (required)
|
|
2796
|
+
:type dataset: str
|
|
2797
|
+
:param query: (required)
|
|
2798
|
+
:type query: str
|
|
2799
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2800
|
+
number provided, it will be total request
|
|
2801
|
+
timeout. It can also be a pair (tuple) of
|
|
2802
|
+
(connection, read) timeouts.
|
|
2803
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2804
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2805
|
+
request; this effectively ignores the
|
|
2806
|
+
authentication in the spec for a single request.
|
|
2807
|
+
:type _request_auth: dict, optional
|
|
2808
|
+
:param _content_type: force content-type for the request.
|
|
2809
|
+
:type _content_type: str, Optional
|
|
2810
|
+
:param _headers: set to override the headers for a single
|
|
2811
|
+
request; this effectively ignores the headers
|
|
2812
|
+
in the spec for a single request.
|
|
2813
|
+
:type _headers: dict, optional
|
|
2814
|
+
:param _host_index: set to override the host_index for a single
|
|
2815
|
+
request; this effectively ignores the host_index
|
|
2816
|
+
in the spec for a single request.
|
|
2817
|
+
:type _host_index: int, optional
|
|
2818
|
+
:return: Returns the result object.
|
|
2819
|
+
""" # noqa: E501
|
|
2820
|
+
|
|
2821
|
+
_param = self._sparql_endpoint_serialize(
|
|
2822
|
+
username=username,
|
|
2823
|
+
dataset=dataset,
|
|
2824
|
+
query=query,
|
|
2825
|
+
_request_auth=_request_auth,
|
|
2826
|
+
_content_type=_content_type,
|
|
2827
|
+
_headers=_headers,
|
|
2828
|
+
_host_index=_host_index
|
|
2829
|
+
)
|
|
2830
|
+
|
|
2831
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2832
|
+
'200': "object",
|
|
2833
|
+
'422': "HTTPValidationError",
|
|
2834
|
+
}
|
|
2835
|
+
response_data = self.api_client.call_api(
|
|
2836
|
+
*_param,
|
|
2837
|
+
_request_timeout=_request_timeout
|
|
2838
|
+
)
|
|
2839
|
+
return response_data.response
|
|
2840
|
+
|
|
2841
|
+
|
|
2842
|
+
def _sparql_endpoint_serialize(
|
|
2843
|
+
self,
|
|
2844
|
+
username,
|
|
2845
|
+
dataset,
|
|
2846
|
+
query,
|
|
2847
|
+
_request_auth,
|
|
2848
|
+
_content_type,
|
|
2849
|
+
_headers,
|
|
2850
|
+
_host_index,
|
|
2851
|
+
) -> RequestSerialized:
|
|
2852
|
+
|
|
2853
|
+
_host = None
|
|
2854
|
+
|
|
2855
|
+
_collection_formats: Dict[str, str] = {
|
|
2856
|
+
}
|
|
2857
|
+
|
|
2858
|
+
_path_params: Dict[str, str] = {}
|
|
2859
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2860
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2861
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2862
|
+
_files: Dict[
|
|
2863
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2864
|
+
] = {}
|
|
2865
|
+
_body_params: Optional[bytes] = None
|
|
2866
|
+
|
|
2867
|
+
# process the path parameters
|
|
2868
|
+
if username is not None:
|
|
2869
|
+
_path_params['username'] = username
|
|
2870
|
+
if dataset is not None:
|
|
2871
|
+
_path_params['dataset'] = dataset
|
|
2872
|
+
# process the query parameters
|
|
2873
|
+
if query is not None:
|
|
2874
|
+
|
|
2875
|
+
_query_params.append(('query', query))
|
|
2876
|
+
|
|
2877
|
+
# process the header parameters
|
|
2878
|
+
# process the form parameters
|
|
2879
|
+
# process the body parameter
|
|
2880
|
+
|
|
2881
|
+
|
|
2882
|
+
# set the HTTP header `Accept`
|
|
2883
|
+
if 'Accept' not in _header_params:
|
|
2884
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2885
|
+
[
|
|
2886
|
+
'application/json'
|
|
2887
|
+
]
|
|
2888
|
+
)
|
|
2889
|
+
|
|
2890
|
+
|
|
2891
|
+
# authentication setting
|
|
2892
|
+
_auth_settings: List[str] = [
|
|
2893
|
+
'QAnswer-Api-Key',
|
|
2894
|
+
'Bearer token'
|
|
2895
|
+
]
|
|
2896
|
+
|
|
2897
|
+
return self.api_client.param_serialize(
|
|
2898
|
+
method='GET',
|
|
2899
|
+
resource_path='/backend/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/sparql',
|
|
2900
|
+
path_params=_path_params,
|
|
2901
|
+
query_params=_query_params,
|
|
2902
|
+
header_params=_header_params,
|
|
2903
|
+
body=_body_params,
|
|
2904
|
+
post_params=_form_params,
|
|
2905
|
+
files=_files,
|
|
2906
|
+
auth_settings=_auth_settings,
|
|
2907
|
+
collection_formats=_collection_formats,
|
|
2908
|
+
_host=_host,
|
|
2909
|
+
_request_auth=_request_auth
|
|
2910
|
+
)
|
|
2911
|
+
|
|
2912
|
+
|
|
2913
|
+
|
|
2914
|
+
|
|
2915
|
+
@validate_call
|
|
2916
|
+
def sparql_endpoint1(
|
|
2917
|
+
self,
|
|
2918
|
+
username: StrictStr,
|
|
2919
|
+
dataset: StrictStr,
|
|
2920
|
+
_request_timeout: Union[
|
|
2921
|
+
None,
|
|
2922
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2923
|
+
Tuple[
|
|
2924
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2925
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2926
|
+
]
|
|
2927
|
+
] = None,
|
|
2928
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2929
|
+
_content_type: Optional[StrictStr] = None,
|
|
2930
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2931
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2932
|
+
) -> object:
|
|
2933
|
+
"""Execute a SPARQL query on a dataset (POST)
|
|
2934
|
+
|
|
2935
|
+
|
|
2936
|
+
:param username: (required)
|
|
2937
|
+
:type username: str
|
|
2938
|
+
:param dataset: (required)
|
|
2939
|
+
:type dataset: str
|
|
2940
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2941
|
+
number provided, it will be total request
|
|
2942
|
+
timeout. It can also be a pair (tuple) of
|
|
2943
|
+
(connection, read) timeouts.
|
|
2944
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2945
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2946
|
+
request; this effectively ignores the
|
|
2947
|
+
authentication in the spec for a single request.
|
|
2948
|
+
:type _request_auth: dict, optional
|
|
2949
|
+
:param _content_type: force content-type for the request.
|
|
2950
|
+
:type _content_type: str, Optional
|
|
2951
|
+
:param _headers: set to override the headers for a single
|
|
2952
|
+
request; this effectively ignores the headers
|
|
2953
|
+
in the spec for a single request.
|
|
2954
|
+
:type _headers: dict, optional
|
|
2955
|
+
:param _host_index: set to override the host_index for a single
|
|
2956
|
+
request; this effectively ignores the host_index
|
|
2957
|
+
in the spec for a single request.
|
|
2958
|
+
:type _host_index: int, optional
|
|
2959
|
+
:return: Returns the result object.
|
|
2960
|
+
""" # noqa: E501
|
|
2961
|
+
|
|
2962
|
+
_param = self._sparql_endpoint1_serialize(
|
|
2963
|
+
username=username,
|
|
2964
|
+
dataset=dataset,
|
|
2965
|
+
_request_auth=_request_auth,
|
|
2966
|
+
_content_type=_content_type,
|
|
2967
|
+
_headers=_headers,
|
|
2968
|
+
_host_index=_host_index
|
|
2969
|
+
)
|
|
2970
|
+
|
|
2971
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2972
|
+
'200': "object",
|
|
2973
|
+
'422': "HTTPValidationError",
|
|
2974
|
+
}
|
|
2975
|
+
response_data = self.api_client.call_api(
|
|
2976
|
+
*_param,
|
|
2977
|
+
_request_timeout=_request_timeout
|
|
2978
|
+
)
|
|
2979
|
+
response_data.read()
|
|
2980
|
+
return self.api_client.response_deserialize(
|
|
2981
|
+
response_data=response_data,
|
|
2982
|
+
response_types_map=_response_types_map,
|
|
2983
|
+
).data
|
|
2984
|
+
|
|
2985
|
+
|
|
2986
|
+
@validate_call
|
|
2987
|
+
def sparql_endpoint1_with_http_info(
|
|
2988
|
+
self,
|
|
2989
|
+
username: StrictStr,
|
|
2990
|
+
dataset: StrictStr,
|
|
2991
|
+
_request_timeout: Union[
|
|
2992
|
+
None,
|
|
2993
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2994
|
+
Tuple[
|
|
2995
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2996
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2997
|
+
]
|
|
2998
|
+
] = None,
|
|
2999
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3000
|
+
_content_type: Optional[StrictStr] = None,
|
|
3001
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3002
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3003
|
+
) -> ApiResponse[object]:
|
|
3004
|
+
"""Execute a SPARQL query on a dataset (POST)
|
|
3005
|
+
|
|
3006
|
+
|
|
3007
|
+
:param username: (required)
|
|
3008
|
+
:type username: str
|
|
3009
|
+
:param dataset: (required)
|
|
3010
|
+
:type dataset: str
|
|
3011
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3012
|
+
number provided, it will be total request
|
|
3013
|
+
timeout. It can also be a pair (tuple) of
|
|
3014
|
+
(connection, read) timeouts.
|
|
3015
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3016
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3017
|
+
request; this effectively ignores the
|
|
3018
|
+
authentication in the spec for a single request.
|
|
3019
|
+
:type _request_auth: dict, optional
|
|
3020
|
+
:param _content_type: force content-type for the request.
|
|
3021
|
+
:type _content_type: str, Optional
|
|
3022
|
+
:param _headers: set to override the headers for a single
|
|
3023
|
+
request; this effectively ignores the headers
|
|
3024
|
+
in the spec for a single request.
|
|
3025
|
+
:type _headers: dict, optional
|
|
3026
|
+
:param _host_index: set to override the host_index for a single
|
|
3027
|
+
request; this effectively ignores the host_index
|
|
3028
|
+
in the spec for a single request.
|
|
3029
|
+
:type _host_index: int, optional
|
|
3030
|
+
:return: Returns the result object.
|
|
3031
|
+
""" # noqa: E501
|
|
3032
|
+
|
|
3033
|
+
_param = self._sparql_endpoint1_serialize(
|
|
3034
|
+
username=username,
|
|
3035
|
+
dataset=dataset,
|
|
3036
|
+
_request_auth=_request_auth,
|
|
3037
|
+
_content_type=_content_type,
|
|
3038
|
+
_headers=_headers,
|
|
3039
|
+
_host_index=_host_index
|
|
3040
|
+
)
|
|
3041
|
+
|
|
3042
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3043
|
+
'200': "object",
|
|
3044
|
+
'422': "HTTPValidationError",
|
|
3045
|
+
}
|
|
3046
|
+
response_data = self.api_client.call_api(
|
|
3047
|
+
*_param,
|
|
3048
|
+
_request_timeout=_request_timeout
|
|
3049
|
+
)
|
|
3050
|
+
response_data.read()
|
|
3051
|
+
return self.api_client.response_deserialize(
|
|
3052
|
+
response_data=response_data,
|
|
3053
|
+
response_types_map=_response_types_map,
|
|
3054
|
+
)
|
|
3055
|
+
|
|
3056
|
+
|
|
3057
|
+
@validate_call
|
|
3058
|
+
def sparql_endpoint1_without_preload_content(
|
|
3059
|
+
self,
|
|
3060
|
+
username: StrictStr,
|
|
3061
|
+
dataset: StrictStr,
|
|
3062
|
+
_request_timeout: Union[
|
|
3063
|
+
None,
|
|
3064
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3065
|
+
Tuple[
|
|
3066
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3067
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3068
|
+
]
|
|
3069
|
+
] = None,
|
|
3070
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3071
|
+
_content_type: Optional[StrictStr] = None,
|
|
3072
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3073
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3074
|
+
) -> RESTResponseType:
|
|
3075
|
+
"""Execute a SPARQL query on a dataset (POST)
|
|
3076
|
+
|
|
3077
|
+
|
|
3078
|
+
:param username: (required)
|
|
3079
|
+
:type username: str
|
|
3080
|
+
:param dataset: (required)
|
|
3081
|
+
:type dataset: str
|
|
3082
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3083
|
+
number provided, it will be total request
|
|
3084
|
+
timeout. It can also be a pair (tuple) of
|
|
3085
|
+
(connection, read) timeouts.
|
|
3086
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3087
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3088
|
+
request; this effectively ignores the
|
|
3089
|
+
authentication in the spec for a single request.
|
|
3090
|
+
:type _request_auth: dict, optional
|
|
3091
|
+
:param _content_type: force content-type for the request.
|
|
3092
|
+
:type _content_type: str, Optional
|
|
3093
|
+
:param _headers: set to override the headers for a single
|
|
3094
|
+
request; this effectively ignores the headers
|
|
3095
|
+
in the spec for a single request.
|
|
3096
|
+
:type _headers: dict, optional
|
|
3097
|
+
:param _host_index: set to override the host_index for a single
|
|
3098
|
+
request; this effectively ignores the host_index
|
|
3099
|
+
in the spec for a single request.
|
|
3100
|
+
:type _host_index: int, optional
|
|
3101
|
+
:return: Returns the result object.
|
|
3102
|
+
""" # noqa: E501
|
|
3103
|
+
|
|
3104
|
+
_param = self._sparql_endpoint1_serialize(
|
|
3105
|
+
username=username,
|
|
3106
|
+
dataset=dataset,
|
|
3107
|
+
_request_auth=_request_auth,
|
|
3108
|
+
_content_type=_content_type,
|
|
3109
|
+
_headers=_headers,
|
|
3110
|
+
_host_index=_host_index
|
|
3111
|
+
)
|
|
3112
|
+
|
|
3113
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3114
|
+
'200': "object",
|
|
3115
|
+
'422': "HTTPValidationError",
|
|
3116
|
+
}
|
|
3117
|
+
response_data = self.api_client.call_api(
|
|
3118
|
+
*_param,
|
|
3119
|
+
_request_timeout=_request_timeout
|
|
3120
|
+
)
|
|
3121
|
+
return response_data.response
|
|
3122
|
+
|
|
3123
|
+
|
|
3124
|
+
def _sparql_endpoint1_serialize(
|
|
3125
|
+
self,
|
|
3126
|
+
username,
|
|
3127
|
+
dataset,
|
|
3128
|
+
_request_auth,
|
|
3129
|
+
_content_type,
|
|
3130
|
+
_headers,
|
|
3131
|
+
_host_index,
|
|
3132
|
+
) -> RequestSerialized:
|
|
3133
|
+
|
|
3134
|
+
_host = None
|
|
3135
|
+
|
|
3136
|
+
_collection_formats: Dict[str, str] = {
|
|
3137
|
+
}
|
|
3138
|
+
|
|
3139
|
+
_path_params: Dict[str, str] = {}
|
|
3140
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3141
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3142
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3143
|
+
_files: Dict[
|
|
3144
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3145
|
+
] = {}
|
|
3146
|
+
_body_params: Optional[bytes] = None
|
|
3147
|
+
|
|
3148
|
+
# process the path parameters
|
|
3149
|
+
if username is not None:
|
|
3150
|
+
_path_params['username'] = username
|
|
3151
|
+
if dataset is not None:
|
|
3152
|
+
_path_params['dataset'] = dataset
|
|
3153
|
+
# process the query parameters
|
|
3154
|
+
# process the header parameters
|
|
3155
|
+
# process the form parameters
|
|
3156
|
+
# process the body parameter
|
|
3157
|
+
|
|
3158
|
+
|
|
3159
|
+
# set the HTTP header `Accept`
|
|
3160
|
+
if 'Accept' not in _header_params:
|
|
3161
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3162
|
+
[
|
|
3163
|
+
'application/json'
|
|
3164
|
+
]
|
|
3165
|
+
)
|
|
3166
|
+
|
|
3167
|
+
|
|
3168
|
+
# authentication setting
|
|
3169
|
+
_auth_settings: List[str] = [
|
|
3170
|
+
'QAnswer-Api-Key',
|
|
3171
|
+
'Bearer token'
|
|
3172
|
+
]
|
|
3173
|
+
|
|
3174
|
+
return self.api_client.param_serialize(
|
|
3175
|
+
method='POST',
|
|
3176
|
+
resource_path='/backend/api/tasks/rdf/sparql-endpoint/{username}/{dataset}/sparql',
|
|
3177
|
+
path_params=_path_params,
|
|
3178
|
+
query_params=_query_params,
|
|
3179
|
+
header_params=_header_params,
|
|
3180
|
+
body=_body_params,
|
|
3181
|
+
post_params=_form_params,
|
|
3182
|
+
files=_files,
|
|
3183
|
+
auth_settings=_auth_settings,
|
|
3184
|
+
collection_formats=_collection_formats,
|
|
3185
|
+
_host=_host,
|
|
3186
|
+
_request_auth=_request_auth
|
|
3187
|
+
)
|
|
3188
|
+
|
|
3189
|
+
|