instana-client 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- instana_client/__init__.py +534 -0
- instana_client/api/__init__.py +58 -0
- instana_client/api/action_catalog_api.py +1380 -0
- instana_client/api/action_history_api.py +1793 -0
- instana_client/api/apdex_report_api.py +338 -0
- instana_client/api/apdex_settings_api.py +1353 -0
- instana_client/api/api_token_api.py +1370 -0
- instana_client/api/application_alert_configuration_api.py +2865 -0
- instana_client/api/application_analyze_api.py +2017 -0
- instana_client/api/application_catalog_api.py +885 -0
- instana_client/api/application_metrics_api.py +1211 -0
- instana_client/api/application_resources_api.py +1487 -0
- instana_client/api/application_settings_api.py +7261 -0
- instana_client/api/application_topology_api.py +354 -0
- instana_client/api/audit_log_api.py +635 -0
- instana_client/api/authentication_api.py +1008 -0
- instana_client/api/business_monitoring_api.py +2177 -0
- instana_client/api/custom_dashboards_api.py +1930 -0
- instana_client/api/event_settings_api.py +14613 -0
- instana_client/api/events_api.py +1654 -0
- instana_client/api/global_application_alert_configuration_api.py +2606 -0
- instana_client/api/groups_api.py +4078 -0
- instana_client/api/health_api.py +527 -0
- instana_client/api/host_agent_api.py +2120 -0
- instana_client/api/infrastructure_alert_configuration_api.py +2524 -0
- instana_client/api/infrastructure_analyze_api.py +1141 -0
- instana_client/api/infrastructure_catalog_api.py +1822 -0
- instana_client/api/infrastructure_metrics_api.py +331 -0
- instana_client/api/infrastructure_resources_api.py +1880 -0
- instana_client/api/infrastructure_topology_api.py +595 -0
- instana_client/api/log_alert_configuration_api.py +2524 -0
- instana_client/api/maintenance_configuration_api.py +2683 -0
- instana_client/api/mobile_app_analyze_api.py +613 -0
- instana_client/api/mobile_app_catalog_api.py +825 -0
- instana_client/api/mobile_app_configuration_api.py +2847 -0
- instana_client/api/mobile_app_metrics_api.py +892 -0
- instana_client/api/policies_api.py +1755 -0
- instana_client/api/releases_api.py +1408 -0
- instana_client/api/service_levels_alert_configuration_api.py +2577 -0
- instana_client/api/service_levels_objective_slo_configurations_api.py +1825 -0
- instana_client/api/service_levels_objective_slo_report_api.py +335 -0
- instana_client/api/session_settings_api.py +801 -0
- instana_client/api/sli_report_api.py +352 -0
- instana_client/api/sli_settings_api.py +2677 -0
- instana_client/api/synthetic_alert_configuration_api.py +2606 -0
- instana_client/api/synthetic_calls_api.py +789 -0
- instana_client/api/synthetic_catalog_api.py +543 -0
- instana_client/api/synthetic_metrics_api.py +322 -0
- instana_client/api/synthetic_settings_api.py +5144 -0
- instana_client/api/synthetic_test_playback_results_api.py +2142 -0
- instana_client/api/usage_api.py +1404 -0
- instana_client/api/user_api.py +2404 -0
- instana_client/api/website_analyze_api.py +619 -0
- instana_client/api/website_catalog_api.py +832 -0
- instana_client/api/website_configuration_api.py +3745 -0
- instana_client/api/website_metrics_api.py +889 -0
- instana_client/api_client.py +798 -0
- instana_client/api_response.py +21 -0
- instana_client/configuration.py +616 -0
- instana_client/exceptions.py +217 -0
- instana_client/models/__init__.py +464 -0
- instana_client/models/abstract_integration.py +155 -0
- instana_client/models/abstract_rule.py +124 -0
- instana_client/models/access_log_entry.py +105 -0
- instana_client/models/access_log_response.py +98 -0
- instana_client/models/access_rule.py +107 -0
- instana_client/models/action.py +135 -0
- instana_client/models/action_configuration.py +104 -0
- instana_client/models/action_instance.py +185 -0
- instana_client/models/action_instance_metadata_entry.py +90 -0
- instana_client/models/action_instance_parameter.py +94 -0
- instana_client/models/action_instance_request.py +108 -0
- instana_client/models/action_instance_request_parameters.py +92 -0
- instana_client/models/action_match.py +98 -0
- instana_client/models/action_search_space.py +94 -0
- instana_client/models/adaptive_baseline.py +92 -0
- instana_client/models/adaptive_threshold_rule.py +91 -0
- instana_client/models/adjusted_timeframe.py +91 -0
- instana_client/models/agent_configuration_update.py +93 -0
- instana_client/models/alerting_configuration.py +113 -0
- instana_client/models/alerting_configuration_with_last_updated.py +115 -0
- instana_client/models/alerting_time_window.py +109 -0
- instana_client/models/apdex_configuration.py +99 -0
- instana_client/models/apdex_configuration_input.py +95 -0
- instana_client/models/apdex_entity.py +119 -0
- instana_client/models/apdex_report.py +94 -0
- instana_client/models/api_create_group.py +104 -0
- instana_client/models/api_group.py +107 -0
- instana_client/models/api_member.py +90 -0
- instana_client/models/api_permission_set.py +178 -0
- instana_client/models/api_restricted_application_filter.py +108 -0
- instana_client/models/api_token.py +250 -0
- instana_client/models/app_data_metric_configuration.py +105 -0
- instana_client/models/application.py +104 -0
- instana_client/models/application_alert_config.py +203 -0
- instana_client/models/application_alert_config_with_metadata.py +213 -0
- instana_client/models/application_alert_rule.py +135 -0
- instana_client/models/application_apdex_entity.py +111 -0
- instana_client/models/application_config.py +131 -0
- instana_client/models/application_event_result.py +108 -0
- instana_client/models/application_item.py +94 -0
- instana_client/models/application_metric_result.py +109 -0
- instana_client/models/application_node.py +106 -0
- instana_client/models/application_result.py +102 -0
- instana_client/models/application_scope.py +89 -0
- instana_client/models/application_scope_with_metadata.py +90 -0
- instana_client/models/application_sli_entity.py +103 -0
- instana_client/models/application_slo_entity.py +112 -0
- instana_client/models/application_time_threshold.py +115 -0
- instana_client/models/audit_log_entry.py +102 -0
- instana_client/models/audit_log_ui_response.py +98 -0
- instana_client/models/author.py +100 -0
- instana_client/models/availability_blueprint_indicator.py +106 -0
- instana_client/models/availability_sli_entity.py +138 -0
- instana_client/models/available_metrics.py +96 -0
- instana_client/models/available_plugins.py +88 -0
- instana_client/models/backend_trace_reference.py +88 -0
- instana_client/models/binary_operator_dto.py +107 -0
- instana_client/models/browser_script_configuration.py +127 -0
- instana_client/models/built_in_event_specification.py +123 -0
- instana_client/models/built_in_event_specification_with_last_updated.py +125 -0
- instana_client/models/business_activity.py +132 -0
- instana_client/models/business_perspective_config.py +99 -0
- instana_client/models/call_groups_item.py +95 -0
- instana_client/models/call_groups_result.py +111 -0
- instana_client/models/call_relation.py +100 -0
- instana_client/models/change_summary.py +101 -0
- instana_client/models/cloudfoundry_physical_context.py +104 -0
- instana_client/models/condition.py +88 -0
- instana_client/models/config_version.py +101 -0
- instana_client/models/crash_mobile_app_alert_rule.py +90 -0
- instana_client/models/cursor_paginated_business_activity_item.py +96 -0
- instana_client/models/cursor_pagination.py +93 -0
- instana_client/models/cursor_pagination_infra_explore_cursor.py +90 -0
- instana_client/models/custom_blueprint_indicator.py +104 -0
- instana_client/models/custom_dashboard.py +111 -0
- instana_client/models/custom_dashboard_preview.py +103 -0
- instana_client/models/custom_email_subject_prefix.py +94 -0
- instana_client/models/custom_event_mobile_app_alert_rule.py +92 -0
- instana_client/models/custom_event_specification.py +133 -0
- instana_client/models/custom_event_specification_with_last_updated.py +143 -0
- instana_client/models/custom_event_website_alert_rule.py +92 -0
- instana_client/models/custom_payload_configuration.py +97 -0
- instana_client/models/custom_payload_field.py +112 -0
- instana_client/models/custom_payload_with_last_updated.py +99 -0
- instana_client/models/dashboard_api_token.py +90 -0
- instana_client/models/database_integration.py +90 -0
- instana_client/models/deprecated_tag_filter.py +111 -0
- instana_client/models/dns_action_configuration.py +134 -0
- instana_client/models/dns_action_filter_query_time.py +99 -0
- instana_client/models/dns_action_filter_target_value.py +106 -0
- instana_client/models/duration.py +98 -0
- instana_client/models/dynamic_field.py +95 -0
- instana_client/models/dynamic_field_value.py +90 -0
- instana_client/models/dynamic_parameter.py +94 -0
- instana_client/models/edit_user.py +88 -0
- instana_client/models/email_integration.py +98 -0
- instana_client/models/empty_configuration.py +92 -0
- instana_client/models/endpoint.py +131 -0
- instana_client/models/endpoint_config.py +112 -0
- instana_client/models/endpoint_event_result.py +112 -0
- instana_client/models/endpoint_item.py +94 -0
- instana_client/models/endpoint_metric_result.py +109 -0
- instana_client/models/endpoint_node.py +91 -0
- instana_client/models/endpoint_result.py +102 -0
- instana_client/models/endpoint_simple.py +102 -0
- instana_client/models/entity_count_rule.py +100 -0
- instana_client/models/entity_count_verification_rule.py +114 -0
- instana_client/models/entity_health_info.py +99 -0
- instana_client/models/entity_id.py +92 -0
- instana_client/models/entity_verification_rule.py +105 -0
- instana_client/models/error_budget_alert_rule.py +97 -0
- instana_client/models/errors_application_alert_rule.py +90 -0
- instana_client/models/event.py +127 -0
- instana_client/models/event_filtering_configuration.py +106 -0
- instana_client/models/event_result.py +145 -0
- instana_client/models/event_specification_info.py +114 -0
- instana_client/models/extended_service.py +123 -0
- instana_client/models/failure_synthetic_alert_rule.py +90 -0
- instana_client/models/fixed_http_path_segment_matching_rule.py +90 -0
- instana_client/models/fixed_time_window.py +93 -0
- instana_client/models/full_trace.py +97 -0
- instana_client/models/generic_infra_alert_rule.py +93 -0
- instana_client/models/geo_location_configuration.py +106 -0
- instana_client/models/geo_mapping_rule.py +120 -0
- instana_client/models/geo_subdivision.py +91 -0
- instana_client/models/get_activities.py +115 -0
- instana_client/models/get_application_metrics.py +112 -0
- instana_client/models/get_applications.py +150 -0
- instana_client/models/get_available_metrics_query.py +103 -0
- instana_client/models/get_available_plugins_query.py +98 -0
- instana_client/models/get_call_groups.py +141 -0
- instana_client/models/get_combined_metrics.py +103 -0
- instana_client/models/get_dynamic_parameter_values.py +100 -0
- instana_client/models/get_endpoints.py +150 -0
- instana_client/models/get_infrastructure_groups_query.py +127 -0
- instana_client/models/get_infrastructure_query.py +127 -0
- instana_client/models/get_metrics_result.py +128 -0
- instana_client/models/get_mobile_app_beacon_groups.py +146 -0
- instana_client/models/get_mobile_app_beacons.py +118 -0
- instana_client/models/get_mobile_app_metrics.py +122 -0
- instana_client/models/get_mobile_app_metrics_v2.py +118 -0
- instana_client/models/get_payload_keys_result.py +88 -0
- instana_client/models/get_services.py +147 -0
- instana_client/models/get_snapshots_query.py +95 -0
- instana_client/models/get_test_result.py +139 -0
- instana_client/models/get_test_result_base.py +120 -0
- instana_client/models/get_test_result_list.py +125 -0
- instana_client/models/get_test_summary_result.py +130 -0
- instana_client/models/get_trace_download_result_item.py +114 -0
- instana_client/models/get_trace_groups.py +141 -0
- instana_client/models/get_traces.py +125 -0
- instana_client/models/get_website_beacon_groups.py +146 -0
- instana_client/models/get_website_beacons.py +118 -0
- instana_client/models/get_website_metrics.py +122 -0
- instana_client/models/get_website_metrics_v2.py +118 -0
- instana_client/models/global_application_alert_config_with_metadata.py +205 -0
- instana_client/models/global_applications_alert_config.py +191 -0
- instana_client/models/google_chat_integration.py +92 -0
- instana_client/models/graph_edge.py +102 -0
- instana_client/models/graph_node.py +100 -0
- instana_client/models/group.py +100 -0
- instana_client/models/group_by_tag.py +90 -0
- instana_client/models/group_mapping.py +95 -0
- instana_client/models/health_state.py +100 -0
- instana_client/models/historic_baseline.py +105 -0
- instana_client/models/host_availability_rule.py +100 -0
- instana_client/models/http_action_configuration.py +127 -0
- instana_client/models/http_endpoint_config.py +103 -0
- instana_client/models/http_endpoint_rule.py +101 -0
- instana_client/models/http_path_segment_matching_rule.py +124 -0
- instana_client/models/http_script_configuration.py +113 -0
- instana_client/models/hyper_param.py +111 -0
- instana_client/models/identity_provider_patch.py +88 -0
- instana_client/models/infra_alert_config.py +166 -0
- instana_client/models/infra_alert_config_with_metadata.py +176 -0
- instana_client/models/infra_alert_rule.py +133 -0
- instana_client/models/infra_event_result.py +109 -0
- instana_client/models/infra_metric_configuration.py +115 -0
- instana_client/models/infra_time_threshold.py +109 -0
- instana_client/models/infrastructure_entities_result.py +109 -0
- instana_client/models/infrastructure_group.py +92 -0
- instana_client/models/infrastructure_groups_result.py +109 -0
- instana_client/models/infrastructure_item.py +104 -0
- instana_client/models/infrastructure_metric_result.py +96 -0
- instana_client/models/instana_version_info.py +92 -0
- instana_client/models/integration_overview.py +94 -0
- instana_client/models/invitation.py +94 -0
- instana_client/models/invitation_response.py +96 -0
- instana_client/models/invitation_result.py +100 -0
- instana_client/models/ip_masking_configuration.py +95 -0
- instana_client/models/js_stack_trace_line.py +99 -0
- instana_client/models/kubernetes_physical_context.py +107 -0
- instana_client/models/latency_blueprint_indicator.py +106 -0
- instana_client/models/location_status.py +96 -0
- instana_client/models/log_alert_config.py +154 -0
- instana_client/models/log_alert_config_with_metadata.py +164 -0
- instana_client/models/log_alert_rule.py +120 -0
- instana_client/models/log_count_alert_rule.py +90 -0
- instana_client/models/log_entry_actor.py +101 -0
- instana_client/models/log_event_result.py +107 -0
- instana_client/models/log_time_threshold.py +109 -0
- instana_client/models/logs_application_alert_rule.py +122 -0
- instana_client/models/maintenance_config.py +103 -0
- instana_client/models/maintenance_config_scheduling.py +118 -0
- instana_client/models/maintenance_config_v2.py +111 -0
- instana_client/models/maintenance_config_v2_with_state_and_occurrence.py +131 -0
- instana_client/models/maintenance_config_with_last_updated.py +105 -0
- instana_client/models/maintenance_window.py +93 -0
- instana_client/models/manual_alerting_channel_configuration.py +99 -0
- instana_client/models/manual_close_info.py +99 -0
- instana_client/models/manual_service_config.py +103 -0
- instana_client/models/match_all_http_path_segment_matching_rule.py +88 -0
- instana_client/models/match_expression_dto.py +111 -0
- instana_client/models/meta_data.py +96 -0
- instana_client/models/metric_api_result.py +94 -0
- instana_client/models/metric_config.py +99 -0
- instana_client/models/metric_configuration.py +103 -0
- instana_client/models/metric_description.py +116 -0
- instana_client/models/metric_instance.py +105 -0
- instana_client/models/metric_item.py +102 -0
- instana_client/models/metric_metadata.py +132 -0
- instana_client/models/metric_pattern.py +101 -0
- instana_client/models/metrics_result.py +96 -0
- instana_client/models/metrics_result_item.py +100 -0
- instana_client/models/metrics_test_result_item.py +102 -0
- instana_client/models/mobile_app.py +91 -0
- instana_client/models/mobile_app_alert_config.py +162 -0
- instana_client/models/mobile_app_alert_rule.py +129 -0
- instana_client/models/mobile_app_beacon_groups_item.py +95 -0
- instana_client/models/mobile_app_beacon_groups_result.py +111 -0
- instana_client/models/mobile_app_beacon_result.py +111 -0
- instana_client/models/mobile_app_beacon_tag_group.py +100 -0
- instana_client/models/mobile_app_beacons_item.py +94 -0
- instana_client/models/mobile_app_event_result.py +108 -0
- instana_client/models/mobile_app_metric_result.py +88 -0
- instana_client/models/mobile_app_monitoring_beacon.py +259 -0
- instana_client/models/mobile_app_monitoring_metric_description.py +123 -0
- instana_client/models/mobile_app_monitoring_metrics_configuration.py +105 -0
- instana_client/models/mobile_app_time_threshold.py +115 -0
- instana_client/models/model_field.py +96 -0
- instana_client/models/monitoring_state.py +92 -0
- instana_client/models/multiple_scripts_configuration.py +90 -0
- instana_client/models/new_application_config.py +129 -0
- instana_client/models/new_business_perspective_config.py +97 -0
- instana_client/models/new_manual_service_config.py +100 -0
- instana_client/models/occurrence.py +91 -0
- instana_client/models/office365_integration.py +92 -0
- instana_client/models/one_time_maintenance_window.py +94 -0
- instana_client/models/opsgenie_integration.py +105 -0
- instana_client/models/order.py +99 -0
- instana_client/models/pagerduty_integration.py +92 -0
- instana_client/models/paginated_result.py +95 -0
- instana_client/models/pagination.py +91 -0
- instana_client/models/parameter.py +102 -0
- instana_client/models/parameter_value.py +90 -0
- instana_client/models/path_parameter_http_path_segment_matching_rule.py +90 -0
- instana_client/models/physical_context.py +119 -0
- instana_client/models/plugin_result.py +90 -0
- instana_client/models/policy.py +113 -0
- instana_client/models/policy_runnable.py +103 -0
- instana_client/models/post_snapshots_result.py +98 -0
- instana_client/models/problem.py +95 -0
- instana_client/models/prometheus_webhook_integration.py +94 -0
- instana_client/models/recurrent_maintenance_window.py +98 -0
- instana_client/models/release.py +111 -0
- instana_client/models/release_scope.py +94 -0
- instana_client/models/release_with_metadata.py +125 -0
- instana_client/models/rolling_time_window.py +90 -0
- instana_client/models/rule_input.py +98 -0
- instana_client/models/rule_with_threshold_application_alert_rule.py +116 -0
- instana_client/models/rule_with_threshold_infra_alert_rule.py +116 -0
- instana_client/models/rule_with_threshold_log_alert_rule.py +116 -0
- instana_client/models/rule_with_threshold_mobile_app_alert_rule.py +116 -0
- instana_client/models/rule_with_threshold_website_alert_rule.py +116 -0
- instana_client/models/run_configuration.py +96 -0
- instana_client/models/salesforce_integration.py +98 -0
- instana_client/models/scope_binding.py +91 -0
- instana_client/models/search_field_result.py +116 -0
- instana_client/models/service.py +116 -0
- instana_client/models/service_config.py +107 -0
- instana_client/models/service_event_result.py +110 -0
- instana_client/models/service_item.py +94 -0
- instana_client/models/service_level_indicator.py +172 -0
- instana_client/models/service_level_objective_alert_rule.py +100 -0
- instana_client/models/service_level_objective_configuration.py +118 -0
- instana_client/models/service_levels_alert_config.py +133 -0
- instana_client/models/service_levels_alert_rule.py +111 -0
- instana_client/models/service_levels_burn_rate_time_windows.py +97 -0
- instana_client/models/service_levels_time_threshold.py +90 -0
- instana_client/models/service_levelse_alert_config_with_metadata.py +143 -0
- instana_client/models/service_map.py +106 -0
- instana_client/models/service_map_connection.py +97 -0
- instana_client/models/service_matching_rule.py +90 -0
- instana_client/models/service_metric_result.py +109 -0
- instana_client/models/service_node.py +106 -0
- instana_client/models/service_now_enhanced_integration.py +116 -0
- instana_client/models/service_now_integration.py +98 -0
- instana_client/models/service_result.py +102 -0
- instana_client/models/service_scope.py +95 -0
- instana_client/models/service_scope_with_metadata.py +96 -0
- instana_client/models/service_scoped_to.py +97 -0
- instana_client/models/service_scoped_to_with_metadata.py +97 -0
- instana_client/models/service_simple.py +90 -0
- instana_client/models/session_settings.py +91 -0
- instana_client/models/slack_integration.py +98 -0
- instana_client/models/sli_configuration.py +105 -0
- instana_client/models/sli_configuration_with_last_updated.py +107 -0
- instana_client/models/sli_entity.py +117 -0
- instana_client/models/sli_report.py +100 -0
- instana_client/models/slo_entity.py +119 -0
- instana_client/models/slo_report.py +112 -0
- instana_client/models/slowness_application_alert_rule.py +90 -0
- instana_client/models/slowness_website_alert_rule.py +90 -0
- instana_client/models/snapshot_item.py +102 -0
- instana_client/models/snapshot_preview.py +97 -0
- instana_client/models/snapshot_result.py +96 -0
- instana_client/models/software_user.py +94 -0
- instana_client/models/software_version.py +124 -0
- instana_client/models/source_map_file_blob.py +92 -0
- instana_client/models/source_map_file_meta.py +115 -0
- instana_client/models/source_map_upload_config.py +106 -0
- instana_client/models/span.py +156 -0
- instana_client/models/span_excerpt.py +132 -0
- instana_client/models/span_relation.py +114 -0
- instana_client/models/specific_js_errors_website_alert_rule.py +101 -0
- instana_client/models/splunk_integration.py +94 -0
- instana_client/models/ssl_certificate_configuration.py +99 -0
- instana_client/models/stack_trace_item.py +92 -0
- instana_client/models/stack_trace_line.py +99 -0
- instana_client/models/static_baseline_threshold_rule.py +102 -0
- instana_client/models/static_string_field.py +91 -0
- instana_client/models/static_threshold.py +94 -0
- instana_client/models/static_threshold_rule.py +91 -0
- instana_client/models/status_code_application_alert_rule.py +95 -0
- instana_client/models/status_code_mobile_app_alert_rule.py +101 -0
- instana_client/models/status_code_website_alert_rule.py +101 -0
- instana_client/models/synthetic_alert_config.py +127 -0
- instana_client/models/synthetic_alert_config_with_metadata.py +137 -0
- instana_client/models/synthetic_alert_rule.py +120 -0
- instana_client/models/synthetic_call_config.py +99 -0
- instana_client/models/synthetic_call_rule.py +99 -0
- instana_client/models/synthetic_call_with_defaults_config.py +108 -0
- instana_client/models/synthetic_credential.py +111 -0
- instana_client/models/synthetic_datacenter.py +117 -0
- instana_client/models/synthetic_datacenter_configuration.py +88 -0
- instana_client/models/synthetic_geo_point.py +94 -0
- instana_client/models/synthetic_location.py +129 -0
- instana_client/models/synthetic_location_configuration.py +102 -0
- instana_client/models/synthetic_metric_configuration.py +99 -0
- instana_client/models/synthetic_metric_tag_group.py +100 -0
- instana_client/models/synthetic_playback_capabilities.py +98 -0
- instana_client/models/synthetic_slo_entity.py +95 -0
- instana_client/models/synthetic_test.py +149 -0
- instana_client/models/synthetic_time_threshold.py +110 -0
- instana_client/models/synthetic_type_configuration.py +141 -0
- instana_client/models/synthetics_event_result.py +110 -0
- instana_client/models/system_rule.py +91 -0
- instana_client/models/system_rule_label.py +90 -0
- instana_client/models/tag.py +123 -0
- instana_client/models/tag_catalog.py +106 -0
- instana_client/models/tag_filter.py +113 -0
- instana_client/models/tag_filter_expression.py +106 -0
- instana_client/models/tag_filter_expression_element.py +111 -0
- instana_client/models/tag_matcher_dto.py +110 -0
- instana_client/models/tag_tree_level.py +109 -0
- instana_client/models/tag_tree_node.py +113 -0
- instana_client/models/tag_tree_tag.py +103 -0
- instana_client/models/test_common_properties.py +136 -0
- instana_client/models/test_result.py +105 -0
- instana_client/models/test_result_common_properties.py +108 -0
- instana_client/models/test_result_detail_data.py +112 -0
- instana_client/models/test_result_item.py +106 -0
- instana_client/models/test_result_list_item.py +94 -0
- instana_client/models/test_result_list_result.py +103 -0
- instana_client/models/test_result_metadata.py +94 -0
- instana_client/models/test_result_subtransaction.py +90 -0
- instana_client/models/threshold.py +122 -0
- instana_client/models/threshold_config_rule.py +114 -0
- instana_client/models/threshold_rule.py +125 -0
- instana_client/models/throughput_application_alert_rule.py +90 -0
- instana_client/models/throughput_mobile_app_alert_rule.py +90 -0
- instana_client/models/throughput_website_alert_rule.py +90 -0
- instana_client/models/time_frame.py +91 -0
- instana_client/models/time_window.py +120 -0
- instana_client/models/topology.py +106 -0
- instana_client/models/trace.py +109 -0
- instana_client/models/trace_activity_tree_node_details.py +139 -0
- instana_client/models/trace_download_result.py +111 -0
- instana_client/models/trace_groups_item.py +95 -0
- instana_client/models/trace_groups_result.py +111 -0
- instana_client/models/trace_impact_application_time_threshold.py +92 -0
- instana_client/models/trace_item.py +94 -0
- instana_client/models/trace_result.py +111 -0
- instana_client/models/traffic_blueprint_indicator.py +104 -0
- instana_client/models/trigger.py +99 -0
- instana_client/models/type_configuration.py +107 -0
- instana_client/models/unsupported_http_path_segment_matching_rule.py +90 -0
- instana_client/models/updated_business_perspective_config.py +97 -0
- instana_client/models/usage_result.py +98 -0
- instana_client/models/usage_result_items.py +90 -0
- instana_client/models/user_basic_result.py +92 -0
- instana_client/models/user_impact_mobile_app_time_threshold.py +103 -0
- instana_client/models/user_impact_website_time_threshold.py +103 -0
- instana_client/models/user_result.py +98 -0
- instana_client/models/users_result.py +106 -0
- instana_client/models/validated_alerting_channel_input_info.py +123 -0
- instana_client/models/validated_alerting_configuration.py +121 -0
- instana_client/models/validated_maintenance_config_v2_with_state_and_occurrence.py +135 -0
- instana_client/models/validated_maintenance_config_with_status.py +116 -0
- instana_client/models/victor_ops_integration.py +94 -0
- instana_client/models/violations_in_period_application_time_threshold.py +92 -0
- instana_client/models/violations_in_period_mobile_app_time_threshold.py +92 -0
- instana_client/models/violations_in_period_website_time_threshold.py +92 -0
- instana_client/models/violations_in_sequence_application_time_threshold.py +89 -0
- instana_client/models/violations_in_sequence_infra_time_threshold.py +89 -0
- instana_client/models/violations_in_sequence_log_time_threshold.py +89 -0
- instana_client/models/violations_in_sequence_mobile_app_time_threshold.py +89 -0
- instana_client/models/violations_in_sequence_synthetic_time_threshold.py +89 -0
- instana_client/models/violations_in_sequence_website_time_threshold.py +89 -0
- instana_client/models/watson_ai_ops_webhook_integration.py +94 -0
- instana_client/models/webex_teams_webhook_integration.py +92 -0
- instana_client/models/webhook_integration.py +94 -0
- instana_client/models/webpage_action_configuration.py +109 -0
- instana_client/models/webpage_script_configuration.py +109 -0
- instana_client/models/website.py +92 -0
- instana_client/models/website_alert_config.py +166 -0
- instana_client/models/website_alert_config_with_metadata.py +176 -0
- instana_client/models/website_alert_rule.py +132 -0
- instana_client/models/website_apdex_entity.py +107 -0
- instana_client/models/website_beacon_groups_item.py +95 -0
- instana_client/models/website_beacon_groups_result.py +111 -0
- instana_client/models/website_beacon_result.py +111 -0
- instana_client/models/website_beacon_tag_group.py +100 -0
- instana_client/models/website_beacons_item.py +94 -0
- instana_client/models/website_event_based_sli_entity.py +110 -0
- instana_client/models/website_event_result.py +108 -0
- instana_client/models/website_metric_result.py +88 -0
- instana_client/models/website_monitoring_beacon.py +301 -0
- instana_client/models/website_monitoring_metric_description.py +123 -0
- instana_client/models/website_monitoring_metrics_configuration.py +99 -0
- instana_client/models/website_slo_entity.py +104 -0
- instana_client/models/website_time_based_sli_entity.py +105 -0
- instana_client/models/website_time_threshold.py +115 -0
- instana_client/models/widget.py +103 -0
- instana_client/models/with_metadata.py +172 -0
- instana_client/models/with_resolved_name.py +102 -0
- instana_client/models/z_chat_ops_integration.py +97 -0
- instana_client/py.typed +0 -0
- instana_client/rest.py +258 -0
- instana_client-1.0.0.dist-info/METADATA +25 -0
- instana_client-1.0.0.dist-info/RECORD +515 -0
- instana_client-1.0.0.dist-info/WHEEL +5 -0
- instana_client-1.0.0.dist-info/licenses/LICENSE +202 -0
- instana_client-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Instana REST API documentation
|
|
5
|
+
|
|
6
|
+
Searching for answers and best pratices? Check our [IBM Instana Community](https://community.ibm.com/community/user/aiops/communities/community-home?CommunityKey=58f324a3-3104-41be-9510-5b7c413cc48f). ## Overview The Instana REST API provides programmatic access to the Instana platform. It can be used to retrieve data available through the Instana UI Dashboard -- metrics, events, traces, etc -- and also to automate configuration tasks such as user management. ### Navigating the API documentation The API endpoints are grouped by product area and functionality. This generally maps to how our UI Dashboard is organized, hopefully making it easier to locate which endpoints you'd use to fetch the data you see visualized in our UI. The [UI sections](https://www.ibm.com/docs/en/instana-observability/current?topic=working-user-interface#navigation-menu) include: - Websites & Mobile Apps - Applications - Infrastructure - Synthetic Monitoring - Events - Automation - Service Levels - Settings - etc ### Rate Limiting A rate limit is applied to API usage. Up to 5,000 calls per hour can be made. How many remaining calls can be made and when this call limit resets, can inspected via three headers that are part of the responses of the API server. - **X-RateLimit-Limit:** Shows the maximum number of calls that may be executed per hour. - **X-RateLimit-Remaining:** How many calls may still be executed within the current hour. - **X-RateLimit-Reset:** Time when the remaining calls will be reset to the limit. For compatibility reasons with other rate limited APIs, this date is not the date in milliseconds, but instead in seconds since 1970-01-01T00:00:00+00:00. ### Further Reading We provide additional documentation for our REST API in our [product documentation](https://www.ibm.com/docs/en/instana-observability/current?topic=apis-web-rest-api). Here you'll also find some common queries for retrieving data and configuring Instana. ## Getting Started with the REST API ### API base URL The base URL for an specific instance of Instana can be determined using the tenant and unit information. - `base`: This is the base URL of a tenant unit, e.g. `https://test-example.instana.io`. This is the same URL that is used to access the Instana user interface. - `apiToken`: Requests against the Instana API require valid API tokens. An initial API token can be generated via the Instana user interface. Any additional API tokens can be generated via the API itself. ### Curl Example Here is an Example to use the REST API with Curl. First lets get all the available metrics with possible aggregations with a GET call. ```bash curl --request GET \\ --url https://test-instana.instana.io/api/application-monitoring/catalog/metrics \\ --header 'authorization: apiToken xxxxxxxxxxxxxxxx' ``` Next we can get every call grouped by the endpoint name that has an error count greater then zero. As a metric we could get the mean error rate for example. ```bash curl --request POST \\ --url https://test-instana.instana.io/api/application-monitoring/analyze/call-groups \\ --header 'authorization: apiToken xxxxxxxxxxxxxxxx' \\ --header 'content-type: application/json' \\ --data '{ \"group\":{ \"groupbyTag\":\"endpoint.name\" }, \"tagFilters\":[ { \"name\":\"call.error.count\", \"value\":\"0\", \"operator\":\"GREATER_THAN\" } ], \"metrics\":[ { \"metric\":\"errors\", \"aggregation\":\"MEAN\" } ] }' ``` ### Generating REST API clients The API is specified using the [OpenAPI v3](https://github.com/OAI/OpenAPI-Specification) (previously known as Swagger) format. You can download the current specification at our [GitHub API documentation](https://instana.github.io/openapi/openapi.yaml). OpenAPI tries to solve the issue of ever-evolving APIs and clients lagging behind. Please make sure that you always use the latest version of the generator, as a number of improvements are regularly made. To generate a client library for your language, you can use the [OpenAPI client generators](https://github.com/OpenAPITools/openapi-generator). #### Go For example, to generate a client library for Go to interact with our backend, you can use the following script; mind replacing the values of the `UNIT_NAME` and `TENANT_NAME` environment variables using those for your tenant unit: ```bash #!/bin/bash ### This script assumes you have the `java` and `wget` commands on the path export UNIT_NAME='myunit' # for example: prod export TENANT_NAME='mytenant' # for example: awesomecompany //Download the generator to your current working directory: wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.3.1/openapi-generator-cli-4.3.1.jar -O openapi-generator-cli.jar --server-variables \"tenant=${TENANT_NAME},unit=${UNIT_NAME}\" //generate a client library that you can vendor into your repository java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g go \\ -o pkg/instana/openapi \\ --skip-validate-spec //(optional) format the Go code according to the Go code standard gofmt -s -w pkg/instana/openapi ``` The generated clients contain comprehensive READMEs, and you can start right away using the client from the example above: ```go import instana \"./pkg/instana/openapi\" // readTags will read all available application monitoring tags along with their type and category func readTags() { configuration := instana.NewConfiguration() configuration.Host = \"tenant-unit.instana.io\" configuration.BasePath = \"https://tenant-unit.instana.io\" client := instana.NewAPIClient(configuration) auth := context.WithValue(context.Background(), instana.ContextAPIKey, instana.APIKey{ Key: apiKey, Prefix: \"apiToken\", }) tags, _, err := client.ApplicationCatalogApi.GetApplicationTagCatalog(auth) if err != nil { fmt.Fatalf(\"Error calling the API, aborting.\") } for _, tag := range tags { fmt.Printf(\"%s (%s): %s\\n\", tag.Category, tag.Type, tag.Name) } } ``` #### Java Follow the instructions provided in the official documentation from [OpenAPI Tools](https://github.com/OpenAPITools) to download the [openapi-generator-cli.jar](https://github.com/OpenAPITools/openapi-generator?tab=readme-ov-file#13---download-jar). Depending on your environment, use one of the following java http client implementations which will create a valid client for our OpenAPI specification: ``` //Nativ Java HTTP Client java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8 --library native //Spring WebClient java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8,hideGenerationTimestamp=true --library webclient //Spring RestTemplate java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8,hideGenerationTimestamp=true --library resttemplate ```
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.291.1002
|
|
9
|
+
Contact: support@instana.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from instana_client.models.test_result_item import TestResultItem
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class TestResult(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
TestResult
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
test_result: Optional[List[TestResultItem]] = Field(default=None, alias="testResult")
|
|
32
|
+
test_result_items: Optional[List[TestResultItem]] = Field(default=None, alias="testResultItems")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["testResult", "testResultItems"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of TestResult from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of each item in test_result (list)
|
|
75
|
+
_items = []
|
|
76
|
+
if self.test_result:
|
|
77
|
+
for _item_test_result in self.test_result:
|
|
78
|
+
if _item_test_result:
|
|
79
|
+
_items.append(_item_test_result.to_dict())
|
|
80
|
+
_dict['testResult'] = _items
|
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of each item in test_result_items (list)
|
|
82
|
+
_items = []
|
|
83
|
+
if self.test_result_items:
|
|
84
|
+
for _item_test_result_items in self.test_result_items:
|
|
85
|
+
if _item_test_result_items:
|
|
86
|
+
_items.append(_item_test_result_items.to_dict())
|
|
87
|
+
_dict['testResultItems'] = _items
|
|
88
|
+
return _dict
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
92
|
+
"""Create an instance of TestResult from a dict"""
|
|
93
|
+
if obj is None:
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
if not isinstance(obj, dict):
|
|
97
|
+
return cls.model_validate(obj)
|
|
98
|
+
|
|
99
|
+
_obj = cls.model_validate({
|
|
100
|
+
"testResult": [TestResultItem.from_dict(_item) for _item in obj["testResult"]] if obj.get("testResult") is not None else None,
|
|
101
|
+
"testResultItems": [TestResultItem.from_dict(_item) for _item in obj["testResultItems"]] if obj.get("testResultItems") is not None else None
|
|
102
|
+
})
|
|
103
|
+
return _obj
|
|
104
|
+
|
|
105
|
+
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Instana REST API documentation
|
|
5
|
+
|
|
6
|
+
Searching for answers and best pratices? Check our [IBM Instana Community](https://community.ibm.com/community/user/aiops/communities/community-home?CommunityKey=58f324a3-3104-41be-9510-5b7c413cc48f). ## Overview The Instana REST API provides programmatic access to the Instana platform. It can be used to retrieve data available through the Instana UI Dashboard -- metrics, events, traces, etc -- and also to automate configuration tasks such as user management. ### Navigating the API documentation The API endpoints are grouped by product area and functionality. This generally maps to how our UI Dashboard is organized, hopefully making it easier to locate which endpoints you'd use to fetch the data you see visualized in our UI. The [UI sections](https://www.ibm.com/docs/en/instana-observability/current?topic=working-user-interface#navigation-menu) include: - Websites & Mobile Apps - Applications - Infrastructure - Synthetic Monitoring - Events - Automation - Service Levels - Settings - etc ### Rate Limiting A rate limit is applied to API usage. Up to 5,000 calls per hour can be made. How many remaining calls can be made and when this call limit resets, can inspected via three headers that are part of the responses of the API server. - **X-RateLimit-Limit:** Shows the maximum number of calls that may be executed per hour. - **X-RateLimit-Remaining:** How many calls may still be executed within the current hour. - **X-RateLimit-Reset:** Time when the remaining calls will be reset to the limit. For compatibility reasons with other rate limited APIs, this date is not the date in milliseconds, but instead in seconds since 1970-01-01T00:00:00+00:00. ### Further Reading We provide additional documentation for our REST API in our [product documentation](https://www.ibm.com/docs/en/instana-observability/current?topic=apis-web-rest-api). Here you'll also find some common queries for retrieving data and configuring Instana. ## Getting Started with the REST API ### API base URL The base URL for an specific instance of Instana can be determined using the tenant and unit information. - `base`: This is the base URL of a tenant unit, e.g. `https://test-example.instana.io`. This is the same URL that is used to access the Instana user interface. - `apiToken`: Requests against the Instana API require valid API tokens. An initial API token can be generated via the Instana user interface. Any additional API tokens can be generated via the API itself. ### Curl Example Here is an Example to use the REST API with Curl. First lets get all the available metrics with possible aggregations with a GET call. ```bash curl --request GET \\ --url https://test-instana.instana.io/api/application-monitoring/catalog/metrics \\ --header 'authorization: apiToken xxxxxxxxxxxxxxxx' ``` Next we can get every call grouped by the endpoint name that has an error count greater then zero. As a metric we could get the mean error rate for example. ```bash curl --request POST \\ --url https://test-instana.instana.io/api/application-monitoring/analyze/call-groups \\ --header 'authorization: apiToken xxxxxxxxxxxxxxxx' \\ --header 'content-type: application/json' \\ --data '{ \"group\":{ \"groupbyTag\":\"endpoint.name\" }, \"tagFilters\":[ { \"name\":\"call.error.count\", \"value\":\"0\", \"operator\":\"GREATER_THAN\" } ], \"metrics\":[ { \"metric\":\"errors\", \"aggregation\":\"MEAN\" } ] }' ``` ### Generating REST API clients The API is specified using the [OpenAPI v3](https://github.com/OAI/OpenAPI-Specification) (previously known as Swagger) format. You can download the current specification at our [GitHub API documentation](https://instana.github.io/openapi/openapi.yaml). OpenAPI tries to solve the issue of ever-evolving APIs and clients lagging behind. Please make sure that you always use the latest version of the generator, as a number of improvements are regularly made. To generate a client library for your language, you can use the [OpenAPI client generators](https://github.com/OpenAPITools/openapi-generator). #### Go For example, to generate a client library for Go to interact with our backend, you can use the following script; mind replacing the values of the `UNIT_NAME` and `TENANT_NAME` environment variables using those for your tenant unit: ```bash #!/bin/bash ### This script assumes you have the `java` and `wget` commands on the path export UNIT_NAME='myunit' # for example: prod export TENANT_NAME='mytenant' # for example: awesomecompany //Download the generator to your current working directory: wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.3.1/openapi-generator-cli-4.3.1.jar -O openapi-generator-cli.jar --server-variables \"tenant=${TENANT_NAME},unit=${UNIT_NAME}\" //generate a client library that you can vendor into your repository java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g go \\ -o pkg/instana/openapi \\ --skip-validate-spec //(optional) format the Go code according to the Go code standard gofmt -s -w pkg/instana/openapi ``` The generated clients contain comprehensive READMEs, and you can start right away using the client from the example above: ```go import instana \"./pkg/instana/openapi\" // readTags will read all available application monitoring tags along with their type and category func readTags() { configuration := instana.NewConfiguration() configuration.Host = \"tenant-unit.instana.io\" configuration.BasePath = \"https://tenant-unit.instana.io\" client := instana.NewAPIClient(configuration) auth := context.WithValue(context.Background(), instana.ContextAPIKey, instana.APIKey{ Key: apiKey, Prefix: \"apiToken\", }) tags, _, err := client.ApplicationCatalogApi.GetApplicationTagCatalog(auth) if err != nil { fmt.Fatalf(\"Error calling the API, aborting.\") } for _, tag := range tags { fmt.Printf(\"%s (%s): %s\\n\", tag.Category, tag.Type, tag.Name) } } ``` #### Java Follow the instructions provided in the official documentation from [OpenAPI Tools](https://github.com/OpenAPITools) to download the [openapi-generator-cli.jar](https://github.com/OpenAPITools/openapi-generator?tab=readme-ov-file#13---download-jar). Depending on your environment, use one of the following java http client implementations which will create a valid client for our OpenAPI specification: ``` //Nativ Java HTTP Client java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8 --library native //Spring WebClient java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8,hideGenerationTimestamp=true --library webclient //Spring RestTemplate java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8,hideGenerationTimestamp=true --library resttemplate ```
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.291.1002
|
|
9
|
+
Contact: support@instana.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from instana_client.models.test_common_properties import TestCommonProperties
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class TestResultCommonProperties(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
TestResultCommonProperties
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
client_id: StrictStr = Field(alias="clientId")
|
|
32
|
+
custom_tags: Optional[Dict[str, StrictStr]] = Field(default=None, alias="customTags")
|
|
33
|
+
errors: Optional[List[StrictStr]] = None
|
|
34
|
+
id: Optional[StrictStr] = None
|
|
35
|
+
location_display_label: Optional[StrictStr] = Field(default=None, alias="locationDisplayLabel")
|
|
36
|
+
location_id: Optional[StrictStr] = Field(default=None, alias="locationId")
|
|
37
|
+
test_common_properties: Optional[TestCommonProperties] = Field(default=None, alias="testCommonProperties")
|
|
38
|
+
test_id: StrictStr = Field(alias="testId")
|
|
39
|
+
test_name: Optional[StrictStr] = Field(default=None, alias="testName")
|
|
40
|
+
__properties: ClassVar[List[str]] = ["clientId", "customTags", "errors", "id", "locationDisplayLabel", "locationId", "testCommonProperties", "testId", "testName"]
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
populate_by_name=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
+
"""Create an instance of TestResultCommonProperties from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
65
|
+
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
68
|
+
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
72
|
+
"""
|
|
73
|
+
excluded_fields: Set[str] = set([
|
|
74
|
+
])
|
|
75
|
+
|
|
76
|
+
_dict = self.model_dump(
|
|
77
|
+
by_alias=True,
|
|
78
|
+
exclude=excluded_fields,
|
|
79
|
+
exclude_none=True,
|
|
80
|
+
)
|
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of test_common_properties
|
|
82
|
+
if self.test_common_properties:
|
|
83
|
+
_dict['testCommonProperties'] = self.test_common_properties.to_dict()
|
|
84
|
+
return _dict
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
+
"""Create an instance of TestResultCommonProperties from a dict"""
|
|
89
|
+
if obj is None:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
if not isinstance(obj, dict):
|
|
93
|
+
return cls.model_validate(obj)
|
|
94
|
+
|
|
95
|
+
_obj = cls.model_validate({
|
|
96
|
+
"clientId": obj.get("clientId"),
|
|
97
|
+
"customTags": obj.get("customTags"),
|
|
98
|
+
"errors": obj.get("errors"),
|
|
99
|
+
"id": obj.get("id"),
|
|
100
|
+
"locationDisplayLabel": obj.get("locationDisplayLabel"),
|
|
101
|
+
"locationId": obj.get("locationId"),
|
|
102
|
+
"testCommonProperties": TestCommonProperties.from_dict(obj["testCommonProperties"]) if obj.get("testCommonProperties") is not None else None,
|
|
103
|
+
"testId": obj.get("testId"),
|
|
104
|
+
"testName": obj.get("testName")
|
|
105
|
+
})
|
|
106
|
+
return _obj
|
|
107
|
+
|
|
108
|
+
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Instana REST API documentation
|
|
5
|
+
|
|
6
|
+
Searching for answers and best pratices? Check our [IBM Instana Community](https://community.ibm.com/community/user/aiops/communities/community-home?CommunityKey=58f324a3-3104-41be-9510-5b7c413cc48f). ## Overview The Instana REST API provides programmatic access to the Instana platform. It can be used to retrieve data available through the Instana UI Dashboard -- metrics, events, traces, etc -- and also to automate configuration tasks such as user management. ### Navigating the API documentation The API endpoints are grouped by product area and functionality. This generally maps to how our UI Dashboard is organized, hopefully making it easier to locate which endpoints you'd use to fetch the data you see visualized in our UI. The [UI sections](https://www.ibm.com/docs/en/instana-observability/current?topic=working-user-interface#navigation-menu) include: - Websites & Mobile Apps - Applications - Infrastructure - Synthetic Monitoring - Events - Automation - Service Levels - Settings - etc ### Rate Limiting A rate limit is applied to API usage. Up to 5,000 calls per hour can be made. How many remaining calls can be made and when this call limit resets, can inspected via three headers that are part of the responses of the API server. - **X-RateLimit-Limit:** Shows the maximum number of calls that may be executed per hour. - **X-RateLimit-Remaining:** How many calls may still be executed within the current hour. - **X-RateLimit-Reset:** Time when the remaining calls will be reset to the limit. For compatibility reasons with other rate limited APIs, this date is not the date in milliseconds, but instead in seconds since 1970-01-01T00:00:00+00:00. ### Further Reading We provide additional documentation for our REST API in our [product documentation](https://www.ibm.com/docs/en/instana-observability/current?topic=apis-web-rest-api). Here you'll also find some common queries for retrieving data and configuring Instana. ## Getting Started with the REST API ### API base URL The base URL for an specific instance of Instana can be determined using the tenant and unit information. - `base`: This is the base URL of a tenant unit, e.g. `https://test-example.instana.io`. This is the same URL that is used to access the Instana user interface. - `apiToken`: Requests against the Instana API require valid API tokens. An initial API token can be generated via the Instana user interface. Any additional API tokens can be generated via the API itself. ### Curl Example Here is an Example to use the REST API with Curl. First lets get all the available metrics with possible aggregations with a GET call. ```bash curl --request GET \\ --url https://test-instana.instana.io/api/application-monitoring/catalog/metrics \\ --header 'authorization: apiToken xxxxxxxxxxxxxxxx' ``` Next we can get every call grouped by the endpoint name that has an error count greater then zero. As a metric we could get the mean error rate for example. ```bash curl --request POST \\ --url https://test-instana.instana.io/api/application-monitoring/analyze/call-groups \\ --header 'authorization: apiToken xxxxxxxxxxxxxxxx' \\ --header 'content-type: application/json' \\ --data '{ \"group\":{ \"groupbyTag\":\"endpoint.name\" }, \"tagFilters\":[ { \"name\":\"call.error.count\", \"value\":\"0\", \"operator\":\"GREATER_THAN\" } ], \"metrics\":[ { \"metric\":\"errors\", \"aggregation\":\"MEAN\" } ] }' ``` ### Generating REST API clients The API is specified using the [OpenAPI v3](https://github.com/OAI/OpenAPI-Specification) (previously known as Swagger) format. You can download the current specification at our [GitHub API documentation](https://instana.github.io/openapi/openapi.yaml). OpenAPI tries to solve the issue of ever-evolving APIs and clients lagging behind. Please make sure that you always use the latest version of the generator, as a number of improvements are regularly made. To generate a client library for your language, you can use the [OpenAPI client generators](https://github.com/OpenAPITools/openapi-generator). #### Go For example, to generate a client library for Go to interact with our backend, you can use the following script; mind replacing the values of the `UNIT_NAME` and `TENANT_NAME` environment variables using those for your tenant unit: ```bash #!/bin/bash ### This script assumes you have the `java` and `wget` commands on the path export UNIT_NAME='myunit' # for example: prod export TENANT_NAME='mytenant' # for example: awesomecompany //Download the generator to your current working directory: wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.3.1/openapi-generator-cli-4.3.1.jar -O openapi-generator-cli.jar --server-variables \"tenant=${TENANT_NAME},unit=${UNIT_NAME}\" //generate a client library that you can vendor into your repository java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g go \\ -o pkg/instana/openapi \\ --skip-validate-spec //(optional) format the Go code according to the Go code standard gofmt -s -w pkg/instana/openapi ``` The generated clients contain comprehensive READMEs, and you can start right away using the client from the example above: ```go import instana \"./pkg/instana/openapi\" // readTags will read all available application monitoring tags along with their type and category func readTags() { configuration := instana.NewConfiguration() configuration.Host = \"tenant-unit.instana.io\" configuration.BasePath = \"https://tenant-unit.instana.io\" client := instana.NewAPIClient(configuration) auth := context.WithValue(context.Background(), instana.ContextAPIKey, instana.APIKey{ Key: apiKey, Prefix: \"apiToken\", }) tags, _, err := client.ApplicationCatalogApi.GetApplicationTagCatalog(auth) if err != nil { fmt.Fatalf(\"Error calling the API, aborting.\") } for _, tag := range tags { fmt.Printf(\"%s (%s): %s\\n\", tag.Category, tag.Type, tag.Name) } } ``` #### Java Follow the instructions provided in the official documentation from [OpenAPI Tools](https://github.com/OpenAPITools) to download the [openapi-generator-cli.jar](https://github.com/OpenAPITools/openapi-generator?tab=readme-ov-file#13---download-jar). Depending on your environment, use one of the following java http client implementations which will create a valid client for our OpenAPI specification: ``` //Nativ Java HTTP Client java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8 --library native //Spring WebClient java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8,hideGenerationTimestamp=true --library webclient //Spring RestTemplate java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8,hideGenerationTimestamp=true --library resttemplate ```
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.291.1002
|
|
9
|
+
Contact: support@instana.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
23
|
+
from instana_client.models.test_result_subtransaction import TestResultSubtransaction
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class TestResultDetailData(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
TestResultDetailData
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
har: Optional[Dict[str, Dict[str, Any]]] = None
|
|
32
|
+
image_files: Optional[Dict[str, List[Union[StrictBytes, StrictStr]]]] = Field(default=None, alias="imageFiles")
|
|
33
|
+
log_files: Optional[Dict[str, StrictStr]] = Field(default=None, alias="logFiles")
|
|
34
|
+
logs: Optional[StrictStr] = None
|
|
35
|
+
subtransaction_avg_metrics: Optional[Dict[str, Dict[str, Any]]] = Field(default=None, alias="subtransactionAvgMetrics")
|
|
36
|
+
subtransactions: Optional[List[TestResultSubtransaction]] = None
|
|
37
|
+
test_id: Optional[StrictStr] = Field(default=None, alias="testId")
|
|
38
|
+
test_result_id: Optional[StrictStr] = Field(default=None, alias="testResultId")
|
|
39
|
+
videos: Optional[List[Union[StrictBytes, StrictStr]]] = None
|
|
40
|
+
__properties: ClassVar[List[str]] = ["har", "imageFiles", "logFiles", "logs", "subtransactionAvgMetrics", "subtransactions", "testId", "testResultId", "videos"]
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
populate_by_name=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
+
"""Create an instance of TestResultDetailData from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
65
|
+
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
68
|
+
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
72
|
+
"""
|
|
73
|
+
excluded_fields: Set[str] = set([
|
|
74
|
+
])
|
|
75
|
+
|
|
76
|
+
_dict = self.model_dump(
|
|
77
|
+
by_alias=True,
|
|
78
|
+
exclude=excluded_fields,
|
|
79
|
+
exclude_none=True,
|
|
80
|
+
)
|
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of each item in subtransactions (list)
|
|
82
|
+
_items = []
|
|
83
|
+
if self.subtransactions:
|
|
84
|
+
for _item_subtransactions in self.subtransactions:
|
|
85
|
+
if _item_subtransactions:
|
|
86
|
+
_items.append(_item_subtransactions.to_dict())
|
|
87
|
+
_dict['subtransactions'] = _items
|
|
88
|
+
return _dict
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
92
|
+
"""Create an instance of TestResultDetailData from a dict"""
|
|
93
|
+
if obj is None:
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
if not isinstance(obj, dict):
|
|
97
|
+
return cls.model_validate(obj)
|
|
98
|
+
|
|
99
|
+
_obj = cls.model_validate({
|
|
100
|
+
"har": obj.get("har"),
|
|
101
|
+
"imageFiles": obj.get("imageFiles"),
|
|
102
|
+
"logFiles": obj.get("logFiles"),
|
|
103
|
+
"logs": obj.get("logs"),
|
|
104
|
+
"subtransactionAvgMetrics": obj.get("subtransactionAvgMetrics"),
|
|
105
|
+
"subtransactions": [TestResultSubtransaction.from_dict(_item) for _item in obj["subtransactions"]] if obj.get("subtransactions") is not None else None,
|
|
106
|
+
"testId": obj.get("testId"),
|
|
107
|
+
"testResultId": obj.get("testResultId"),
|
|
108
|
+
"videos": obj.get("videos")
|
|
109
|
+
})
|
|
110
|
+
return _obj
|
|
111
|
+
|
|
112
|
+
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Instana REST API documentation
|
|
5
|
+
|
|
6
|
+
Searching for answers and best pratices? Check our [IBM Instana Community](https://community.ibm.com/community/user/aiops/communities/community-home?CommunityKey=58f324a3-3104-41be-9510-5b7c413cc48f). ## Overview The Instana REST API provides programmatic access to the Instana platform. It can be used to retrieve data available through the Instana UI Dashboard -- metrics, events, traces, etc -- and also to automate configuration tasks such as user management. ### Navigating the API documentation The API endpoints are grouped by product area and functionality. This generally maps to how our UI Dashboard is organized, hopefully making it easier to locate which endpoints you'd use to fetch the data you see visualized in our UI. The [UI sections](https://www.ibm.com/docs/en/instana-observability/current?topic=working-user-interface#navigation-menu) include: - Websites & Mobile Apps - Applications - Infrastructure - Synthetic Monitoring - Events - Automation - Service Levels - Settings - etc ### Rate Limiting A rate limit is applied to API usage. Up to 5,000 calls per hour can be made. How many remaining calls can be made and when this call limit resets, can inspected via three headers that are part of the responses of the API server. - **X-RateLimit-Limit:** Shows the maximum number of calls that may be executed per hour. - **X-RateLimit-Remaining:** How many calls may still be executed within the current hour. - **X-RateLimit-Reset:** Time when the remaining calls will be reset to the limit. For compatibility reasons with other rate limited APIs, this date is not the date in milliseconds, but instead in seconds since 1970-01-01T00:00:00+00:00. ### Further Reading We provide additional documentation for our REST API in our [product documentation](https://www.ibm.com/docs/en/instana-observability/current?topic=apis-web-rest-api). Here you'll also find some common queries for retrieving data and configuring Instana. ## Getting Started with the REST API ### API base URL The base URL for an specific instance of Instana can be determined using the tenant and unit information. - `base`: This is the base URL of a tenant unit, e.g. `https://test-example.instana.io`. This is the same URL that is used to access the Instana user interface. - `apiToken`: Requests against the Instana API require valid API tokens. An initial API token can be generated via the Instana user interface. Any additional API tokens can be generated via the API itself. ### Curl Example Here is an Example to use the REST API with Curl. First lets get all the available metrics with possible aggregations with a GET call. ```bash curl --request GET \\ --url https://test-instana.instana.io/api/application-monitoring/catalog/metrics \\ --header 'authorization: apiToken xxxxxxxxxxxxxxxx' ``` Next we can get every call grouped by the endpoint name that has an error count greater then zero. As a metric we could get the mean error rate for example. ```bash curl --request POST \\ --url https://test-instana.instana.io/api/application-monitoring/analyze/call-groups \\ --header 'authorization: apiToken xxxxxxxxxxxxxxxx' \\ --header 'content-type: application/json' \\ --data '{ \"group\":{ \"groupbyTag\":\"endpoint.name\" }, \"tagFilters\":[ { \"name\":\"call.error.count\", \"value\":\"0\", \"operator\":\"GREATER_THAN\" } ], \"metrics\":[ { \"metric\":\"errors\", \"aggregation\":\"MEAN\" } ] }' ``` ### Generating REST API clients The API is specified using the [OpenAPI v3](https://github.com/OAI/OpenAPI-Specification) (previously known as Swagger) format. You can download the current specification at our [GitHub API documentation](https://instana.github.io/openapi/openapi.yaml). OpenAPI tries to solve the issue of ever-evolving APIs and clients lagging behind. Please make sure that you always use the latest version of the generator, as a number of improvements are regularly made. To generate a client library for your language, you can use the [OpenAPI client generators](https://github.com/OpenAPITools/openapi-generator). #### Go For example, to generate a client library for Go to interact with our backend, you can use the following script; mind replacing the values of the `UNIT_NAME` and `TENANT_NAME` environment variables using those for your tenant unit: ```bash #!/bin/bash ### This script assumes you have the `java` and `wget` commands on the path export UNIT_NAME='myunit' # for example: prod export TENANT_NAME='mytenant' # for example: awesomecompany //Download the generator to your current working directory: wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.3.1/openapi-generator-cli-4.3.1.jar -O openapi-generator-cli.jar --server-variables \"tenant=${TENANT_NAME},unit=${UNIT_NAME}\" //generate a client library that you can vendor into your repository java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g go \\ -o pkg/instana/openapi \\ --skip-validate-spec //(optional) format the Go code according to the Go code standard gofmt -s -w pkg/instana/openapi ``` The generated clients contain comprehensive READMEs, and you can start right away using the client from the example above: ```go import instana \"./pkg/instana/openapi\" // readTags will read all available application monitoring tags along with their type and category func readTags() { configuration := instana.NewConfiguration() configuration.Host = \"tenant-unit.instana.io\" configuration.BasePath = \"https://tenant-unit.instana.io\" client := instana.NewAPIClient(configuration) auth := context.WithValue(context.Background(), instana.ContextAPIKey, instana.APIKey{ Key: apiKey, Prefix: \"apiToken\", }) tags, _, err := client.ApplicationCatalogApi.GetApplicationTagCatalog(auth) if err != nil { fmt.Fatalf(\"Error calling the API, aborting.\") } for _, tag := range tags { fmt.Printf(\"%s (%s): %s\\n\", tag.Category, tag.Type, tag.Name) } } ``` #### Java Follow the instructions provided in the official documentation from [OpenAPI Tools](https://github.com/OpenAPITools) to download the [openapi-generator-cli.jar](https://github.com/OpenAPITools/openapi-generator?tab=readme-ov-file#13---download-jar). Depending on your environment, use one of the following java http client implementations which will create a valid client for our OpenAPI specification: ``` //Nativ Java HTTP Client java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8 --library native //Spring WebClient java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8,hideGenerationTimestamp=true --library webclient //Spring RestTemplate java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8,hideGenerationTimestamp=true --library resttemplate ```
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.291.1002
|
|
9
|
+
Contact: support@instana.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class TestResultItem(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
TestResultItem
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
application_id: Optional[StrictStr] = Field(default=None, alias="applicationId")
|
|
31
|
+
application_ids: Optional[List[StrictStr]] = Field(default=None, alias="applicationIds")
|
|
32
|
+
custom_tags: Optional[Dict[str, StrictStr]] = Field(default=None, alias="customTags")
|
|
33
|
+
location_id: Optional[List[StrictStr]] = Field(default=None, alias="locationId")
|
|
34
|
+
metrics: Optional[List[Dict[str, Dict[str, Any]]]] = None
|
|
35
|
+
mobile_application_ids: Optional[List[StrictStr]] = Field(default=None, alias="mobileApplicationIds")
|
|
36
|
+
service_id: Optional[StrictStr] = Field(default=None, alias="serviceId")
|
|
37
|
+
test_id: StrictStr = Field(alias="testId")
|
|
38
|
+
test_name: Optional[StrictStr] = Field(default=None, alias="testName")
|
|
39
|
+
website_ids: Optional[List[StrictStr]] = Field(default=None, alias="websiteIds")
|
|
40
|
+
__properties: ClassVar[List[str]] = ["applicationId", "applicationIds", "customTags", "locationId", "metrics", "mobileApplicationIds", "serviceId", "testId", "testName", "websiteIds"]
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
populate_by_name=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
+
"""Create an instance of TestResultItem from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
65
|
+
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
68
|
+
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
72
|
+
"""
|
|
73
|
+
excluded_fields: Set[str] = set([
|
|
74
|
+
])
|
|
75
|
+
|
|
76
|
+
_dict = self.model_dump(
|
|
77
|
+
by_alias=True,
|
|
78
|
+
exclude=excluded_fields,
|
|
79
|
+
exclude_none=True,
|
|
80
|
+
)
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of TestResultItem from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"applicationId": obj.get("applicationId"),
|
|
94
|
+
"applicationIds": obj.get("applicationIds"),
|
|
95
|
+
"customTags": obj.get("customTags"),
|
|
96
|
+
"locationId": obj.get("locationId"),
|
|
97
|
+
"metrics": obj.get("metrics"),
|
|
98
|
+
"mobileApplicationIds": obj.get("mobileApplicationIds"),
|
|
99
|
+
"serviceId": obj.get("serviceId"),
|
|
100
|
+
"testId": obj.get("testId"),
|
|
101
|
+
"testName": obj.get("testName"),
|
|
102
|
+
"websiteIds": obj.get("websiteIds")
|
|
103
|
+
})
|
|
104
|
+
return _obj
|
|
105
|
+
|
|
106
|
+
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Instana REST API documentation
|
|
5
|
+
|
|
6
|
+
Searching for answers and best pratices? Check our [IBM Instana Community](https://community.ibm.com/community/user/aiops/communities/community-home?CommunityKey=58f324a3-3104-41be-9510-5b7c413cc48f). ## Overview The Instana REST API provides programmatic access to the Instana platform. It can be used to retrieve data available through the Instana UI Dashboard -- metrics, events, traces, etc -- and also to automate configuration tasks such as user management. ### Navigating the API documentation The API endpoints are grouped by product area and functionality. This generally maps to how our UI Dashboard is organized, hopefully making it easier to locate which endpoints you'd use to fetch the data you see visualized in our UI. The [UI sections](https://www.ibm.com/docs/en/instana-observability/current?topic=working-user-interface#navigation-menu) include: - Websites & Mobile Apps - Applications - Infrastructure - Synthetic Monitoring - Events - Automation - Service Levels - Settings - etc ### Rate Limiting A rate limit is applied to API usage. Up to 5,000 calls per hour can be made. How many remaining calls can be made and when this call limit resets, can inspected via three headers that are part of the responses of the API server. - **X-RateLimit-Limit:** Shows the maximum number of calls that may be executed per hour. - **X-RateLimit-Remaining:** How many calls may still be executed within the current hour. - **X-RateLimit-Reset:** Time when the remaining calls will be reset to the limit. For compatibility reasons with other rate limited APIs, this date is not the date in milliseconds, but instead in seconds since 1970-01-01T00:00:00+00:00. ### Further Reading We provide additional documentation for our REST API in our [product documentation](https://www.ibm.com/docs/en/instana-observability/current?topic=apis-web-rest-api). Here you'll also find some common queries for retrieving data and configuring Instana. ## Getting Started with the REST API ### API base URL The base URL for an specific instance of Instana can be determined using the tenant and unit information. - `base`: This is the base URL of a tenant unit, e.g. `https://test-example.instana.io`. This is the same URL that is used to access the Instana user interface. - `apiToken`: Requests against the Instana API require valid API tokens. An initial API token can be generated via the Instana user interface. Any additional API tokens can be generated via the API itself. ### Curl Example Here is an Example to use the REST API with Curl. First lets get all the available metrics with possible aggregations with a GET call. ```bash curl --request GET \\ --url https://test-instana.instana.io/api/application-monitoring/catalog/metrics \\ --header 'authorization: apiToken xxxxxxxxxxxxxxxx' ``` Next we can get every call grouped by the endpoint name that has an error count greater then zero. As a metric we could get the mean error rate for example. ```bash curl --request POST \\ --url https://test-instana.instana.io/api/application-monitoring/analyze/call-groups \\ --header 'authorization: apiToken xxxxxxxxxxxxxxxx' \\ --header 'content-type: application/json' \\ --data '{ \"group\":{ \"groupbyTag\":\"endpoint.name\" }, \"tagFilters\":[ { \"name\":\"call.error.count\", \"value\":\"0\", \"operator\":\"GREATER_THAN\" } ], \"metrics\":[ { \"metric\":\"errors\", \"aggregation\":\"MEAN\" } ] }' ``` ### Generating REST API clients The API is specified using the [OpenAPI v3](https://github.com/OAI/OpenAPI-Specification) (previously known as Swagger) format. You can download the current specification at our [GitHub API documentation](https://instana.github.io/openapi/openapi.yaml). OpenAPI tries to solve the issue of ever-evolving APIs and clients lagging behind. Please make sure that you always use the latest version of the generator, as a number of improvements are regularly made. To generate a client library for your language, you can use the [OpenAPI client generators](https://github.com/OpenAPITools/openapi-generator). #### Go For example, to generate a client library for Go to interact with our backend, you can use the following script; mind replacing the values of the `UNIT_NAME` and `TENANT_NAME` environment variables using those for your tenant unit: ```bash #!/bin/bash ### This script assumes you have the `java` and `wget` commands on the path export UNIT_NAME='myunit' # for example: prod export TENANT_NAME='mytenant' # for example: awesomecompany //Download the generator to your current working directory: wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.3.1/openapi-generator-cli-4.3.1.jar -O openapi-generator-cli.jar --server-variables \"tenant=${TENANT_NAME},unit=${UNIT_NAME}\" //generate a client library that you can vendor into your repository java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g go \\ -o pkg/instana/openapi \\ --skip-validate-spec //(optional) format the Go code according to the Go code standard gofmt -s -w pkg/instana/openapi ``` The generated clients contain comprehensive READMEs, and you can start right away using the client from the example above: ```go import instana \"./pkg/instana/openapi\" // readTags will read all available application monitoring tags along with their type and category func readTags() { configuration := instana.NewConfiguration() configuration.Host = \"tenant-unit.instana.io\" configuration.BasePath = \"https://tenant-unit.instana.io\" client := instana.NewAPIClient(configuration) auth := context.WithValue(context.Background(), instana.ContextAPIKey, instana.APIKey{ Key: apiKey, Prefix: \"apiToken\", }) tags, _, err := client.ApplicationCatalogApi.GetApplicationTagCatalog(auth) if err != nil { fmt.Fatalf(\"Error calling the API, aborting.\") } for _, tag := range tags { fmt.Printf(\"%s (%s): %s\\n\", tag.Category, tag.Type, tag.Name) } } ``` #### Java Follow the instructions provided in the official documentation from [OpenAPI Tools](https://github.com/OpenAPITools) to download the [openapi-generator-cli.jar](https://github.com/OpenAPITools/openapi-generator?tab=readme-ov-file#13---download-jar). Depending on your environment, use one of the following java http client implementations which will create a valid client for our OpenAPI specification: ``` //Nativ Java HTTP Client java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8 --library native //Spring WebClient java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8,hideGenerationTimestamp=true --library webclient //Spring RestTemplate java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8,hideGenerationTimestamp=true --library resttemplate ```
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.291.1002
|
|
9
|
+
Contact: support@instana.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Union
|
|
23
|
+
from instana_client.models.test_result_common_properties import TestResultCommonProperties
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class TestResultListItem(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
TestResultListItem
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
metrics: Dict[str, List[List[Union[StrictFloat, StrictInt]]]]
|
|
32
|
+
test_result_common_properties: TestResultCommonProperties = Field(alias="testResultCommonProperties")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["metrics", "testResultCommonProperties"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of TestResultListItem from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of test_result_common_properties
|
|
75
|
+
if self.test_result_common_properties:
|
|
76
|
+
_dict['testResultCommonProperties'] = self.test_result_common_properties.to_dict()
|
|
77
|
+
return _dict
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
81
|
+
"""Create an instance of TestResultListItem from a dict"""
|
|
82
|
+
if obj is None:
|
|
83
|
+
return None
|
|
84
|
+
|
|
85
|
+
if not isinstance(obj, dict):
|
|
86
|
+
return cls.model_validate(obj)
|
|
87
|
+
|
|
88
|
+
_obj = cls.model_validate({
|
|
89
|
+
"metrics": obj.get("metrics"),
|
|
90
|
+
"testResultCommonProperties": TestResultCommonProperties.from_dict(obj["testResultCommonProperties"]) if obj.get("testResultCommonProperties") is not None else None
|
|
91
|
+
})
|
|
92
|
+
return _obj
|
|
93
|
+
|
|
94
|
+
|