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.
Files changed (515) hide show
  1. instana_client/__init__.py +534 -0
  2. instana_client/api/__init__.py +58 -0
  3. instana_client/api/action_catalog_api.py +1380 -0
  4. instana_client/api/action_history_api.py +1793 -0
  5. instana_client/api/apdex_report_api.py +338 -0
  6. instana_client/api/apdex_settings_api.py +1353 -0
  7. instana_client/api/api_token_api.py +1370 -0
  8. instana_client/api/application_alert_configuration_api.py +2865 -0
  9. instana_client/api/application_analyze_api.py +2017 -0
  10. instana_client/api/application_catalog_api.py +885 -0
  11. instana_client/api/application_metrics_api.py +1211 -0
  12. instana_client/api/application_resources_api.py +1487 -0
  13. instana_client/api/application_settings_api.py +7261 -0
  14. instana_client/api/application_topology_api.py +354 -0
  15. instana_client/api/audit_log_api.py +635 -0
  16. instana_client/api/authentication_api.py +1008 -0
  17. instana_client/api/business_monitoring_api.py +2177 -0
  18. instana_client/api/custom_dashboards_api.py +1930 -0
  19. instana_client/api/event_settings_api.py +14613 -0
  20. instana_client/api/events_api.py +1654 -0
  21. instana_client/api/global_application_alert_configuration_api.py +2606 -0
  22. instana_client/api/groups_api.py +4078 -0
  23. instana_client/api/health_api.py +527 -0
  24. instana_client/api/host_agent_api.py +2120 -0
  25. instana_client/api/infrastructure_alert_configuration_api.py +2524 -0
  26. instana_client/api/infrastructure_analyze_api.py +1141 -0
  27. instana_client/api/infrastructure_catalog_api.py +1822 -0
  28. instana_client/api/infrastructure_metrics_api.py +331 -0
  29. instana_client/api/infrastructure_resources_api.py +1880 -0
  30. instana_client/api/infrastructure_topology_api.py +595 -0
  31. instana_client/api/log_alert_configuration_api.py +2524 -0
  32. instana_client/api/maintenance_configuration_api.py +2683 -0
  33. instana_client/api/mobile_app_analyze_api.py +613 -0
  34. instana_client/api/mobile_app_catalog_api.py +825 -0
  35. instana_client/api/mobile_app_configuration_api.py +2847 -0
  36. instana_client/api/mobile_app_metrics_api.py +892 -0
  37. instana_client/api/policies_api.py +1755 -0
  38. instana_client/api/releases_api.py +1408 -0
  39. instana_client/api/service_levels_alert_configuration_api.py +2577 -0
  40. instana_client/api/service_levels_objective_slo_configurations_api.py +1825 -0
  41. instana_client/api/service_levels_objective_slo_report_api.py +335 -0
  42. instana_client/api/session_settings_api.py +801 -0
  43. instana_client/api/sli_report_api.py +352 -0
  44. instana_client/api/sli_settings_api.py +2677 -0
  45. instana_client/api/synthetic_alert_configuration_api.py +2606 -0
  46. instana_client/api/synthetic_calls_api.py +789 -0
  47. instana_client/api/synthetic_catalog_api.py +543 -0
  48. instana_client/api/synthetic_metrics_api.py +322 -0
  49. instana_client/api/synthetic_settings_api.py +5144 -0
  50. instana_client/api/synthetic_test_playback_results_api.py +2142 -0
  51. instana_client/api/usage_api.py +1404 -0
  52. instana_client/api/user_api.py +2404 -0
  53. instana_client/api/website_analyze_api.py +619 -0
  54. instana_client/api/website_catalog_api.py +832 -0
  55. instana_client/api/website_configuration_api.py +3745 -0
  56. instana_client/api/website_metrics_api.py +889 -0
  57. instana_client/api_client.py +798 -0
  58. instana_client/api_response.py +21 -0
  59. instana_client/configuration.py +616 -0
  60. instana_client/exceptions.py +217 -0
  61. instana_client/models/__init__.py +464 -0
  62. instana_client/models/abstract_integration.py +155 -0
  63. instana_client/models/abstract_rule.py +124 -0
  64. instana_client/models/access_log_entry.py +105 -0
  65. instana_client/models/access_log_response.py +98 -0
  66. instana_client/models/access_rule.py +107 -0
  67. instana_client/models/action.py +135 -0
  68. instana_client/models/action_configuration.py +104 -0
  69. instana_client/models/action_instance.py +185 -0
  70. instana_client/models/action_instance_metadata_entry.py +90 -0
  71. instana_client/models/action_instance_parameter.py +94 -0
  72. instana_client/models/action_instance_request.py +108 -0
  73. instana_client/models/action_instance_request_parameters.py +92 -0
  74. instana_client/models/action_match.py +98 -0
  75. instana_client/models/action_search_space.py +94 -0
  76. instana_client/models/adaptive_baseline.py +92 -0
  77. instana_client/models/adaptive_threshold_rule.py +91 -0
  78. instana_client/models/adjusted_timeframe.py +91 -0
  79. instana_client/models/agent_configuration_update.py +93 -0
  80. instana_client/models/alerting_configuration.py +113 -0
  81. instana_client/models/alerting_configuration_with_last_updated.py +115 -0
  82. instana_client/models/alerting_time_window.py +109 -0
  83. instana_client/models/apdex_configuration.py +99 -0
  84. instana_client/models/apdex_configuration_input.py +95 -0
  85. instana_client/models/apdex_entity.py +119 -0
  86. instana_client/models/apdex_report.py +94 -0
  87. instana_client/models/api_create_group.py +104 -0
  88. instana_client/models/api_group.py +107 -0
  89. instana_client/models/api_member.py +90 -0
  90. instana_client/models/api_permission_set.py +178 -0
  91. instana_client/models/api_restricted_application_filter.py +108 -0
  92. instana_client/models/api_token.py +250 -0
  93. instana_client/models/app_data_metric_configuration.py +105 -0
  94. instana_client/models/application.py +104 -0
  95. instana_client/models/application_alert_config.py +203 -0
  96. instana_client/models/application_alert_config_with_metadata.py +213 -0
  97. instana_client/models/application_alert_rule.py +135 -0
  98. instana_client/models/application_apdex_entity.py +111 -0
  99. instana_client/models/application_config.py +131 -0
  100. instana_client/models/application_event_result.py +108 -0
  101. instana_client/models/application_item.py +94 -0
  102. instana_client/models/application_metric_result.py +109 -0
  103. instana_client/models/application_node.py +106 -0
  104. instana_client/models/application_result.py +102 -0
  105. instana_client/models/application_scope.py +89 -0
  106. instana_client/models/application_scope_with_metadata.py +90 -0
  107. instana_client/models/application_sli_entity.py +103 -0
  108. instana_client/models/application_slo_entity.py +112 -0
  109. instana_client/models/application_time_threshold.py +115 -0
  110. instana_client/models/audit_log_entry.py +102 -0
  111. instana_client/models/audit_log_ui_response.py +98 -0
  112. instana_client/models/author.py +100 -0
  113. instana_client/models/availability_blueprint_indicator.py +106 -0
  114. instana_client/models/availability_sli_entity.py +138 -0
  115. instana_client/models/available_metrics.py +96 -0
  116. instana_client/models/available_plugins.py +88 -0
  117. instana_client/models/backend_trace_reference.py +88 -0
  118. instana_client/models/binary_operator_dto.py +107 -0
  119. instana_client/models/browser_script_configuration.py +127 -0
  120. instana_client/models/built_in_event_specification.py +123 -0
  121. instana_client/models/built_in_event_specification_with_last_updated.py +125 -0
  122. instana_client/models/business_activity.py +132 -0
  123. instana_client/models/business_perspective_config.py +99 -0
  124. instana_client/models/call_groups_item.py +95 -0
  125. instana_client/models/call_groups_result.py +111 -0
  126. instana_client/models/call_relation.py +100 -0
  127. instana_client/models/change_summary.py +101 -0
  128. instana_client/models/cloudfoundry_physical_context.py +104 -0
  129. instana_client/models/condition.py +88 -0
  130. instana_client/models/config_version.py +101 -0
  131. instana_client/models/crash_mobile_app_alert_rule.py +90 -0
  132. instana_client/models/cursor_paginated_business_activity_item.py +96 -0
  133. instana_client/models/cursor_pagination.py +93 -0
  134. instana_client/models/cursor_pagination_infra_explore_cursor.py +90 -0
  135. instana_client/models/custom_blueprint_indicator.py +104 -0
  136. instana_client/models/custom_dashboard.py +111 -0
  137. instana_client/models/custom_dashboard_preview.py +103 -0
  138. instana_client/models/custom_email_subject_prefix.py +94 -0
  139. instana_client/models/custom_event_mobile_app_alert_rule.py +92 -0
  140. instana_client/models/custom_event_specification.py +133 -0
  141. instana_client/models/custom_event_specification_with_last_updated.py +143 -0
  142. instana_client/models/custom_event_website_alert_rule.py +92 -0
  143. instana_client/models/custom_payload_configuration.py +97 -0
  144. instana_client/models/custom_payload_field.py +112 -0
  145. instana_client/models/custom_payload_with_last_updated.py +99 -0
  146. instana_client/models/dashboard_api_token.py +90 -0
  147. instana_client/models/database_integration.py +90 -0
  148. instana_client/models/deprecated_tag_filter.py +111 -0
  149. instana_client/models/dns_action_configuration.py +134 -0
  150. instana_client/models/dns_action_filter_query_time.py +99 -0
  151. instana_client/models/dns_action_filter_target_value.py +106 -0
  152. instana_client/models/duration.py +98 -0
  153. instana_client/models/dynamic_field.py +95 -0
  154. instana_client/models/dynamic_field_value.py +90 -0
  155. instana_client/models/dynamic_parameter.py +94 -0
  156. instana_client/models/edit_user.py +88 -0
  157. instana_client/models/email_integration.py +98 -0
  158. instana_client/models/empty_configuration.py +92 -0
  159. instana_client/models/endpoint.py +131 -0
  160. instana_client/models/endpoint_config.py +112 -0
  161. instana_client/models/endpoint_event_result.py +112 -0
  162. instana_client/models/endpoint_item.py +94 -0
  163. instana_client/models/endpoint_metric_result.py +109 -0
  164. instana_client/models/endpoint_node.py +91 -0
  165. instana_client/models/endpoint_result.py +102 -0
  166. instana_client/models/endpoint_simple.py +102 -0
  167. instana_client/models/entity_count_rule.py +100 -0
  168. instana_client/models/entity_count_verification_rule.py +114 -0
  169. instana_client/models/entity_health_info.py +99 -0
  170. instana_client/models/entity_id.py +92 -0
  171. instana_client/models/entity_verification_rule.py +105 -0
  172. instana_client/models/error_budget_alert_rule.py +97 -0
  173. instana_client/models/errors_application_alert_rule.py +90 -0
  174. instana_client/models/event.py +127 -0
  175. instana_client/models/event_filtering_configuration.py +106 -0
  176. instana_client/models/event_result.py +145 -0
  177. instana_client/models/event_specification_info.py +114 -0
  178. instana_client/models/extended_service.py +123 -0
  179. instana_client/models/failure_synthetic_alert_rule.py +90 -0
  180. instana_client/models/fixed_http_path_segment_matching_rule.py +90 -0
  181. instana_client/models/fixed_time_window.py +93 -0
  182. instana_client/models/full_trace.py +97 -0
  183. instana_client/models/generic_infra_alert_rule.py +93 -0
  184. instana_client/models/geo_location_configuration.py +106 -0
  185. instana_client/models/geo_mapping_rule.py +120 -0
  186. instana_client/models/geo_subdivision.py +91 -0
  187. instana_client/models/get_activities.py +115 -0
  188. instana_client/models/get_application_metrics.py +112 -0
  189. instana_client/models/get_applications.py +150 -0
  190. instana_client/models/get_available_metrics_query.py +103 -0
  191. instana_client/models/get_available_plugins_query.py +98 -0
  192. instana_client/models/get_call_groups.py +141 -0
  193. instana_client/models/get_combined_metrics.py +103 -0
  194. instana_client/models/get_dynamic_parameter_values.py +100 -0
  195. instana_client/models/get_endpoints.py +150 -0
  196. instana_client/models/get_infrastructure_groups_query.py +127 -0
  197. instana_client/models/get_infrastructure_query.py +127 -0
  198. instana_client/models/get_metrics_result.py +128 -0
  199. instana_client/models/get_mobile_app_beacon_groups.py +146 -0
  200. instana_client/models/get_mobile_app_beacons.py +118 -0
  201. instana_client/models/get_mobile_app_metrics.py +122 -0
  202. instana_client/models/get_mobile_app_metrics_v2.py +118 -0
  203. instana_client/models/get_payload_keys_result.py +88 -0
  204. instana_client/models/get_services.py +147 -0
  205. instana_client/models/get_snapshots_query.py +95 -0
  206. instana_client/models/get_test_result.py +139 -0
  207. instana_client/models/get_test_result_base.py +120 -0
  208. instana_client/models/get_test_result_list.py +125 -0
  209. instana_client/models/get_test_summary_result.py +130 -0
  210. instana_client/models/get_trace_download_result_item.py +114 -0
  211. instana_client/models/get_trace_groups.py +141 -0
  212. instana_client/models/get_traces.py +125 -0
  213. instana_client/models/get_website_beacon_groups.py +146 -0
  214. instana_client/models/get_website_beacons.py +118 -0
  215. instana_client/models/get_website_metrics.py +122 -0
  216. instana_client/models/get_website_metrics_v2.py +118 -0
  217. instana_client/models/global_application_alert_config_with_metadata.py +205 -0
  218. instana_client/models/global_applications_alert_config.py +191 -0
  219. instana_client/models/google_chat_integration.py +92 -0
  220. instana_client/models/graph_edge.py +102 -0
  221. instana_client/models/graph_node.py +100 -0
  222. instana_client/models/group.py +100 -0
  223. instana_client/models/group_by_tag.py +90 -0
  224. instana_client/models/group_mapping.py +95 -0
  225. instana_client/models/health_state.py +100 -0
  226. instana_client/models/historic_baseline.py +105 -0
  227. instana_client/models/host_availability_rule.py +100 -0
  228. instana_client/models/http_action_configuration.py +127 -0
  229. instana_client/models/http_endpoint_config.py +103 -0
  230. instana_client/models/http_endpoint_rule.py +101 -0
  231. instana_client/models/http_path_segment_matching_rule.py +124 -0
  232. instana_client/models/http_script_configuration.py +113 -0
  233. instana_client/models/hyper_param.py +111 -0
  234. instana_client/models/identity_provider_patch.py +88 -0
  235. instana_client/models/infra_alert_config.py +166 -0
  236. instana_client/models/infra_alert_config_with_metadata.py +176 -0
  237. instana_client/models/infra_alert_rule.py +133 -0
  238. instana_client/models/infra_event_result.py +109 -0
  239. instana_client/models/infra_metric_configuration.py +115 -0
  240. instana_client/models/infra_time_threshold.py +109 -0
  241. instana_client/models/infrastructure_entities_result.py +109 -0
  242. instana_client/models/infrastructure_group.py +92 -0
  243. instana_client/models/infrastructure_groups_result.py +109 -0
  244. instana_client/models/infrastructure_item.py +104 -0
  245. instana_client/models/infrastructure_metric_result.py +96 -0
  246. instana_client/models/instana_version_info.py +92 -0
  247. instana_client/models/integration_overview.py +94 -0
  248. instana_client/models/invitation.py +94 -0
  249. instana_client/models/invitation_response.py +96 -0
  250. instana_client/models/invitation_result.py +100 -0
  251. instana_client/models/ip_masking_configuration.py +95 -0
  252. instana_client/models/js_stack_trace_line.py +99 -0
  253. instana_client/models/kubernetes_physical_context.py +107 -0
  254. instana_client/models/latency_blueprint_indicator.py +106 -0
  255. instana_client/models/location_status.py +96 -0
  256. instana_client/models/log_alert_config.py +154 -0
  257. instana_client/models/log_alert_config_with_metadata.py +164 -0
  258. instana_client/models/log_alert_rule.py +120 -0
  259. instana_client/models/log_count_alert_rule.py +90 -0
  260. instana_client/models/log_entry_actor.py +101 -0
  261. instana_client/models/log_event_result.py +107 -0
  262. instana_client/models/log_time_threshold.py +109 -0
  263. instana_client/models/logs_application_alert_rule.py +122 -0
  264. instana_client/models/maintenance_config.py +103 -0
  265. instana_client/models/maintenance_config_scheduling.py +118 -0
  266. instana_client/models/maintenance_config_v2.py +111 -0
  267. instana_client/models/maintenance_config_v2_with_state_and_occurrence.py +131 -0
  268. instana_client/models/maintenance_config_with_last_updated.py +105 -0
  269. instana_client/models/maintenance_window.py +93 -0
  270. instana_client/models/manual_alerting_channel_configuration.py +99 -0
  271. instana_client/models/manual_close_info.py +99 -0
  272. instana_client/models/manual_service_config.py +103 -0
  273. instana_client/models/match_all_http_path_segment_matching_rule.py +88 -0
  274. instana_client/models/match_expression_dto.py +111 -0
  275. instana_client/models/meta_data.py +96 -0
  276. instana_client/models/metric_api_result.py +94 -0
  277. instana_client/models/metric_config.py +99 -0
  278. instana_client/models/metric_configuration.py +103 -0
  279. instana_client/models/metric_description.py +116 -0
  280. instana_client/models/metric_instance.py +105 -0
  281. instana_client/models/metric_item.py +102 -0
  282. instana_client/models/metric_metadata.py +132 -0
  283. instana_client/models/metric_pattern.py +101 -0
  284. instana_client/models/metrics_result.py +96 -0
  285. instana_client/models/metrics_result_item.py +100 -0
  286. instana_client/models/metrics_test_result_item.py +102 -0
  287. instana_client/models/mobile_app.py +91 -0
  288. instana_client/models/mobile_app_alert_config.py +162 -0
  289. instana_client/models/mobile_app_alert_rule.py +129 -0
  290. instana_client/models/mobile_app_beacon_groups_item.py +95 -0
  291. instana_client/models/mobile_app_beacon_groups_result.py +111 -0
  292. instana_client/models/mobile_app_beacon_result.py +111 -0
  293. instana_client/models/mobile_app_beacon_tag_group.py +100 -0
  294. instana_client/models/mobile_app_beacons_item.py +94 -0
  295. instana_client/models/mobile_app_event_result.py +108 -0
  296. instana_client/models/mobile_app_metric_result.py +88 -0
  297. instana_client/models/mobile_app_monitoring_beacon.py +259 -0
  298. instana_client/models/mobile_app_monitoring_metric_description.py +123 -0
  299. instana_client/models/mobile_app_monitoring_metrics_configuration.py +105 -0
  300. instana_client/models/mobile_app_time_threshold.py +115 -0
  301. instana_client/models/model_field.py +96 -0
  302. instana_client/models/monitoring_state.py +92 -0
  303. instana_client/models/multiple_scripts_configuration.py +90 -0
  304. instana_client/models/new_application_config.py +129 -0
  305. instana_client/models/new_business_perspective_config.py +97 -0
  306. instana_client/models/new_manual_service_config.py +100 -0
  307. instana_client/models/occurrence.py +91 -0
  308. instana_client/models/office365_integration.py +92 -0
  309. instana_client/models/one_time_maintenance_window.py +94 -0
  310. instana_client/models/opsgenie_integration.py +105 -0
  311. instana_client/models/order.py +99 -0
  312. instana_client/models/pagerduty_integration.py +92 -0
  313. instana_client/models/paginated_result.py +95 -0
  314. instana_client/models/pagination.py +91 -0
  315. instana_client/models/parameter.py +102 -0
  316. instana_client/models/parameter_value.py +90 -0
  317. instana_client/models/path_parameter_http_path_segment_matching_rule.py +90 -0
  318. instana_client/models/physical_context.py +119 -0
  319. instana_client/models/plugin_result.py +90 -0
  320. instana_client/models/policy.py +113 -0
  321. instana_client/models/policy_runnable.py +103 -0
  322. instana_client/models/post_snapshots_result.py +98 -0
  323. instana_client/models/problem.py +95 -0
  324. instana_client/models/prometheus_webhook_integration.py +94 -0
  325. instana_client/models/recurrent_maintenance_window.py +98 -0
  326. instana_client/models/release.py +111 -0
  327. instana_client/models/release_scope.py +94 -0
  328. instana_client/models/release_with_metadata.py +125 -0
  329. instana_client/models/rolling_time_window.py +90 -0
  330. instana_client/models/rule_input.py +98 -0
  331. instana_client/models/rule_with_threshold_application_alert_rule.py +116 -0
  332. instana_client/models/rule_with_threshold_infra_alert_rule.py +116 -0
  333. instana_client/models/rule_with_threshold_log_alert_rule.py +116 -0
  334. instana_client/models/rule_with_threshold_mobile_app_alert_rule.py +116 -0
  335. instana_client/models/rule_with_threshold_website_alert_rule.py +116 -0
  336. instana_client/models/run_configuration.py +96 -0
  337. instana_client/models/salesforce_integration.py +98 -0
  338. instana_client/models/scope_binding.py +91 -0
  339. instana_client/models/search_field_result.py +116 -0
  340. instana_client/models/service.py +116 -0
  341. instana_client/models/service_config.py +107 -0
  342. instana_client/models/service_event_result.py +110 -0
  343. instana_client/models/service_item.py +94 -0
  344. instana_client/models/service_level_indicator.py +172 -0
  345. instana_client/models/service_level_objective_alert_rule.py +100 -0
  346. instana_client/models/service_level_objective_configuration.py +118 -0
  347. instana_client/models/service_levels_alert_config.py +133 -0
  348. instana_client/models/service_levels_alert_rule.py +111 -0
  349. instana_client/models/service_levels_burn_rate_time_windows.py +97 -0
  350. instana_client/models/service_levels_time_threshold.py +90 -0
  351. instana_client/models/service_levelse_alert_config_with_metadata.py +143 -0
  352. instana_client/models/service_map.py +106 -0
  353. instana_client/models/service_map_connection.py +97 -0
  354. instana_client/models/service_matching_rule.py +90 -0
  355. instana_client/models/service_metric_result.py +109 -0
  356. instana_client/models/service_node.py +106 -0
  357. instana_client/models/service_now_enhanced_integration.py +116 -0
  358. instana_client/models/service_now_integration.py +98 -0
  359. instana_client/models/service_result.py +102 -0
  360. instana_client/models/service_scope.py +95 -0
  361. instana_client/models/service_scope_with_metadata.py +96 -0
  362. instana_client/models/service_scoped_to.py +97 -0
  363. instana_client/models/service_scoped_to_with_metadata.py +97 -0
  364. instana_client/models/service_simple.py +90 -0
  365. instana_client/models/session_settings.py +91 -0
  366. instana_client/models/slack_integration.py +98 -0
  367. instana_client/models/sli_configuration.py +105 -0
  368. instana_client/models/sli_configuration_with_last_updated.py +107 -0
  369. instana_client/models/sli_entity.py +117 -0
  370. instana_client/models/sli_report.py +100 -0
  371. instana_client/models/slo_entity.py +119 -0
  372. instana_client/models/slo_report.py +112 -0
  373. instana_client/models/slowness_application_alert_rule.py +90 -0
  374. instana_client/models/slowness_website_alert_rule.py +90 -0
  375. instana_client/models/snapshot_item.py +102 -0
  376. instana_client/models/snapshot_preview.py +97 -0
  377. instana_client/models/snapshot_result.py +96 -0
  378. instana_client/models/software_user.py +94 -0
  379. instana_client/models/software_version.py +124 -0
  380. instana_client/models/source_map_file_blob.py +92 -0
  381. instana_client/models/source_map_file_meta.py +115 -0
  382. instana_client/models/source_map_upload_config.py +106 -0
  383. instana_client/models/span.py +156 -0
  384. instana_client/models/span_excerpt.py +132 -0
  385. instana_client/models/span_relation.py +114 -0
  386. instana_client/models/specific_js_errors_website_alert_rule.py +101 -0
  387. instana_client/models/splunk_integration.py +94 -0
  388. instana_client/models/ssl_certificate_configuration.py +99 -0
  389. instana_client/models/stack_trace_item.py +92 -0
  390. instana_client/models/stack_trace_line.py +99 -0
  391. instana_client/models/static_baseline_threshold_rule.py +102 -0
  392. instana_client/models/static_string_field.py +91 -0
  393. instana_client/models/static_threshold.py +94 -0
  394. instana_client/models/static_threshold_rule.py +91 -0
  395. instana_client/models/status_code_application_alert_rule.py +95 -0
  396. instana_client/models/status_code_mobile_app_alert_rule.py +101 -0
  397. instana_client/models/status_code_website_alert_rule.py +101 -0
  398. instana_client/models/synthetic_alert_config.py +127 -0
  399. instana_client/models/synthetic_alert_config_with_metadata.py +137 -0
  400. instana_client/models/synthetic_alert_rule.py +120 -0
  401. instana_client/models/synthetic_call_config.py +99 -0
  402. instana_client/models/synthetic_call_rule.py +99 -0
  403. instana_client/models/synthetic_call_with_defaults_config.py +108 -0
  404. instana_client/models/synthetic_credential.py +111 -0
  405. instana_client/models/synthetic_datacenter.py +117 -0
  406. instana_client/models/synthetic_datacenter_configuration.py +88 -0
  407. instana_client/models/synthetic_geo_point.py +94 -0
  408. instana_client/models/synthetic_location.py +129 -0
  409. instana_client/models/synthetic_location_configuration.py +102 -0
  410. instana_client/models/synthetic_metric_configuration.py +99 -0
  411. instana_client/models/synthetic_metric_tag_group.py +100 -0
  412. instana_client/models/synthetic_playback_capabilities.py +98 -0
  413. instana_client/models/synthetic_slo_entity.py +95 -0
  414. instana_client/models/synthetic_test.py +149 -0
  415. instana_client/models/synthetic_time_threshold.py +110 -0
  416. instana_client/models/synthetic_type_configuration.py +141 -0
  417. instana_client/models/synthetics_event_result.py +110 -0
  418. instana_client/models/system_rule.py +91 -0
  419. instana_client/models/system_rule_label.py +90 -0
  420. instana_client/models/tag.py +123 -0
  421. instana_client/models/tag_catalog.py +106 -0
  422. instana_client/models/tag_filter.py +113 -0
  423. instana_client/models/tag_filter_expression.py +106 -0
  424. instana_client/models/tag_filter_expression_element.py +111 -0
  425. instana_client/models/tag_matcher_dto.py +110 -0
  426. instana_client/models/tag_tree_level.py +109 -0
  427. instana_client/models/tag_tree_node.py +113 -0
  428. instana_client/models/tag_tree_tag.py +103 -0
  429. instana_client/models/test_common_properties.py +136 -0
  430. instana_client/models/test_result.py +105 -0
  431. instana_client/models/test_result_common_properties.py +108 -0
  432. instana_client/models/test_result_detail_data.py +112 -0
  433. instana_client/models/test_result_item.py +106 -0
  434. instana_client/models/test_result_list_item.py +94 -0
  435. instana_client/models/test_result_list_result.py +103 -0
  436. instana_client/models/test_result_metadata.py +94 -0
  437. instana_client/models/test_result_subtransaction.py +90 -0
  438. instana_client/models/threshold.py +122 -0
  439. instana_client/models/threshold_config_rule.py +114 -0
  440. instana_client/models/threshold_rule.py +125 -0
  441. instana_client/models/throughput_application_alert_rule.py +90 -0
  442. instana_client/models/throughput_mobile_app_alert_rule.py +90 -0
  443. instana_client/models/throughput_website_alert_rule.py +90 -0
  444. instana_client/models/time_frame.py +91 -0
  445. instana_client/models/time_window.py +120 -0
  446. instana_client/models/topology.py +106 -0
  447. instana_client/models/trace.py +109 -0
  448. instana_client/models/trace_activity_tree_node_details.py +139 -0
  449. instana_client/models/trace_download_result.py +111 -0
  450. instana_client/models/trace_groups_item.py +95 -0
  451. instana_client/models/trace_groups_result.py +111 -0
  452. instana_client/models/trace_impact_application_time_threshold.py +92 -0
  453. instana_client/models/trace_item.py +94 -0
  454. instana_client/models/trace_result.py +111 -0
  455. instana_client/models/traffic_blueprint_indicator.py +104 -0
  456. instana_client/models/trigger.py +99 -0
  457. instana_client/models/type_configuration.py +107 -0
  458. instana_client/models/unsupported_http_path_segment_matching_rule.py +90 -0
  459. instana_client/models/updated_business_perspective_config.py +97 -0
  460. instana_client/models/usage_result.py +98 -0
  461. instana_client/models/usage_result_items.py +90 -0
  462. instana_client/models/user_basic_result.py +92 -0
  463. instana_client/models/user_impact_mobile_app_time_threshold.py +103 -0
  464. instana_client/models/user_impact_website_time_threshold.py +103 -0
  465. instana_client/models/user_result.py +98 -0
  466. instana_client/models/users_result.py +106 -0
  467. instana_client/models/validated_alerting_channel_input_info.py +123 -0
  468. instana_client/models/validated_alerting_configuration.py +121 -0
  469. instana_client/models/validated_maintenance_config_v2_with_state_and_occurrence.py +135 -0
  470. instana_client/models/validated_maintenance_config_with_status.py +116 -0
  471. instana_client/models/victor_ops_integration.py +94 -0
  472. instana_client/models/violations_in_period_application_time_threshold.py +92 -0
  473. instana_client/models/violations_in_period_mobile_app_time_threshold.py +92 -0
  474. instana_client/models/violations_in_period_website_time_threshold.py +92 -0
  475. instana_client/models/violations_in_sequence_application_time_threshold.py +89 -0
  476. instana_client/models/violations_in_sequence_infra_time_threshold.py +89 -0
  477. instana_client/models/violations_in_sequence_log_time_threshold.py +89 -0
  478. instana_client/models/violations_in_sequence_mobile_app_time_threshold.py +89 -0
  479. instana_client/models/violations_in_sequence_synthetic_time_threshold.py +89 -0
  480. instana_client/models/violations_in_sequence_website_time_threshold.py +89 -0
  481. instana_client/models/watson_ai_ops_webhook_integration.py +94 -0
  482. instana_client/models/webex_teams_webhook_integration.py +92 -0
  483. instana_client/models/webhook_integration.py +94 -0
  484. instana_client/models/webpage_action_configuration.py +109 -0
  485. instana_client/models/webpage_script_configuration.py +109 -0
  486. instana_client/models/website.py +92 -0
  487. instana_client/models/website_alert_config.py +166 -0
  488. instana_client/models/website_alert_config_with_metadata.py +176 -0
  489. instana_client/models/website_alert_rule.py +132 -0
  490. instana_client/models/website_apdex_entity.py +107 -0
  491. instana_client/models/website_beacon_groups_item.py +95 -0
  492. instana_client/models/website_beacon_groups_result.py +111 -0
  493. instana_client/models/website_beacon_result.py +111 -0
  494. instana_client/models/website_beacon_tag_group.py +100 -0
  495. instana_client/models/website_beacons_item.py +94 -0
  496. instana_client/models/website_event_based_sli_entity.py +110 -0
  497. instana_client/models/website_event_result.py +108 -0
  498. instana_client/models/website_metric_result.py +88 -0
  499. instana_client/models/website_monitoring_beacon.py +301 -0
  500. instana_client/models/website_monitoring_metric_description.py +123 -0
  501. instana_client/models/website_monitoring_metrics_configuration.py +99 -0
  502. instana_client/models/website_slo_entity.py +104 -0
  503. instana_client/models/website_time_based_sli_entity.py +105 -0
  504. instana_client/models/website_time_threshold.py +115 -0
  505. instana_client/models/widget.py +103 -0
  506. instana_client/models/with_metadata.py +172 -0
  507. instana_client/models/with_resolved_name.py +102 -0
  508. instana_client/models/z_chat_ops_integration.py +97 -0
  509. instana_client/py.typed +0 -0
  510. instana_client/rest.py +258 -0
  511. instana_client-1.0.0.dist-info/METADATA +25 -0
  512. instana_client-1.0.0.dist-info/RECORD +515 -0
  513. instana_client-1.0.0.dist-info/WHEEL +5 -0
  514. instana_client-1.0.0.dist-info/licenses/LICENSE +202 -0
  515. instana_client-1.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1370 @@
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
+ import warnings
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
18
+ from typing_extensions import Annotated
19
+
20
+ from pydantic import StrictStr
21
+ from typing import List
22
+ from instana_client.models.api_token import ApiToken
23
+
24
+ from instana_client.api_client import ApiClient, RequestSerialized
25
+ from instana_client.api_response import ApiResponse
26
+ from instana_client.rest import RESTResponseType
27
+
28
+
29
+ class APITokenApi:
30
+ """NOTE: This class is auto generated by OpenAPI Generator
31
+ Ref: https://openapi-generator.tech
32
+
33
+ Do not edit the class manually.
34
+ """
35
+
36
+ def __init__(self, api_client=None) -> None:
37
+ if api_client is None:
38
+ api_client = ApiClient.get_default()
39
+ self.api_client = api_client
40
+
41
+
42
+ @validate_call
43
+ def delete_api_token(
44
+ self,
45
+ internal_id: StrictStr,
46
+ _request_timeout: Union[
47
+ None,
48
+ Annotated[StrictFloat, Field(gt=0)],
49
+ Tuple[
50
+ Annotated[StrictFloat, Field(gt=0)],
51
+ Annotated[StrictFloat, Field(gt=0)]
52
+ ]
53
+ ] = None,
54
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
55
+ _content_type: Optional[StrictStr] = None,
56
+ _headers: Optional[Dict[StrictStr, Any]] = None,
57
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
58
+ ) -> None:
59
+ """Delete API token
60
+
61
+ Delete the Api Token
62
+
63
+ :param internal_id: (required)
64
+ :type internal_id: str
65
+ :param _request_timeout: timeout setting for this request. If one
66
+ number provided, it will be total request
67
+ timeout. It can also be a pair (tuple) of
68
+ (connection, read) timeouts.
69
+ :type _request_timeout: int, tuple(int, int), optional
70
+ :param _request_auth: set to override the auth_settings for an a single
71
+ request; this effectively ignores the
72
+ authentication in the spec for a single request.
73
+ :type _request_auth: dict, optional
74
+ :param _content_type: force content-type for the request.
75
+ :type _content_type: str, Optional
76
+ :param _headers: set to override the headers for a single
77
+ request; this effectively ignores the headers
78
+ in the spec for a single request.
79
+ :type _headers: dict, optional
80
+ :param _host_index: set to override the host_index for a single
81
+ request; this effectively ignores the host_index
82
+ in the spec for a single request.
83
+ :type _host_index: int, optional
84
+ :return: Returns the result object.
85
+ """ # noqa: E501
86
+
87
+ _param = self._delete_api_token_serialize(
88
+ internal_id=internal_id,
89
+ _request_auth=_request_auth,
90
+ _content_type=_content_type,
91
+ _headers=_headers,
92
+ _host_index=_host_index
93
+ )
94
+
95
+ _response_types_map: Dict[str, Optional[str]] = {
96
+ }
97
+ response_data = self.api_client.call_api(
98
+ *_param,
99
+ _request_timeout=_request_timeout
100
+ )
101
+ response_data.read()
102
+ return self.api_client.response_deserialize(
103
+ response_data=response_data,
104
+ response_types_map=_response_types_map,
105
+ ).data
106
+
107
+
108
+ @validate_call
109
+ def delete_api_token_with_http_info(
110
+ self,
111
+ internal_id: StrictStr,
112
+ _request_timeout: Union[
113
+ None,
114
+ Annotated[StrictFloat, Field(gt=0)],
115
+ Tuple[
116
+ Annotated[StrictFloat, Field(gt=0)],
117
+ Annotated[StrictFloat, Field(gt=0)]
118
+ ]
119
+ ] = None,
120
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
121
+ _content_type: Optional[StrictStr] = None,
122
+ _headers: Optional[Dict[StrictStr, Any]] = None,
123
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
124
+ ) -> ApiResponse[None]:
125
+ """Delete API token
126
+
127
+ Delete the Api Token
128
+
129
+ :param internal_id: (required)
130
+ :type internal_id: str
131
+ :param _request_timeout: timeout setting for this request. If one
132
+ number provided, it will be total request
133
+ timeout. It can also be a pair (tuple) of
134
+ (connection, read) timeouts.
135
+ :type _request_timeout: int, tuple(int, int), optional
136
+ :param _request_auth: set to override the auth_settings for an a single
137
+ request; this effectively ignores the
138
+ authentication in the spec for a single request.
139
+ :type _request_auth: dict, optional
140
+ :param _content_type: force content-type for the request.
141
+ :type _content_type: str, Optional
142
+ :param _headers: set to override the headers for a single
143
+ request; this effectively ignores the headers
144
+ in the spec for a single request.
145
+ :type _headers: dict, optional
146
+ :param _host_index: set to override the host_index for a single
147
+ request; this effectively ignores the host_index
148
+ in the spec for a single request.
149
+ :type _host_index: int, optional
150
+ :return: Returns the result object.
151
+ """ # noqa: E501
152
+
153
+ _param = self._delete_api_token_serialize(
154
+ internal_id=internal_id,
155
+ _request_auth=_request_auth,
156
+ _content_type=_content_type,
157
+ _headers=_headers,
158
+ _host_index=_host_index
159
+ )
160
+
161
+ _response_types_map: Dict[str, Optional[str]] = {
162
+ }
163
+ response_data = self.api_client.call_api(
164
+ *_param,
165
+ _request_timeout=_request_timeout
166
+ )
167
+ response_data.read()
168
+ return self.api_client.response_deserialize(
169
+ response_data=response_data,
170
+ response_types_map=_response_types_map,
171
+ )
172
+
173
+
174
+ @validate_call
175
+ def delete_api_token_without_preload_content(
176
+ self,
177
+ internal_id: StrictStr,
178
+ _request_timeout: Union[
179
+ None,
180
+ Annotated[StrictFloat, Field(gt=0)],
181
+ Tuple[
182
+ Annotated[StrictFloat, Field(gt=0)],
183
+ Annotated[StrictFloat, Field(gt=0)]
184
+ ]
185
+ ] = None,
186
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
187
+ _content_type: Optional[StrictStr] = None,
188
+ _headers: Optional[Dict[StrictStr, Any]] = None,
189
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
190
+ ) -> RESTResponseType:
191
+ """Delete API token
192
+
193
+ Delete the Api Token
194
+
195
+ :param internal_id: (required)
196
+ :type internal_id: str
197
+ :param _request_timeout: timeout setting for this request. If one
198
+ number provided, it will be total request
199
+ timeout. It can also be a pair (tuple) of
200
+ (connection, read) timeouts.
201
+ :type _request_timeout: int, tuple(int, int), optional
202
+ :param _request_auth: set to override the auth_settings for an a single
203
+ request; this effectively ignores the
204
+ authentication in the spec for a single request.
205
+ :type _request_auth: dict, optional
206
+ :param _content_type: force content-type for the request.
207
+ :type _content_type: str, Optional
208
+ :param _headers: set to override the headers for a single
209
+ request; this effectively ignores the headers
210
+ in the spec for a single request.
211
+ :type _headers: dict, optional
212
+ :param _host_index: set to override the host_index for a single
213
+ request; this effectively ignores the host_index
214
+ in the spec for a single request.
215
+ :type _host_index: int, optional
216
+ :return: Returns the result object.
217
+ """ # noqa: E501
218
+
219
+ _param = self._delete_api_token_serialize(
220
+ internal_id=internal_id,
221
+ _request_auth=_request_auth,
222
+ _content_type=_content_type,
223
+ _headers=_headers,
224
+ _host_index=_host_index
225
+ )
226
+
227
+ _response_types_map: Dict[str, Optional[str]] = {
228
+ }
229
+ response_data = self.api_client.call_api(
230
+ *_param,
231
+ _request_timeout=_request_timeout
232
+ )
233
+ return response_data.response
234
+
235
+
236
+ def _delete_api_token_serialize(
237
+ self,
238
+ internal_id,
239
+ _request_auth,
240
+ _content_type,
241
+ _headers,
242
+ _host_index,
243
+ ) -> RequestSerialized:
244
+
245
+ _host = None
246
+
247
+ _collection_formats: Dict[str, str] = {
248
+ }
249
+
250
+ _path_params: Dict[str, str] = {}
251
+ _query_params: List[Tuple[str, str]] = []
252
+ _header_params: Dict[str, Optional[str]] = _headers or {}
253
+ _form_params: List[Tuple[str, str]] = []
254
+ _files: Dict[
255
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
256
+ ] = {}
257
+ _body_params: Optional[bytes] = None
258
+
259
+ # process the path parameters
260
+ if internal_id is not None:
261
+ _path_params['internalId'] = internal_id
262
+ # process the query parameters
263
+ # process the header parameters
264
+ # process the form parameters
265
+ # process the body parameter
266
+
267
+
268
+ # set the HTTP header `Accept`
269
+ if 'Accept' not in _header_params:
270
+ _header_params['Accept'] = self.api_client.select_header_accept(
271
+ [
272
+ 'application/json'
273
+ ]
274
+ )
275
+
276
+
277
+ # authentication setting
278
+ _auth_settings: List[str] = [
279
+ 'ApiKeyAuth'
280
+ ]
281
+
282
+ return self.api_client.param_serialize(
283
+ method='DELETE',
284
+ resource_path='/api/settings/api-tokens/{internalId}',
285
+ path_params=_path_params,
286
+ query_params=_query_params,
287
+ header_params=_header_params,
288
+ body=_body_params,
289
+ post_params=_form_params,
290
+ files=_files,
291
+ auth_settings=_auth_settings,
292
+ collection_formats=_collection_formats,
293
+ _host=_host,
294
+ _request_auth=_request_auth
295
+ )
296
+
297
+
298
+
299
+
300
+ @validate_call
301
+ def get_api_token(
302
+ self,
303
+ internal_id: StrictStr,
304
+ _request_timeout: Union[
305
+ None,
306
+ Annotated[StrictFloat, Field(gt=0)],
307
+ Tuple[
308
+ Annotated[StrictFloat, Field(gt=0)],
309
+ Annotated[StrictFloat, Field(gt=0)]
310
+ ]
311
+ ] = None,
312
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
313
+ _content_type: Optional[StrictStr] = None,
314
+ _headers: Optional[Dict[StrictStr, Any]] = None,
315
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
316
+ ) -> ApiToken:
317
+ """Get API token
318
+
319
+ Returns API Token details, including the set of permissions
320
+
321
+ :param internal_id: (required)
322
+ :type internal_id: str
323
+ :param _request_timeout: timeout setting for this request. If one
324
+ number provided, it will be total request
325
+ timeout. It can also be a pair (tuple) of
326
+ (connection, read) timeouts.
327
+ :type _request_timeout: int, tuple(int, int), optional
328
+ :param _request_auth: set to override the auth_settings for an a single
329
+ request; this effectively ignores the
330
+ authentication in the spec for a single request.
331
+ :type _request_auth: dict, optional
332
+ :param _content_type: force content-type for the request.
333
+ :type _content_type: str, Optional
334
+ :param _headers: set to override the headers for a single
335
+ request; this effectively ignores the headers
336
+ in the spec for a single request.
337
+ :type _headers: dict, optional
338
+ :param _host_index: set to override the host_index for a single
339
+ request; this effectively ignores the host_index
340
+ in the spec for a single request.
341
+ :type _host_index: int, optional
342
+ :return: Returns the result object.
343
+ """ # noqa: E501
344
+
345
+ _param = self._get_api_token_serialize(
346
+ internal_id=internal_id,
347
+ _request_auth=_request_auth,
348
+ _content_type=_content_type,
349
+ _headers=_headers,
350
+ _host_index=_host_index
351
+ )
352
+
353
+ _response_types_map: Dict[str, Optional[str]] = {
354
+ '200': "ApiToken",
355
+ }
356
+ response_data = self.api_client.call_api(
357
+ *_param,
358
+ _request_timeout=_request_timeout
359
+ )
360
+ response_data.read()
361
+ return self.api_client.response_deserialize(
362
+ response_data=response_data,
363
+ response_types_map=_response_types_map,
364
+ ).data
365
+
366
+
367
+ @validate_call
368
+ def get_api_token_with_http_info(
369
+ self,
370
+ internal_id: StrictStr,
371
+ _request_timeout: Union[
372
+ None,
373
+ Annotated[StrictFloat, Field(gt=0)],
374
+ Tuple[
375
+ Annotated[StrictFloat, Field(gt=0)],
376
+ Annotated[StrictFloat, Field(gt=0)]
377
+ ]
378
+ ] = None,
379
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
380
+ _content_type: Optional[StrictStr] = None,
381
+ _headers: Optional[Dict[StrictStr, Any]] = None,
382
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
383
+ ) -> ApiResponse[ApiToken]:
384
+ """Get API token
385
+
386
+ Returns API Token details, including the set of permissions
387
+
388
+ :param internal_id: (required)
389
+ :type internal_id: str
390
+ :param _request_timeout: timeout setting for this request. If one
391
+ number provided, it will be total request
392
+ timeout. It can also be a pair (tuple) of
393
+ (connection, read) timeouts.
394
+ :type _request_timeout: int, tuple(int, int), optional
395
+ :param _request_auth: set to override the auth_settings for an a single
396
+ request; this effectively ignores the
397
+ authentication in the spec for a single request.
398
+ :type _request_auth: dict, optional
399
+ :param _content_type: force content-type for the request.
400
+ :type _content_type: str, Optional
401
+ :param _headers: set to override the headers for a single
402
+ request; this effectively ignores the headers
403
+ in the spec for a single request.
404
+ :type _headers: dict, optional
405
+ :param _host_index: set to override the host_index for a single
406
+ request; this effectively ignores the host_index
407
+ in the spec for a single request.
408
+ :type _host_index: int, optional
409
+ :return: Returns the result object.
410
+ """ # noqa: E501
411
+
412
+ _param = self._get_api_token_serialize(
413
+ internal_id=internal_id,
414
+ _request_auth=_request_auth,
415
+ _content_type=_content_type,
416
+ _headers=_headers,
417
+ _host_index=_host_index
418
+ )
419
+
420
+ _response_types_map: Dict[str, Optional[str]] = {
421
+ '200': "ApiToken",
422
+ }
423
+ response_data = self.api_client.call_api(
424
+ *_param,
425
+ _request_timeout=_request_timeout
426
+ )
427
+ response_data.read()
428
+ return self.api_client.response_deserialize(
429
+ response_data=response_data,
430
+ response_types_map=_response_types_map,
431
+ )
432
+
433
+
434
+ @validate_call
435
+ def get_api_token_without_preload_content(
436
+ self,
437
+ internal_id: StrictStr,
438
+ _request_timeout: Union[
439
+ None,
440
+ Annotated[StrictFloat, Field(gt=0)],
441
+ Tuple[
442
+ Annotated[StrictFloat, Field(gt=0)],
443
+ Annotated[StrictFloat, Field(gt=0)]
444
+ ]
445
+ ] = None,
446
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
447
+ _content_type: Optional[StrictStr] = None,
448
+ _headers: Optional[Dict[StrictStr, Any]] = None,
449
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
450
+ ) -> RESTResponseType:
451
+ """Get API token
452
+
453
+ Returns API Token details, including the set of permissions
454
+
455
+ :param internal_id: (required)
456
+ :type internal_id: str
457
+ :param _request_timeout: timeout setting for this request. If one
458
+ number provided, it will be total request
459
+ timeout. It can also be a pair (tuple) of
460
+ (connection, read) timeouts.
461
+ :type _request_timeout: int, tuple(int, int), optional
462
+ :param _request_auth: set to override the auth_settings for an a single
463
+ request; this effectively ignores the
464
+ authentication in the spec for a single request.
465
+ :type _request_auth: dict, optional
466
+ :param _content_type: force content-type for the request.
467
+ :type _content_type: str, Optional
468
+ :param _headers: set to override the headers for a single
469
+ request; this effectively ignores the headers
470
+ in the spec for a single request.
471
+ :type _headers: dict, optional
472
+ :param _host_index: set to override the host_index for a single
473
+ request; this effectively ignores the host_index
474
+ in the spec for a single request.
475
+ :type _host_index: int, optional
476
+ :return: Returns the result object.
477
+ """ # noqa: E501
478
+
479
+ _param = self._get_api_token_serialize(
480
+ internal_id=internal_id,
481
+ _request_auth=_request_auth,
482
+ _content_type=_content_type,
483
+ _headers=_headers,
484
+ _host_index=_host_index
485
+ )
486
+
487
+ _response_types_map: Dict[str, Optional[str]] = {
488
+ '200': "ApiToken",
489
+ }
490
+ response_data = self.api_client.call_api(
491
+ *_param,
492
+ _request_timeout=_request_timeout
493
+ )
494
+ return response_data.response
495
+
496
+
497
+ def _get_api_token_serialize(
498
+ self,
499
+ internal_id,
500
+ _request_auth,
501
+ _content_type,
502
+ _headers,
503
+ _host_index,
504
+ ) -> RequestSerialized:
505
+
506
+ _host = None
507
+
508
+ _collection_formats: Dict[str, str] = {
509
+ }
510
+
511
+ _path_params: Dict[str, str] = {}
512
+ _query_params: List[Tuple[str, str]] = []
513
+ _header_params: Dict[str, Optional[str]] = _headers or {}
514
+ _form_params: List[Tuple[str, str]] = []
515
+ _files: Dict[
516
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
517
+ ] = {}
518
+ _body_params: Optional[bytes] = None
519
+
520
+ # process the path parameters
521
+ if internal_id is not None:
522
+ _path_params['internalId'] = internal_id
523
+ # process the query parameters
524
+ # process the header parameters
525
+ # process the form parameters
526
+ # process the body parameter
527
+
528
+
529
+ # set the HTTP header `Accept`
530
+ if 'Accept' not in _header_params:
531
+ _header_params['Accept'] = self.api_client.select_header_accept(
532
+ [
533
+ 'application/json'
534
+ ]
535
+ )
536
+
537
+
538
+ # authentication setting
539
+ _auth_settings: List[str] = [
540
+ 'ApiKeyAuth'
541
+ ]
542
+
543
+ return self.api_client.param_serialize(
544
+ method='GET',
545
+ resource_path='/api/settings/api-tokens/{internalId}',
546
+ path_params=_path_params,
547
+ query_params=_query_params,
548
+ header_params=_header_params,
549
+ body=_body_params,
550
+ post_params=_form_params,
551
+ files=_files,
552
+ auth_settings=_auth_settings,
553
+ collection_formats=_collection_formats,
554
+ _host=_host,
555
+ _request_auth=_request_auth
556
+ )
557
+
558
+
559
+
560
+
561
+ @validate_call
562
+ def get_api_tokens(
563
+ self,
564
+ _request_timeout: Union[
565
+ None,
566
+ Annotated[StrictFloat, Field(gt=0)],
567
+ Tuple[
568
+ Annotated[StrictFloat, Field(gt=0)],
569
+ Annotated[StrictFloat, Field(gt=0)]
570
+ ]
571
+ ] = None,
572
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
573
+ _content_type: Optional[StrictStr] = None,
574
+ _headers: Optional[Dict[StrictStr, Any]] = None,
575
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
576
+ ) -> List[ApiToken]:
577
+ """Get all API Tokens
578
+
579
+ Get the list of API Tokens for this Tenant-Unit
580
+
581
+ :param _request_timeout: timeout setting for this request. If one
582
+ number provided, it will be total request
583
+ timeout. It can also be a pair (tuple) of
584
+ (connection, read) timeouts.
585
+ :type _request_timeout: int, tuple(int, int), optional
586
+ :param _request_auth: set to override the auth_settings for an a single
587
+ request; this effectively ignores the
588
+ authentication in the spec for a single request.
589
+ :type _request_auth: dict, optional
590
+ :param _content_type: force content-type for the request.
591
+ :type _content_type: str, Optional
592
+ :param _headers: set to override the headers for a single
593
+ request; this effectively ignores the headers
594
+ in the spec for a single request.
595
+ :type _headers: dict, optional
596
+ :param _host_index: set to override the host_index for a single
597
+ request; this effectively ignores the host_index
598
+ in the spec for a single request.
599
+ :type _host_index: int, optional
600
+ :return: Returns the result object.
601
+ """ # noqa: E501
602
+
603
+ _param = self._get_api_tokens_serialize(
604
+ _request_auth=_request_auth,
605
+ _content_type=_content_type,
606
+ _headers=_headers,
607
+ _host_index=_host_index
608
+ )
609
+
610
+ _response_types_map: Dict[str, Optional[str]] = {
611
+ '200': "List[ApiToken]",
612
+ '404': None,
613
+ }
614
+ response_data = self.api_client.call_api(
615
+ *_param,
616
+ _request_timeout=_request_timeout
617
+ )
618
+ response_data.read()
619
+ return self.api_client.response_deserialize(
620
+ response_data=response_data,
621
+ response_types_map=_response_types_map,
622
+ ).data
623
+
624
+
625
+ @validate_call
626
+ def get_api_tokens_with_http_info(
627
+ self,
628
+ _request_timeout: Union[
629
+ None,
630
+ Annotated[StrictFloat, Field(gt=0)],
631
+ Tuple[
632
+ Annotated[StrictFloat, Field(gt=0)],
633
+ Annotated[StrictFloat, Field(gt=0)]
634
+ ]
635
+ ] = None,
636
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
637
+ _content_type: Optional[StrictStr] = None,
638
+ _headers: Optional[Dict[StrictStr, Any]] = None,
639
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
640
+ ) -> ApiResponse[List[ApiToken]]:
641
+ """Get all API Tokens
642
+
643
+ Get the list of API Tokens for this Tenant-Unit
644
+
645
+ :param _request_timeout: timeout setting for this request. If one
646
+ number provided, it will be total request
647
+ timeout. It can also be a pair (tuple) of
648
+ (connection, read) timeouts.
649
+ :type _request_timeout: int, tuple(int, int), optional
650
+ :param _request_auth: set to override the auth_settings for an a single
651
+ request; this effectively ignores the
652
+ authentication in the spec for a single request.
653
+ :type _request_auth: dict, optional
654
+ :param _content_type: force content-type for the request.
655
+ :type _content_type: str, Optional
656
+ :param _headers: set to override the headers for a single
657
+ request; this effectively ignores the headers
658
+ in the spec for a single request.
659
+ :type _headers: dict, optional
660
+ :param _host_index: set to override the host_index for a single
661
+ request; this effectively ignores the host_index
662
+ in the spec for a single request.
663
+ :type _host_index: int, optional
664
+ :return: Returns the result object.
665
+ """ # noqa: E501
666
+
667
+ _param = self._get_api_tokens_serialize(
668
+ _request_auth=_request_auth,
669
+ _content_type=_content_type,
670
+ _headers=_headers,
671
+ _host_index=_host_index
672
+ )
673
+
674
+ _response_types_map: Dict[str, Optional[str]] = {
675
+ '200': "List[ApiToken]",
676
+ '404': None,
677
+ }
678
+ response_data = self.api_client.call_api(
679
+ *_param,
680
+ _request_timeout=_request_timeout
681
+ )
682
+ response_data.read()
683
+ return self.api_client.response_deserialize(
684
+ response_data=response_data,
685
+ response_types_map=_response_types_map,
686
+ )
687
+
688
+
689
+ @validate_call
690
+ def get_api_tokens_without_preload_content(
691
+ self,
692
+ _request_timeout: Union[
693
+ None,
694
+ Annotated[StrictFloat, Field(gt=0)],
695
+ Tuple[
696
+ Annotated[StrictFloat, Field(gt=0)],
697
+ Annotated[StrictFloat, Field(gt=0)]
698
+ ]
699
+ ] = None,
700
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
701
+ _content_type: Optional[StrictStr] = None,
702
+ _headers: Optional[Dict[StrictStr, Any]] = None,
703
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
704
+ ) -> RESTResponseType:
705
+ """Get all API Tokens
706
+
707
+ Get the list of API Tokens for this Tenant-Unit
708
+
709
+ :param _request_timeout: timeout setting for this request. If one
710
+ number provided, it will be total request
711
+ timeout. It can also be a pair (tuple) of
712
+ (connection, read) timeouts.
713
+ :type _request_timeout: int, tuple(int, int), optional
714
+ :param _request_auth: set to override the auth_settings for an a single
715
+ request; this effectively ignores the
716
+ authentication in the spec for a single request.
717
+ :type _request_auth: dict, optional
718
+ :param _content_type: force content-type for the request.
719
+ :type _content_type: str, Optional
720
+ :param _headers: set to override the headers for a single
721
+ request; this effectively ignores the headers
722
+ in the spec for a single request.
723
+ :type _headers: dict, optional
724
+ :param _host_index: set to override the host_index for a single
725
+ request; this effectively ignores the host_index
726
+ in the spec for a single request.
727
+ :type _host_index: int, optional
728
+ :return: Returns the result object.
729
+ """ # noqa: E501
730
+
731
+ _param = self._get_api_tokens_serialize(
732
+ _request_auth=_request_auth,
733
+ _content_type=_content_type,
734
+ _headers=_headers,
735
+ _host_index=_host_index
736
+ )
737
+
738
+ _response_types_map: Dict[str, Optional[str]] = {
739
+ '200': "List[ApiToken]",
740
+ '404': None,
741
+ }
742
+ response_data = self.api_client.call_api(
743
+ *_param,
744
+ _request_timeout=_request_timeout
745
+ )
746
+ return response_data.response
747
+
748
+
749
+ def _get_api_tokens_serialize(
750
+ self,
751
+ _request_auth,
752
+ _content_type,
753
+ _headers,
754
+ _host_index,
755
+ ) -> RequestSerialized:
756
+
757
+ _host = None
758
+
759
+ _collection_formats: Dict[str, str] = {
760
+ }
761
+
762
+ _path_params: Dict[str, str] = {}
763
+ _query_params: List[Tuple[str, str]] = []
764
+ _header_params: Dict[str, Optional[str]] = _headers or {}
765
+ _form_params: List[Tuple[str, str]] = []
766
+ _files: Dict[
767
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
768
+ ] = {}
769
+ _body_params: Optional[bytes] = None
770
+
771
+ # process the path parameters
772
+ # process the query parameters
773
+ # process the header parameters
774
+ # process the form parameters
775
+ # process the body parameter
776
+
777
+
778
+ # set the HTTP header `Accept`
779
+ if 'Accept' not in _header_params:
780
+ _header_params['Accept'] = self.api_client.select_header_accept(
781
+ [
782
+ 'application/json'
783
+ ]
784
+ )
785
+
786
+
787
+ # authentication setting
788
+ _auth_settings: List[str] = [
789
+ 'ApiKeyAuth'
790
+ ]
791
+
792
+ return self.api_client.param_serialize(
793
+ method='GET',
794
+ resource_path='/api/settings/api-tokens',
795
+ path_params=_path_params,
796
+ query_params=_query_params,
797
+ header_params=_header_params,
798
+ body=_body_params,
799
+ post_params=_form_params,
800
+ files=_files,
801
+ auth_settings=_auth_settings,
802
+ collection_formats=_collection_formats,
803
+ _host=_host,
804
+ _request_auth=_request_auth
805
+ )
806
+
807
+
808
+
809
+
810
+ @validate_call
811
+ def post_api_token(
812
+ self,
813
+ api_token: ApiToken,
814
+ _request_timeout: Union[
815
+ None,
816
+ Annotated[StrictFloat, Field(gt=0)],
817
+ Tuple[
818
+ Annotated[StrictFloat, Field(gt=0)],
819
+ Annotated[StrictFloat, Field(gt=0)]
820
+ ]
821
+ ] = None,
822
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
823
+ _content_type: Optional[StrictStr] = None,
824
+ _headers: Optional[Dict[StrictStr, Any]] = None,
825
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
826
+ ) -> ApiToken:
827
+ """Create an API token
828
+
829
+ Create an API Token on the Tenant-Unit. Each API Token entry also contains a set of permissions
830
+
831
+ :param api_token: (required)
832
+ :type api_token: ApiToken
833
+ :param _request_timeout: timeout setting for this request. If one
834
+ number provided, it will be total request
835
+ timeout. It can also be a pair (tuple) of
836
+ (connection, read) timeouts.
837
+ :type _request_timeout: int, tuple(int, int), optional
838
+ :param _request_auth: set to override the auth_settings for an a single
839
+ request; this effectively ignores the
840
+ authentication in the spec for a single request.
841
+ :type _request_auth: dict, optional
842
+ :param _content_type: force content-type for the request.
843
+ :type _content_type: str, Optional
844
+ :param _headers: set to override the headers for a single
845
+ request; this effectively ignores the headers
846
+ in the spec for a single request.
847
+ :type _headers: dict, optional
848
+ :param _host_index: set to override the host_index for a single
849
+ request; this effectively ignores the host_index
850
+ in the spec for a single request.
851
+ :type _host_index: int, optional
852
+ :return: Returns the result object.
853
+ """ # noqa: E501
854
+
855
+ _param = self._post_api_token_serialize(
856
+ api_token=api_token,
857
+ _request_auth=_request_auth,
858
+ _content_type=_content_type,
859
+ _headers=_headers,
860
+ _host_index=_host_index
861
+ )
862
+
863
+ _response_types_map: Dict[str, Optional[str]] = {
864
+ '200': "ApiToken",
865
+ }
866
+ response_data = self.api_client.call_api(
867
+ *_param,
868
+ _request_timeout=_request_timeout
869
+ )
870
+ response_data.read()
871
+ return self.api_client.response_deserialize(
872
+ response_data=response_data,
873
+ response_types_map=_response_types_map,
874
+ ).data
875
+
876
+
877
+ @validate_call
878
+ def post_api_token_with_http_info(
879
+ self,
880
+ api_token: ApiToken,
881
+ _request_timeout: Union[
882
+ None,
883
+ Annotated[StrictFloat, Field(gt=0)],
884
+ Tuple[
885
+ Annotated[StrictFloat, Field(gt=0)],
886
+ Annotated[StrictFloat, Field(gt=0)]
887
+ ]
888
+ ] = None,
889
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
890
+ _content_type: Optional[StrictStr] = None,
891
+ _headers: Optional[Dict[StrictStr, Any]] = None,
892
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
893
+ ) -> ApiResponse[ApiToken]:
894
+ """Create an API token
895
+
896
+ Create an API Token on the Tenant-Unit. Each API Token entry also contains a set of permissions
897
+
898
+ :param api_token: (required)
899
+ :type api_token: ApiToken
900
+ :param _request_timeout: timeout setting for this request. If one
901
+ number provided, it will be total request
902
+ timeout. It can also be a pair (tuple) of
903
+ (connection, read) timeouts.
904
+ :type _request_timeout: int, tuple(int, int), optional
905
+ :param _request_auth: set to override the auth_settings for an a single
906
+ request; this effectively ignores the
907
+ authentication in the spec for a single request.
908
+ :type _request_auth: dict, optional
909
+ :param _content_type: force content-type for the request.
910
+ :type _content_type: str, Optional
911
+ :param _headers: set to override the headers for a single
912
+ request; this effectively ignores the headers
913
+ in the spec for a single request.
914
+ :type _headers: dict, optional
915
+ :param _host_index: set to override the host_index for a single
916
+ request; this effectively ignores the host_index
917
+ in the spec for a single request.
918
+ :type _host_index: int, optional
919
+ :return: Returns the result object.
920
+ """ # noqa: E501
921
+
922
+ _param = self._post_api_token_serialize(
923
+ api_token=api_token,
924
+ _request_auth=_request_auth,
925
+ _content_type=_content_type,
926
+ _headers=_headers,
927
+ _host_index=_host_index
928
+ )
929
+
930
+ _response_types_map: Dict[str, Optional[str]] = {
931
+ '200': "ApiToken",
932
+ }
933
+ response_data = self.api_client.call_api(
934
+ *_param,
935
+ _request_timeout=_request_timeout
936
+ )
937
+ response_data.read()
938
+ return self.api_client.response_deserialize(
939
+ response_data=response_data,
940
+ response_types_map=_response_types_map,
941
+ )
942
+
943
+
944
+ @validate_call
945
+ def post_api_token_without_preload_content(
946
+ self,
947
+ api_token: ApiToken,
948
+ _request_timeout: Union[
949
+ None,
950
+ Annotated[StrictFloat, Field(gt=0)],
951
+ Tuple[
952
+ Annotated[StrictFloat, Field(gt=0)],
953
+ Annotated[StrictFloat, Field(gt=0)]
954
+ ]
955
+ ] = None,
956
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
957
+ _content_type: Optional[StrictStr] = None,
958
+ _headers: Optional[Dict[StrictStr, Any]] = None,
959
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
960
+ ) -> RESTResponseType:
961
+ """Create an API token
962
+
963
+ Create an API Token on the Tenant-Unit. Each API Token entry also contains a set of permissions
964
+
965
+ :param api_token: (required)
966
+ :type api_token: ApiToken
967
+ :param _request_timeout: timeout setting for this request. If one
968
+ number provided, it will be total request
969
+ timeout. It can also be a pair (tuple) of
970
+ (connection, read) timeouts.
971
+ :type _request_timeout: int, tuple(int, int), optional
972
+ :param _request_auth: set to override the auth_settings for an a single
973
+ request; this effectively ignores the
974
+ authentication in the spec for a single request.
975
+ :type _request_auth: dict, optional
976
+ :param _content_type: force content-type for the request.
977
+ :type _content_type: str, Optional
978
+ :param _headers: set to override the headers for a single
979
+ request; this effectively ignores the headers
980
+ in the spec for a single request.
981
+ :type _headers: dict, optional
982
+ :param _host_index: set to override the host_index for a single
983
+ request; this effectively ignores the host_index
984
+ in the spec for a single request.
985
+ :type _host_index: int, optional
986
+ :return: Returns the result object.
987
+ """ # noqa: E501
988
+
989
+ _param = self._post_api_token_serialize(
990
+ api_token=api_token,
991
+ _request_auth=_request_auth,
992
+ _content_type=_content_type,
993
+ _headers=_headers,
994
+ _host_index=_host_index
995
+ )
996
+
997
+ _response_types_map: Dict[str, Optional[str]] = {
998
+ '200': "ApiToken",
999
+ }
1000
+ response_data = self.api_client.call_api(
1001
+ *_param,
1002
+ _request_timeout=_request_timeout
1003
+ )
1004
+ return response_data.response
1005
+
1006
+
1007
+ def _post_api_token_serialize(
1008
+ self,
1009
+ api_token,
1010
+ _request_auth,
1011
+ _content_type,
1012
+ _headers,
1013
+ _host_index,
1014
+ ) -> RequestSerialized:
1015
+
1016
+ _host = None
1017
+
1018
+ _collection_formats: Dict[str, str] = {
1019
+ }
1020
+
1021
+ _path_params: Dict[str, str] = {}
1022
+ _query_params: List[Tuple[str, str]] = []
1023
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1024
+ _form_params: List[Tuple[str, str]] = []
1025
+ _files: Dict[
1026
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1027
+ ] = {}
1028
+ _body_params: Optional[bytes] = None
1029
+
1030
+ # process the path parameters
1031
+ # process the query parameters
1032
+ # process the header parameters
1033
+ # process the form parameters
1034
+ # process the body parameter
1035
+ if api_token is not None:
1036
+ _body_params = api_token
1037
+
1038
+
1039
+ # set the HTTP header `Accept`
1040
+ if 'Accept' not in _header_params:
1041
+ _header_params['Accept'] = self.api_client.select_header_accept(
1042
+ [
1043
+ 'application/json'
1044
+ ]
1045
+ )
1046
+
1047
+ # set the HTTP header `Content-Type`
1048
+ if _content_type:
1049
+ _header_params['Content-Type'] = _content_type
1050
+ else:
1051
+ _default_content_type = (
1052
+ self.api_client.select_header_content_type(
1053
+ [
1054
+ 'application/json'
1055
+ ]
1056
+ )
1057
+ )
1058
+ if _default_content_type is not None:
1059
+ _header_params['Content-Type'] = _default_content_type
1060
+
1061
+ # authentication setting
1062
+ _auth_settings: List[str] = [
1063
+ 'ApiKeyAuth'
1064
+ ]
1065
+
1066
+ return self.api_client.param_serialize(
1067
+ method='POST',
1068
+ resource_path='/api/settings/api-tokens',
1069
+ path_params=_path_params,
1070
+ query_params=_query_params,
1071
+ header_params=_header_params,
1072
+ body=_body_params,
1073
+ post_params=_form_params,
1074
+ files=_files,
1075
+ auth_settings=_auth_settings,
1076
+ collection_formats=_collection_formats,
1077
+ _host=_host,
1078
+ _request_auth=_request_auth
1079
+ )
1080
+
1081
+
1082
+
1083
+
1084
+ @validate_call
1085
+ def put_api_token(
1086
+ self,
1087
+ internal_id: StrictStr,
1088
+ api_token: ApiToken,
1089
+ _request_timeout: Union[
1090
+ None,
1091
+ Annotated[StrictFloat, Field(gt=0)],
1092
+ Tuple[
1093
+ Annotated[StrictFloat, Field(gt=0)],
1094
+ Annotated[StrictFloat, Field(gt=0)]
1095
+ ]
1096
+ ] = None,
1097
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1098
+ _content_type: Optional[StrictStr] = None,
1099
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1100
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1101
+ ) -> ApiToken:
1102
+ """Create or update an API token
1103
+
1104
+ Update API Token- Change Token name and associated permissions
1105
+
1106
+ :param internal_id: (required)
1107
+ :type internal_id: str
1108
+ :param api_token: (required)
1109
+ :type api_token: ApiToken
1110
+ :param _request_timeout: timeout setting for this request. If one
1111
+ number provided, it will be total request
1112
+ timeout. It can also be a pair (tuple) of
1113
+ (connection, read) timeouts.
1114
+ :type _request_timeout: int, tuple(int, int), optional
1115
+ :param _request_auth: set to override the auth_settings for an a single
1116
+ request; this effectively ignores the
1117
+ authentication in the spec for a single request.
1118
+ :type _request_auth: dict, optional
1119
+ :param _content_type: force content-type for the request.
1120
+ :type _content_type: str, Optional
1121
+ :param _headers: set to override the headers for a single
1122
+ request; this effectively ignores the headers
1123
+ in the spec for a single request.
1124
+ :type _headers: dict, optional
1125
+ :param _host_index: set to override the host_index for a single
1126
+ request; this effectively ignores the host_index
1127
+ in the spec for a single request.
1128
+ :type _host_index: int, optional
1129
+ :return: Returns the result object.
1130
+ """ # noqa: E501
1131
+
1132
+ _param = self._put_api_token_serialize(
1133
+ internal_id=internal_id,
1134
+ api_token=api_token,
1135
+ _request_auth=_request_auth,
1136
+ _content_type=_content_type,
1137
+ _headers=_headers,
1138
+ _host_index=_host_index
1139
+ )
1140
+
1141
+ _response_types_map: Dict[str, Optional[str]] = {
1142
+ '200': "ApiToken",
1143
+ }
1144
+ response_data = self.api_client.call_api(
1145
+ *_param,
1146
+ _request_timeout=_request_timeout
1147
+ )
1148
+ response_data.read()
1149
+ return self.api_client.response_deserialize(
1150
+ response_data=response_data,
1151
+ response_types_map=_response_types_map,
1152
+ ).data
1153
+
1154
+
1155
+ @validate_call
1156
+ def put_api_token_with_http_info(
1157
+ self,
1158
+ internal_id: StrictStr,
1159
+ api_token: ApiToken,
1160
+ _request_timeout: Union[
1161
+ None,
1162
+ Annotated[StrictFloat, Field(gt=0)],
1163
+ Tuple[
1164
+ Annotated[StrictFloat, Field(gt=0)],
1165
+ Annotated[StrictFloat, Field(gt=0)]
1166
+ ]
1167
+ ] = None,
1168
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1169
+ _content_type: Optional[StrictStr] = None,
1170
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1171
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1172
+ ) -> ApiResponse[ApiToken]:
1173
+ """Create or update an API token
1174
+
1175
+ Update API Token- Change Token name and associated permissions
1176
+
1177
+ :param internal_id: (required)
1178
+ :type internal_id: str
1179
+ :param api_token: (required)
1180
+ :type api_token: ApiToken
1181
+ :param _request_timeout: timeout setting for this request. If one
1182
+ number provided, it will be total request
1183
+ timeout. It can also be a pair (tuple) of
1184
+ (connection, read) timeouts.
1185
+ :type _request_timeout: int, tuple(int, int), optional
1186
+ :param _request_auth: set to override the auth_settings for an a single
1187
+ request; this effectively ignores the
1188
+ authentication in the spec for a single request.
1189
+ :type _request_auth: dict, optional
1190
+ :param _content_type: force content-type for the request.
1191
+ :type _content_type: str, Optional
1192
+ :param _headers: set to override the headers for a single
1193
+ request; this effectively ignores the headers
1194
+ in the spec for a single request.
1195
+ :type _headers: dict, optional
1196
+ :param _host_index: set to override the host_index for a single
1197
+ request; this effectively ignores the host_index
1198
+ in the spec for a single request.
1199
+ :type _host_index: int, optional
1200
+ :return: Returns the result object.
1201
+ """ # noqa: E501
1202
+
1203
+ _param = self._put_api_token_serialize(
1204
+ internal_id=internal_id,
1205
+ api_token=api_token,
1206
+ _request_auth=_request_auth,
1207
+ _content_type=_content_type,
1208
+ _headers=_headers,
1209
+ _host_index=_host_index
1210
+ )
1211
+
1212
+ _response_types_map: Dict[str, Optional[str]] = {
1213
+ '200': "ApiToken",
1214
+ }
1215
+ response_data = self.api_client.call_api(
1216
+ *_param,
1217
+ _request_timeout=_request_timeout
1218
+ )
1219
+ response_data.read()
1220
+ return self.api_client.response_deserialize(
1221
+ response_data=response_data,
1222
+ response_types_map=_response_types_map,
1223
+ )
1224
+
1225
+
1226
+ @validate_call
1227
+ def put_api_token_without_preload_content(
1228
+ self,
1229
+ internal_id: StrictStr,
1230
+ api_token: ApiToken,
1231
+ _request_timeout: Union[
1232
+ None,
1233
+ Annotated[StrictFloat, Field(gt=0)],
1234
+ Tuple[
1235
+ Annotated[StrictFloat, Field(gt=0)],
1236
+ Annotated[StrictFloat, Field(gt=0)]
1237
+ ]
1238
+ ] = None,
1239
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1240
+ _content_type: Optional[StrictStr] = None,
1241
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1242
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1243
+ ) -> RESTResponseType:
1244
+ """Create or update an API token
1245
+
1246
+ Update API Token- Change Token name and associated permissions
1247
+
1248
+ :param internal_id: (required)
1249
+ :type internal_id: str
1250
+ :param api_token: (required)
1251
+ :type api_token: ApiToken
1252
+ :param _request_timeout: timeout setting for this request. If one
1253
+ number provided, it will be total request
1254
+ timeout. It can also be a pair (tuple) of
1255
+ (connection, read) timeouts.
1256
+ :type _request_timeout: int, tuple(int, int), optional
1257
+ :param _request_auth: set to override the auth_settings for an a single
1258
+ request; this effectively ignores the
1259
+ authentication in the spec for a single request.
1260
+ :type _request_auth: dict, optional
1261
+ :param _content_type: force content-type for the request.
1262
+ :type _content_type: str, Optional
1263
+ :param _headers: set to override the headers for a single
1264
+ request; this effectively ignores the headers
1265
+ in the spec for a single request.
1266
+ :type _headers: dict, optional
1267
+ :param _host_index: set to override the host_index for a single
1268
+ request; this effectively ignores the host_index
1269
+ in the spec for a single request.
1270
+ :type _host_index: int, optional
1271
+ :return: Returns the result object.
1272
+ """ # noqa: E501
1273
+
1274
+ _param = self._put_api_token_serialize(
1275
+ internal_id=internal_id,
1276
+ api_token=api_token,
1277
+ _request_auth=_request_auth,
1278
+ _content_type=_content_type,
1279
+ _headers=_headers,
1280
+ _host_index=_host_index
1281
+ )
1282
+
1283
+ _response_types_map: Dict[str, Optional[str]] = {
1284
+ '200': "ApiToken",
1285
+ }
1286
+ response_data = self.api_client.call_api(
1287
+ *_param,
1288
+ _request_timeout=_request_timeout
1289
+ )
1290
+ return response_data.response
1291
+
1292
+
1293
+ def _put_api_token_serialize(
1294
+ self,
1295
+ internal_id,
1296
+ api_token,
1297
+ _request_auth,
1298
+ _content_type,
1299
+ _headers,
1300
+ _host_index,
1301
+ ) -> RequestSerialized:
1302
+
1303
+ _host = None
1304
+
1305
+ _collection_formats: Dict[str, str] = {
1306
+ }
1307
+
1308
+ _path_params: Dict[str, str] = {}
1309
+ _query_params: List[Tuple[str, str]] = []
1310
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1311
+ _form_params: List[Tuple[str, str]] = []
1312
+ _files: Dict[
1313
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1314
+ ] = {}
1315
+ _body_params: Optional[bytes] = None
1316
+
1317
+ # process the path parameters
1318
+ if internal_id is not None:
1319
+ _path_params['internalId'] = internal_id
1320
+ # process the query parameters
1321
+ # process the header parameters
1322
+ # process the form parameters
1323
+ # process the body parameter
1324
+ if api_token is not None:
1325
+ _body_params = api_token
1326
+
1327
+
1328
+ # set the HTTP header `Accept`
1329
+ if 'Accept' not in _header_params:
1330
+ _header_params['Accept'] = self.api_client.select_header_accept(
1331
+ [
1332
+ 'application/json'
1333
+ ]
1334
+ )
1335
+
1336
+ # set the HTTP header `Content-Type`
1337
+ if _content_type:
1338
+ _header_params['Content-Type'] = _content_type
1339
+ else:
1340
+ _default_content_type = (
1341
+ self.api_client.select_header_content_type(
1342
+ [
1343
+ 'application/json'
1344
+ ]
1345
+ )
1346
+ )
1347
+ if _default_content_type is not None:
1348
+ _header_params['Content-Type'] = _default_content_type
1349
+
1350
+ # authentication setting
1351
+ _auth_settings: List[str] = [
1352
+ 'ApiKeyAuth'
1353
+ ]
1354
+
1355
+ return self.api_client.param_serialize(
1356
+ method='PUT',
1357
+ resource_path='/api/settings/api-tokens/{internalId}',
1358
+ path_params=_path_params,
1359
+ query_params=_query_params,
1360
+ header_params=_header_params,
1361
+ body=_body_params,
1362
+ post_params=_form_params,
1363
+ files=_files,
1364
+ auth_settings=_auth_settings,
1365
+ collection_formats=_collection_formats,
1366
+ _host=_host,
1367
+ _request_auth=_request_auth
1368
+ )
1369
+
1370
+