hotdata 0.0.1__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.
- hotdata/__init__.py +300 -0
- hotdata/api/__init__.py +20 -0
- hotdata/api/connection_types_api.py +549 -0
- hotdata/api/connections_api.py +2213 -0
- hotdata/api/datasets_api.py +1711 -0
- hotdata/api/embedding_providers_api.py +1380 -0
- hotdata/api/indexes_api.py +977 -0
- hotdata/api/information_schema_api.py +390 -0
- hotdata/api/jobs_api.py +619 -0
- hotdata/api/query_api.py +320 -0
- hotdata/api/query_runs_api.py +615 -0
- hotdata/api/refresh_api.py +317 -0
- hotdata/api/results_api.py +581 -0
- hotdata/api/saved_queries_api.py +2003 -0
- hotdata/api/secrets_api.py +1380 -0
- hotdata/api/uploads_api.py +595 -0
- hotdata/api/workspace_context_api.py +828 -0
- hotdata/api/workspaces_api.py +602 -0
- hotdata/api_client.py +806 -0
- hotdata/api_response.py +21 -0
- hotdata/configuration.py +620 -0
- hotdata/exceptions.py +219 -0
- hotdata/models/__init__.py +125 -0
- hotdata/models/api_error_detail.py +90 -0
- hotdata/models/api_error_response.py +92 -0
- hotdata/models/async_query_response.py +99 -0
- hotdata/models/boolean_profile_detail.py +91 -0
- hotdata/models/categorical_profile_detail.py +96 -0
- hotdata/models/category_value_info.py +96 -0
- hotdata/models/column_definition.py +140 -0
- hotdata/models/column_info.py +92 -0
- hotdata/models/column_profile_detail.py +180 -0
- hotdata/models/column_profile_detail_one_of.py +105 -0
- hotdata/models/column_profile_detail_one_of1.py +102 -0
- hotdata/models/column_profile_detail_one_of2.py +101 -0
- hotdata/models/column_profile_detail_one_of3.py +99 -0
- hotdata/models/column_profile_detail_one_of4.py +100 -0
- hotdata/models/column_profile_info.py +108 -0
- hotdata/models/column_type_spec.py +117 -0
- hotdata/models/connection_health_response.py +100 -0
- hotdata/models/connection_info.py +92 -0
- hotdata/models/connection_refresh_result.py +117 -0
- hotdata/models/connection_schema_error.py +90 -0
- hotdata/models/connection_type_detail.py +104 -0
- hotdata/models/connection_type_summary.py +90 -0
- hotdata/models/create_connection_request.py +108 -0
- hotdata/models/create_connection_response.py +105 -0
- hotdata/models/create_dataset_request.py +101 -0
- hotdata/models/create_dataset_response.py +99 -0
- hotdata/models/create_embedding_provider_request.py +111 -0
- hotdata/models/create_embedding_provider_response.py +102 -0
- hotdata/models/create_index_request.py +130 -0
- hotdata/models/create_saved_query_request.py +104 -0
- hotdata/models/create_secret_request.py +90 -0
- hotdata/models/create_secret_response.py +93 -0
- hotdata/models/create_workspace201_response.py +93 -0
- hotdata/models/create_workspace_request.py +90 -0
- hotdata/models/create_workspace_response.py +94 -0
- hotdata/models/dataset_source.py +180 -0
- hotdata/models/dataset_source_one_of.py +109 -0
- hotdata/models/dataset_source_one_of1.py +91 -0
- hotdata/models/dataset_summary.py +108 -0
- hotdata/models/dataset_version_summary.py +95 -0
- hotdata/models/discovery_status.py +39 -0
- hotdata/models/embedding_provider_response.py +108 -0
- hotdata/models/error.py +88 -0
- hotdata/models/execute_saved_query_request.py +93 -0
- hotdata/models/get_connection_response.py +97 -0
- hotdata/models/get_dataset_response.py +120 -0
- hotdata/models/get_result_response.py +126 -0
- hotdata/models/get_secret_response.py +93 -0
- hotdata/models/get_workspace_context_response.py +92 -0
- hotdata/models/index_info_response.py +107 -0
- hotdata/models/index_status.py +38 -0
- hotdata/models/information_schema_response.py +110 -0
- hotdata/models/inline_data.py +92 -0
- hotdata/models/inline_dataset_source.py +92 -0
- hotdata/models/job_result.py +152 -0
- hotdata/models/job_status.py +41 -0
- hotdata/models/job_status_response.py +124 -0
- hotdata/models/job_type.py +40 -0
- hotdata/models/list_connection_types_response.py +96 -0
- hotdata/models/list_connections_response.py +96 -0
- hotdata/models/list_dataset_versions_response.py +107 -0
- hotdata/models/list_datasets_response.py +105 -0
- hotdata/models/list_embedding_providers_response.py +96 -0
- hotdata/models/list_indexes_response.py +96 -0
- hotdata/models/list_jobs_response.py +96 -0
- hotdata/models/list_query_runs_response.py +110 -0
- hotdata/models/list_results_response.py +105 -0
- hotdata/models/list_saved_queries_response.py +105 -0
- hotdata/models/list_saved_query_versions_response.py +107 -0
- hotdata/models/list_secrets_response.py +96 -0
- hotdata/models/list_uploads_response.py +96 -0
- hotdata/models/list_workspace_contexts_response.py +96 -0
- hotdata/models/list_workspaces200_response.py +97 -0
- hotdata/models/list_workspaces_response.py +98 -0
- hotdata/models/numeric_profile_detail.py +92 -0
- hotdata/models/query_request.py +98 -0
- hotdata/models/query_response.py +113 -0
- hotdata/models/query_run_info.py +176 -0
- hotdata/models/refresh_dataset_response.py +95 -0
- hotdata/models/refresh_request.py +120 -0
- hotdata/models/refresh_response.py +180 -0
- hotdata/models/refresh_warning.py +102 -0
- hotdata/models/result_info.py +100 -0
- hotdata/models/saved_query_dataset_source.py +95 -0
- hotdata/models/saved_query_detail.py +168 -0
- hotdata/models/saved_query_summary.py +101 -0
- hotdata/models/saved_query_version_info.py +158 -0
- hotdata/models/schema_refresh_result.py +107 -0
- hotdata/models/secret_metadata_response.py +93 -0
- hotdata/models/sql_query_dataset_source.py +102 -0
- hotdata/models/submit_job_response.py +93 -0
- hotdata/models/table_info.py +116 -0
- hotdata/models/table_profile_response.py +112 -0
- hotdata/models/table_refresh_error.py +92 -0
- hotdata/models/table_refresh_result.py +107 -0
- hotdata/models/temporal_profile_detail.py +90 -0
- hotdata/models/text_profile_detail.py +93 -0
- hotdata/models/update_dataset_request.py +107 -0
- hotdata/models/update_dataset_response.py +104 -0
- hotdata/models/update_embedding_provider_request.py +114 -0
- hotdata/models/update_embedding_provider_response.py +93 -0
- hotdata/models/update_saved_query_request.py +128 -0
- hotdata/models/update_secret_request.py +88 -0
- hotdata/models/update_secret_response.py +91 -0
- hotdata/models/upload_dataset_source.py +97 -0
- hotdata/models/upload_info.py +102 -0
- hotdata/models/upload_response.py +102 -0
- hotdata/models/upsert_workspace_context_request.py +90 -0
- hotdata/models/upsert_workspace_context_response.py +92 -0
- hotdata/models/url_dataset_source.py +97 -0
- hotdata/models/workspace_context_entry.py +93 -0
- hotdata/models/workspace_detail.py +94 -0
- hotdata/models/workspace_list_item.py +98 -0
- hotdata/py.typed +0 -0
- hotdata/rest.py +264 -0
- hotdata-0.0.1.dist-info/METADATA +93 -0
- hotdata-0.0.1.dist-info/RECORD +142 -0
- hotdata-0.0.1.dist-info/WHEEL +5 -0
- hotdata-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,2003 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Hotdata API
|
|
3
|
+
|
|
4
|
+
Powerful data platform API for datasets, queries, and analytics.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: developers@hotdata.dev
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
""" # noqa: E501
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field, StrictStr
|
|
20
|
+
from typing import Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from hotdata.models.create_saved_query_request import CreateSavedQueryRequest
|
|
23
|
+
from hotdata.models.execute_saved_query_request import ExecuteSavedQueryRequest
|
|
24
|
+
from hotdata.models.list_saved_queries_response import ListSavedQueriesResponse
|
|
25
|
+
from hotdata.models.list_saved_query_versions_response import ListSavedQueryVersionsResponse
|
|
26
|
+
from hotdata.models.query_response import QueryResponse
|
|
27
|
+
from hotdata.models.saved_query_detail import SavedQueryDetail
|
|
28
|
+
from hotdata.models.update_saved_query_request import UpdateSavedQueryRequest
|
|
29
|
+
|
|
30
|
+
from hotdata.api_client import ApiClient, RequestSerialized
|
|
31
|
+
from hotdata.api_response import ApiResponse
|
|
32
|
+
from hotdata.rest import RESTResponseType
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class SavedQueriesApi:
|
|
36
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
37
|
+
Ref: https://openapi-generator.tech
|
|
38
|
+
|
|
39
|
+
Do not edit the class manually.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
def __init__(self, api_client=None) -> None:
|
|
43
|
+
if api_client is None:
|
|
44
|
+
api_client = ApiClient.get_default()
|
|
45
|
+
self.api_client = api_client
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@validate_call
|
|
49
|
+
def create_saved_query(
|
|
50
|
+
self,
|
|
51
|
+
create_saved_query_request: CreateSavedQueryRequest,
|
|
52
|
+
_request_timeout: Union[
|
|
53
|
+
None,
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
55
|
+
Tuple[
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
57
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
58
|
+
]
|
|
59
|
+
] = None,
|
|
60
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
61
|
+
_content_type: Optional[StrictStr] = None,
|
|
62
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
63
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
64
|
+
) -> SavedQueryDetail:
|
|
65
|
+
"""Create saved query
|
|
66
|
+
|
|
67
|
+
Save a named SQL query. The SQL is stored as version 1 and automatically analyzed for classification metadata (category, table count, predicate/join/aggregation flags).
|
|
68
|
+
|
|
69
|
+
:param create_saved_query_request: (required)
|
|
70
|
+
:type create_saved_query_request: CreateSavedQueryRequest
|
|
71
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
72
|
+
number provided, it will be total request
|
|
73
|
+
timeout. It can also be a pair (tuple) of
|
|
74
|
+
(connection, read) timeouts.
|
|
75
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
76
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
77
|
+
request; this effectively ignores the
|
|
78
|
+
authentication in the spec for a single request.
|
|
79
|
+
:type _request_auth: dict, optional
|
|
80
|
+
:param _content_type: force content-type for the request.
|
|
81
|
+
:type _content_type: str, Optional
|
|
82
|
+
:param _headers: set to override the headers for a single
|
|
83
|
+
request; this effectively ignores the headers
|
|
84
|
+
in the spec for a single request.
|
|
85
|
+
:type _headers: dict, optional
|
|
86
|
+
:param _host_index: set to override the host_index for a single
|
|
87
|
+
request; this effectively ignores the host_index
|
|
88
|
+
in the spec for a single request.
|
|
89
|
+
:type _host_index: int, optional
|
|
90
|
+
:return: Returns the result object.
|
|
91
|
+
""" # noqa: E501
|
|
92
|
+
|
|
93
|
+
_param = self._create_saved_query_serialize(
|
|
94
|
+
create_saved_query_request=create_saved_query_request,
|
|
95
|
+
_request_auth=_request_auth,
|
|
96
|
+
_content_type=_content_type,
|
|
97
|
+
_headers=_headers,
|
|
98
|
+
_host_index=_host_index
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
102
|
+
'201': "SavedQueryDetail",
|
|
103
|
+
'400': "ApiErrorResponse",
|
|
104
|
+
}
|
|
105
|
+
response_data = self.api_client.call_api(
|
|
106
|
+
*_param,
|
|
107
|
+
_request_timeout=_request_timeout
|
|
108
|
+
)
|
|
109
|
+
response_data.read()
|
|
110
|
+
return self.api_client.response_deserialize(
|
|
111
|
+
response_data=response_data,
|
|
112
|
+
response_types_map=_response_types_map,
|
|
113
|
+
).data
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
@validate_call
|
|
117
|
+
def create_saved_query_with_http_info(
|
|
118
|
+
self,
|
|
119
|
+
create_saved_query_request: CreateSavedQueryRequest,
|
|
120
|
+
_request_timeout: Union[
|
|
121
|
+
None,
|
|
122
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
123
|
+
Tuple[
|
|
124
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
125
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
126
|
+
]
|
|
127
|
+
] = None,
|
|
128
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
129
|
+
_content_type: Optional[StrictStr] = None,
|
|
130
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
131
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
132
|
+
) -> ApiResponse[SavedQueryDetail]:
|
|
133
|
+
"""Create saved query
|
|
134
|
+
|
|
135
|
+
Save a named SQL query. The SQL is stored as version 1 and automatically analyzed for classification metadata (category, table count, predicate/join/aggregation flags).
|
|
136
|
+
|
|
137
|
+
:param create_saved_query_request: (required)
|
|
138
|
+
:type create_saved_query_request: CreateSavedQueryRequest
|
|
139
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
140
|
+
number provided, it will be total request
|
|
141
|
+
timeout. It can also be a pair (tuple) of
|
|
142
|
+
(connection, read) timeouts.
|
|
143
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
144
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
145
|
+
request; this effectively ignores the
|
|
146
|
+
authentication in the spec for a single request.
|
|
147
|
+
:type _request_auth: dict, optional
|
|
148
|
+
:param _content_type: force content-type for the request.
|
|
149
|
+
:type _content_type: str, Optional
|
|
150
|
+
:param _headers: set to override the headers for a single
|
|
151
|
+
request; this effectively ignores the headers
|
|
152
|
+
in the spec for a single request.
|
|
153
|
+
:type _headers: dict, optional
|
|
154
|
+
:param _host_index: set to override the host_index for a single
|
|
155
|
+
request; this effectively ignores the host_index
|
|
156
|
+
in the spec for a single request.
|
|
157
|
+
:type _host_index: int, optional
|
|
158
|
+
:return: Returns the result object.
|
|
159
|
+
""" # noqa: E501
|
|
160
|
+
|
|
161
|
+
_param = self._create_saved_query_serialize(
|
|
162
|
+
create_saved_query_request=create_saved_query_request,
|
|
163
|
+
_request_auth=_request_auth,
|
|
164
|
+
_content_type=_content_type,
|
|
165
|
+
_headers=_headers,
|
|
166
|
+
_host_index=_host_index
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
170
|
+
'201': "SavedQueryDetail",
|
|
171
|
+
'400': "ApiErrorResponse",
|
|
172
|
+
}
|
|
173
|
+
response_data = self.api_client.call_api(
|
|
174
|
+
*_param,
|
|
175
|
+
_request_timeout=_request_timeout
|
|
176
|
+
)
|
|
177
|
+
response_data.read()
|
|
178
|
+
return self.api_client.response_deserialize(
|
|
179
|
+
response_data=response_data,
|
|
180
|
+
response_types_map=_response_types_map,
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
@validate_call
|
|
185
|
+
def create_saved_query_without_preload_content(
|
|
186
|
+
self,
|
|
187
|
+
create_saved_query_request: CreateSavedQueryRequest,
|
|
188
|
+
_request_timeout: Union[
|
|
189
|
+
None,
|
|
190
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
191
|
+
Tuple[
|
|
192
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
193
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
194
|
+
]
|
|
195
|
+
] = None,
|
|
196
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
197
|
+
_content_type: Optional[StrictStr] = None,
|
|
198
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
199
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
200
|
+
) -> RESTResponseType:
|
|
201
|
+
"""Create saved query
|
|
202
|
+
|
|
203
|
+
Save a named SQL query. The SQL is stored as version 1 and automatically analyzed for classification metadata (category, table count, predicate/join/aggregation flags).
|
|
204
|
+
|
|
205
|
+
:param create_saved_query_request: (required)
|
|
206
|
+
:type create_saved_query_request: CreateSavedQueryRequest
|
|
207
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
208
|
+
number provided, it will be total request
|
|
209
|
+
timeout. It can also be a pair (tuple) of
|
|
210
|
+
(connection, read) timeouts.
|
|
211
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
212
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
213
|
+
request; this effectively ignores the
|
|
214
|
+
authentication in the spec for a single request.
|
|
215
|
+
:type _request_auth: dict, optional
|
|
216
|
+
:param _content_type: force content-type for the request.
|
|
217
|
+
:type _content_type: str, Optional
|
|
218
|
+
:param _headers: set to override the headers for a single
|
|
219
|
+
request; this effectively ignores the headers
|
|
220
|
+
in the spec for a single request.
|
|
221
|
+
:type _headers: dict, optional
|
|
222
|
+
:param _host_index: set to override the host_index for a single
|
|
223
|
+
request; this effectively ignores the host_index
|
|
224
|
+
in the spec for a single request.
|
|
225
|
+
:type _host_index: int, optional
|
|
226
|
+
:return: Returns the result object.
|
|
227
|
+
""" # noqa: E501
|
|
228
|
+
|
|
229
|
+
_param = self._create_saved_query_serialize(
|
|
230
|
+
create_saved_query_request=create_saved_query_request,
|
|
231
|
+
_request_auth=_request_auth,
|
|
232
|
+
_content_type=_content_type,
|
|
233
|
+
_headers=_headers,
|
|
234
|
+
_host_index=_host_index
|
|
235
|
+
)
|
|
236
|
+
|
|
237
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
238
|
+
'201': "SavedQueryDetail",
|
|
239
|
+
'400': "ApiErrorResponse",
|
|
240
|
+
}
|
|
241
|
+
response_data = self.api_client.call_api(
|
|
242
|
+
*_param,
|
|
243
|
+
_request_timeout=_request_timeout
|
|
244
|
+
)
|
|
245
|
+
return response_data.response
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
def _create_saved_query_serialize(
|
|
249
|
+
self,
|
|
250
|
+
create_saved_query_request,
|
|
251
|
+
_request_auth,
|
|
252
|
+
_content_type,
|
|
253
|
+
_headers,
|
|
254
|
+
_host_index,
|
|
255
|
+
) -> RequestSerialized:
|
|
256
|
+
|
|
257
|
+
_host = None
|
|
258
|
+
|
|
259
|
+
_collection_formats: Dict[str, str] = {
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
_path_params: Dict[str, str] = {}
|
|
263
|
+
_query_params: List[Tuple[str, str]] = []
|
|
264
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
265
|
+
_form_params: List[Tuple[str, str]] = []
|
|
266
|
+
_files: Dict[
|
|
267
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
268
|
+
] = {}
|
|
269
|
+
_body_params: Optional[bytes] = None
|
|
270
|
+
|
|
271
|
+
# process the path parameters
|
|
272
|
+
# process the query parameters
|
|
273
|
+
# process the header parameters
|
|
274
|
+
# process the form parameters
|
|
275
|
+
# process the body parameter
|
|
276
|
+
if create_saved_query_request is not None:
|
|
277
|
+
_body_params = create_saved_query_request
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
# set the HTTP header `Accept`
|
|
281
|
+
if 'Accept' not in _header_params:
|
|
282
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
283
|
+
[
|
|
284
|
+
'application/json'
|
|
285
|
+
]
|
|
286
|
+
)
|
|
287
|
+
|
|
288
|
+
# set the HTTP header `Content-Type`
|
|
289
|
+
if _content_type:
|
|
290
|
+
_header_params['Content-Type'] = _content_type
|
|
291
|
+
else:
|
|
292
|
+
_default_content_type = (
|
|
293
|
+
self.api_client.select_header_content_type(
|
|
294
|
+
[
|
|
295
|
+
'application/json'
|
|
296
|
+
]
|
|
297
|
+
)
|
|
298
|
+
)
|
|
299
|
+
if _default_content_type is not None:
|
|
300
|
+
_header_params['Content-Type'] = _default_content_type
|
|
301
|
+
|
|
302
|
+
# authentication setting
|
|
303
|
+
_auth_settings: List[str] = [
|
|
304
|
+
'BearerAuth'
|
|
305
|
+
]
|
|
306
|
+
|
|
307
|
+
return self.api_client.param_serialize(
|
|
308
|
+
method='POST',
|
|
309
|
+
resource_path='/v1/queries',
|
|
310
|
+
path_params=_path_params,
|
|
311
|
+
query_params=_query_params,
|
|
312
|
+
header_params=_header_params,
|
|
313
|
+
body=_body_params,
|
|
314
|
+
post_params=_form_params,
|
|
315
|
+
files=_files,
|
|
316
|
+
auth_settings=_auth_settings,
|
|
317
|
+
collection_formats=_collection_formats,
|
|
318
|
+
_host=_host,
|
|
319
|
+
_request_auth=_request_auth
|
|
320
|
+
)
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
@validate_call
|
|
326
|
+
def delete_saved_query(
|
|
327
|
+
self,
|
|
328
|
+
id: Annotated[StrictStr, Field(description="Saved query ID")],
|
|
329
|
+
_request_timeout: Union[
|
|
330
|
+
None,
|
|
331
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
332
|
+
Tuple[
|
|
333
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
334
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
335
|
+
]
|
|
336
|
+
] = None,
|
|
337
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
338
|
+
_content_type: Optional[StrictStr] = None,
|
|
339
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
340
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
341
|
+
) -> None:
|
|
342
|
+
"""Delete saved query
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
:param id: Saved query ID (required)
|
|
346
|
+
:type id: str
|
|
347
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
348
|
+
number provided, it will be total request
|
|
349
|
+
timeout. It can also be a pair (tuple) of
|
|
350
|
+
(connection, read) timeouts.
|
|
351
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
352
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
353
|
+
request; this effectively ignores the
|
|
354
|
+
authentication in the spec for a single request.
|
|
355
|
+
:type _request_auth: dict, optional
|
|
356
|
+
:param _content_type: force content-type for the request.
|
|
357
|
+
:type _content_type: str, Optional
|
|
358
|
+
:param _headers: set to override the headers for a single
|
|
359
|
+
request; this effectively ignores the headers
|
|
360
|
+
in the spec for a single request.
|
|
361
|
+
:type _headers: dict, optional
|
|
362
|
+
:param _host_index: set to override the host_index for a single
|
|
363
|
+
request; this effectively ignores the host_index
|
|
364
|
+
in the spec for a single request.
|
|
365
|
+
:type _host_index: int, optional
|
|
366
|
+
:return: Returns the result object.
|
|
367
|
+
""" # noqa: E501
|
|
368
|
+
|
|
369
|
+
_param = self._delete_saved_query_serialize(
|
|
370
|
+
id=id,
|
|
371
|
+
_request_auth=_request_auth,
|
|
372
|
+
_content_type=_content_type,
|
|
373
|
+
_headers=_headers,
|
|
374
|
+
_host_index=_host_index
|
|
375
|
+
)
|
|
376
|
+
|
|
377
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
378
|
+
'204': None,
|
|
379
|
+
'404': "ApiErrorResponse",
|
|
380
|
+
}
|
|
381
|
+
response_data = self.api_client.call_api(
|
|
382
|
+
*_param,
|
|
383
|
+
_request_timeout=_request_timeout
|
|
384
|
+
)
|
|
385
|
+
response_data.read()
|
|
386
|
+
return self.api_client.response_deserialize(
|
|
387
|
+
response_data=response_data,
|
|
388
|
+
response_types_map=_response_types_map,
|
|
389
|
+
).data
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
@validate_call
|
|
393
|
+
def delete_saved_query_with_http_info(
|
|
394
|
+
self,
|
|
395
|
+
id: Annotated[StrictStr, Field(description="Saved query ID")],
|
|
396
|
+
_request_timeout: Union[
|
|
397
|
+
None,
|
|
398
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
399
|
+
Tuple[
|
|
400
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
401
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
402
|
+
]
|
|
403
|
+
] = None,
|
|
404
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
405
|
+
_content_type: Optional[StrictStr] = None,
|
|
406
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
407
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
408
|
+
) -> ApiResponse[None]:
|
|
409
|
+
"""Delete saved query
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
:param id: Saved query ID (required)
|
|
413
|
+
:type id: str
|
|
414
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
415
|
+
number provided, it will be total request
|
|
416
|
+
timeout. It can also be a pair (tuple) of
|
|
417
|
+
(connection, read) timeouts.
|
|
418
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
419
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
420
|
+
request; this effectively ignores the
|
|
421
|
+
authentication in the spec for a single request.
|
|
422
|
+
:type _request_auth: dict, optional
|
|
423
|
+
:param _content_type: force content-type for the request.
|
|
424
|
+
:type _content_type: str, Optional
|
|
425
|
+
:param _headers: set to override the headers for a single
|
|
426
|
+
request; this effectively ignores the headers
|
|
427
|
+
in the spec for a single request.
|
|
428
|
+
:type _headers: dict, optional
|
|
429
|
+
:param _host_index: set to override the host_index for a single
|
|
430
|
+
request; this effectively ignores the host_index
|
|
431
|
+
in the spec for a single request.
|
|
432
|
+
:type _host_index: int, optional
|
|
433
|
+
:return: Returns the result object.
|
|
434
|
+
""" # noqa: E501
|
|
435
|
+
|
|
436
|
+
_param = self._delete_saved_query_serialize(
|
|
437
|
+
id=id,
|
|
438
|
+
_request_auth=_request_auth,
|
|
439
|
+
_content_type=_content_type,
|
|
440
|
+
_headers=_headers,
|
|
441
|
+
_host_index=_host_index
|
|
442
|
+
)
|
|
443
|
+
|
|
444
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
445
|
+
'204': None,
|
|
446
|
+
'404': "ApiErrorResponse",
|
|
447
|
+
}
|
|
448
|
+
response_data = self.api_client.call_api(
|
|
449
|
+
*_param,
|
|
450
|
+
_request_timeout=_request_timeout
|
|
451
|
+
)
|
|
452
|
+
response_data.read()
|
|
453
|
+
return self.api_client.response_deserialize(
|
|
454
|
+
response_data=response_data,
|
|
455
|
+
response_types_map=_response_types_map,
|
|
456
|
+
)
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
@validate_call
|
|
460
|
+
def delete_saved_query_without_preload_content(
|
|
461
|
+
self,
|
|
462
|
+
id: Annotated[StrictStr, Field(description="Saved query ID")],
|
|
463
|
+
_request_timeout: Union[
|
|
464
|
+
None,
|
|
465
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
466
|
+
Tuple[
|
|
467
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
468
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
469
|
+
]
|
|
470
|
+
] = None,
|
|
471
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
472
|
+
_content_type: Optional[StrictStr] = None,
|
|
473
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
474
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
475
|
+
) -> RESTResponseType:
|
|
476
|
+
"""Delete saved query
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
:param id: Saved query ID (required)
|
|
480
|
+
:type id: str
|
|
481
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
482
|
+
number provided, it will be total request
|
|
483
|
+
timeout. It can also be a pair (tuple) of
|
|
484
|
+
(connection, read) timeouts.
|
|
485
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
486
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
487
|
+
request; this effectively ignores the
|
|
488
|
+
authentication in the spec for a single request.
|
|
489
|
+
:type _request_auth: dict, optional
|
|
490
|
+
:param _content_type: force content-type for the request.
|
|
491
|
+
:type _content_type: str, Optional
|
|
492
|
+
:param _headers: set to override the headers for a single
|
|
493
|
+
request; this effectively ignores the headers
|
|
494
|
+
in the spec for a single request.
|
|
495
|
+
:type _headers: dict, optional
|
|
496
|
+
:param _host_index: set to override the host_index for a single
|
|
497
|
+
request; this effectively ignores the host_index
|
|
498
|
+
in the spec for a single request.
|
|
499
|
+
:type _host_index: int, optional
|
|
500
|
+
:return: Returns the result object.
|
|
501
|
+
""" # noqa: E501
|
|
502
|
+
|
|
503
|
+
_param = self._delete_saved_query_serialize(
|
|
504
|
+
id=id,
|
|
505
|
+
_request_auth=_request_auth,
|
|
506
|
+
_content_type=_content_type,
|
|
507
|
+
_headers=_headers,
|
|
508
|
+
_host_index=_host_index
|
|
509
|
+
)
|
|
510
|
+
|
|
511
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
512
|
+
'204': None,
|
|
513
|
+
'404': "ApiErrorResponse",
|
|
514
|
+
}
|
|
515
|
+
response_data = self.api_client.call_api(
|
|
516
|
+
*_param,
|
|
517
|
+
_request_timeout=_request_timeout
|
|
518
|
+
)
|
|
519
|
+
return response_data.response
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
def _delete_saved_query_serialize(
|
|
523
|
+
self,
|
|
524
|
+
id,
|
|
525
|
+
_request_auth,
|
|
526
|
+
_content_type,
|
|
527
|
+
_headers,
|
|
528
|
+
_host_index,
|
|
529
|
+
) -> RequestSerialized:
|
|
530
|
+
|
|
531
|
+
_host = None
|
|
532
|
+
|
|
533
|
+
_collection_formats: Dict[str, str] = {
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
_path_params: Dict[str, str] = {}
|
|
537
|
+
_query_params: List[Tuple[str, str]] = []
|
|
538
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
539
|
+
_form_params: List[Tuple[str, str]] = []
|
|
540
|
+
_files: Dict[
|
|
541
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
542
|
+
] = {}
|
|
543
|
+
_body_params: Optional[bytes] = None
|
|
544
|
+
|
|
545
|
+
# process the path parameters
|
|
546
|
+
if id is not None:
|
|
547
|
+
_path_params['id'] = id
|
|
548
|
+
# process the query parameters
|
|
549
|
+
# process the header parameters
|
|
550
|
+
# process the form parameters
|
|
551
|
+
# process the body parameter
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
# set the HTTP header `Accept`
|
|
555
|
+
if 'Accept' not in _header_params:
|
|
556
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
557
|
+
[
|
|
558
|
+
'application/json'
|
|
559
|
+
]
|
|
560
|
+
)
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
# authentication setting
|
|
564
|
+
_auth_settings: List[str] = [
|
|
565
|
+
'BearerAuth'
|
|
566
|
+
]
|
|
567
|
+
|
|
568
|
+
return self.api_client.param_serialize(
|
|
569
|
+
method='DELETE',
|
|
570
|
+
resource_path='/v1/queries/{id}',
|
|
571
|
+
path_params=_path_params,
|
|
572
|
+
query_params=_query_params,
|
|
573
|
+
header_params=_header_params,
|
|
574
|
+
body=_body_params,
|
|
575
|
+
post_params=_form_params,
|
|
576
|
+
files=_files,
|
|
577
|
+
auth_settings=_auth_settings,
|
|
578
|
+
collection_formats=_collection_formats,
|
|
579
|
+
_host=_host,
|
|
580
|
+
_request_auth=_request_auth
|
|
581
|
+
)
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
@validate_call
|
|
587
|
+
def execute_saved_query(
|
|
588
|
+
self,
|
|
589
|
+
id: Annotated[StrictStr, Field(description="Saved query ID")],
|
|
590
|
+
execute_saved_query_request: Annotated[Optional[ExecuteSavedQueryRequest], Field(description="Optional version to execute")] = None,
|
|
591
|
+
_request_timeout: Union[
|
|
592
|
+
None,
|
|
593
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
594
|
+
Tuple[
|
|
595
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
596
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
597
|
+
]
|
|
598
|
+
] = None,
|
|
599
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
600
|
+
_content_type: Optional[StrictStr] = None,
|
|
601
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
602
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
603
|
+
) -> QueryResponse:
|
|
604
|
+
"""Execute saved query
|
|
605
|
+
|
|
606
|
+
Execute a saved query. By default runs the latest version. Optionally specify a version number to execute a previous version. Returns the same response format as POST /v1/query.
|
|
607
|
+
|
|
608
|
+
:param id: Saved query ID (required)
|
|
609
|
+
:type id: str
|
|
610
|
+
:param execute_saved_query_request: Optional version to execute
|
|
611
|
+
:type execute_saved_query_request: ExecuteSavedQueryRequest
|
|
612
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
613
|
+
number provided, it will be total request
|
|
614
|
+
timeout. It can also be a pair (tuple) of
|
|
615
|
+
(connection, read) timeouts.
|
|
616
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
617
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
618
|
+
request; this effectively ignores the
|
|
619
|
+
authentication in the spec for a single request.
|
|
620
|
+
:type _request_auth: dict, optional
|
|
621
|
+
:param _content_type: force content-type for the request.
|
|
622
|
+
:type _content_type: str, Optional
|
|
623
|
+
:param _headers: set to override the headers for a single
|
|
624
|
+
request; this effectively ignores the headers
|
|
625
|
+
in the spec for a single request.
|
|
626
|
+
:type _headers: dict, optional
|
|
627
|
+
:param _host_index: set to override the host_index for a single
|
|
628
|
+
request; this effectively ignores the host_index
|
|
629
|
+
in the spec for a single request.
|
|
630
|
+
:type _host_index: int, optional
|
|
631
|
+
:return: Returns the result object.
|
|
632
|
+
""" # noqa: E501
|
|
633
|
+
|
|
634
|
+
_param = self._execute_saved_query_serialize(
|
|
635
|
+
id=id,
|
|
636
|
+
execute_saved_query_request=execute_saved_query_request,
|
|
637
|
+
_request_auth=_request_auth,
|
|
638
|
+
_content_type=_content_type,
|
|
639
|
+
_headers=_headers,
|
|
640
|
+
_host_index=_host_index
|
|
641
|
+
)
|
|
642
|
+
|
|
643
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
644
|
+
'200': "QueryResponse",
|
|
645
|
+
'404': "ApiErrorResponse",
|
|
646
|
+
}
|
|
647
|
+
response_data = self.api_client.call_api(
|
|
648
|
+
*_param,
|
|
649
|
+
_request_timeout=_request_timeout
|
|
650
|
+
)
|
|
651
|
+
response_data.read()
|
|
652
|
+
return self.api_client.response_deserialize(
|
|
653
|
+
response_data=response_data,
|
|
654
|
+
response_types_map=_response_types_map,
|
|
655
|
+
).data
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
@validate_call
|
|
659
|
+
def execute_saved_query_with_http_info(
|
|
660
|
+
self,
|
|
661
|
+
id: Annotated[StrictStr, Field(description="Saved query ID")],
|
|
662
|
+
execute_saved_query_request: Annotated[Optional[ExecuteSavedQueryRequest], Field(description="Optional version to execute")] = None,
|
|
663
|
+
_request_timeout: Union[
|
|
664
|
+
None,
|
|
665
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
666
|
+
Tuple[
|
|
667
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
668
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
669
|
+
]
|
|
670
|
+
] = None,
|
|
671
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
672
|
+
_content_type: Optional[StrictStr] = None,
|
|
673
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
674
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
675
|
+
) -> ApiResponse[QueryResponse]:
|
|
676
|
+
"""Execute saved query
|
|
677
|
+
|
|
678
|
+
Execute a saved query. By default runs the latest version. Optionally specify a version number to execute a previous version. Returns the same response format as POST /v1/query.
|
|
679
|
+
|
|
680
|
+
:param id: Saved query ID (required)
|
|
681
|
+
:type id: str
|
|
682
|
+
:param execute_saved_query_request: Optional version to execute
|
|
683
|
+
:type execute_saved_query_request: ExecuteSavedQueryRequest
|
|
684
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
685
|
+
number provided, it will be total request
|
|
686
|
+
timeout. It can also be a pair (tuple) of
|
|
687
|
+
(connection, read) timeouts.
|
|
688
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
689
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
690
|
+
request; this effectively ignores the
|
|
691
|
+
authentication in the spec for a single request.
|
|
692
|
+
:type _request_auth: dict, optional
|
|
693
|
+
:param _content_type: force content-type for the request.
|
|
694
|
+
:type _content_type: str, Optional
|
|
695
|
+
:param _headers: set to override the headers for a single
|
|
696
|
+
request; this effectively ignores the headers
|
|
697
|
+
in the spec for a single request.
|
|
698
|
+
:type _headers: dict, optional
|
|
699
|
+
:param _host_index: set to override the host_index for a single
|
|
700
|
+
request; this effectively ignores the host_index
|
|
701
|
+
in the spec for a single request.
|
|
702
|
+
:type _host_index: int, optional
|
|
703
|
+
:return: Returns the result object.
|
|
704
|
+
""" # noqa: E501
|
|
705
|
+
|
|
706
|
+
_param = self._execute_saved_query_serialize(
|
|
707
|
+
id=id,
|
|
708
|
+
execute_saved_query_request=execute_saved_query_request,
|
|
709
|
+
_request_auth=_request_auth,
|
|
710
|
+
_content_type=_content_type,
|
|
711
|
+
_headers=_headers,
|
|
712
|
+
_host_index=_host_index
|
|
713
|
+
)
|
|
714
|
+
|
|
715
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
716
|
+
'200': "QueryResponse",
|
|
717
|
+
'404': "ApiErrorResponse",
|
|
718
|
+
}
|
|
719
|
+
response_data = self.api_client.call_api(
|
|
720
|
+
*_param,
|
|
721
|
+
_request_timeout=_request_timeout
|
|
722
|
+
)
|
|
723
|
+
response_data.read()
|
|
724
|
+
return self.api_client.response_deserialize(
|
|
725
|
+
response_data=response_data,
|
|
726
|
+
response_types_map=_response_types_map,
|
|
727
|
+
)
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
@validate_call
|
|
731
|
+
def execute_saved_query_without_preload_content(
|
|
732
|
+
self,
|
|
733
|
+
id: Annotated[StrictStr, Field(description="Saved query ID")],
|
|
734
|
+
execute_saved_query_request: Annotated[Optional[ExecuteSavedQueryRequest], Field(description="Optional version to execute")] = None,
|
|
735
|
+
_request_timeout: Union[
|
|
736
|
+
None,
|
|
737
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
738
|
+
Tuple[
|
|
739
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
740
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
741
|
+
]
|
|
742
|
+
] = None,
|
|
743
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
744
|
+
_content_type: Optional[StrictStr] = None,
|
|
745
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
746
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
747
|
+
) -> RESTResponseType:
|
|
748
|
+
"""Execute saved query
|
|
749
|
+
|
|
750
|
+
Execute a saved query. By default runs the latest version. Optionally specify a version number to execute a previous version. Returns the same response format as POST /v1/query.
|
|
751
|
+
|
|
752
|
+
:param id: Saved query ID (required)
|
|
753
|
+
:type id: str
|
|
754
|
+
:param execute_saved_query_request: Optional version to execute
|
|
755
|
+
:type execute_saved_query_request: ExecuteSavedQueryRequest
|
|
756
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
757
|
+
number provided, it will be total request
|
|
758
|
+
timeout. It can also be a pair (tuple) of
|
|
759
|
+
(connection, read) timeouts.
|
|
760
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
761
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
762
|
+
request; this effectively ignores the
|
|
763
|
+
authentication in the spec for a single request.
|
|
764
|
+
:type _request_auth: dict, optional
|
|
765
|
+
:param _content_type: force content-type for the request.
|
|
766
|
+
:type _content_type: str, Optional
|
|
767
|
+
:param _headers: set to override the headers for a single
|
|
768
|
+
request; this effectively ignores the headers
|
|
769
|
+
in the spec for a single request.
|
|
770
|
+
:type _headers: dict, optional
|
|
771
|
+
:param _host_index: set to override the host_index for a single
|
|
772
|
+
request; this effectively ignores the host_index
|
|
773
|
+
in the spec for a single request.
|
|
774
|
+
:type _host_index: int, optional
|
|
775
|
+
:return: Returns the result object.
|
|
776
|
+
""" # noqa: E501
|
|
777
|
+
|
|
778
|
+
_param = self._execute_saved_query_serialize(
|
|
779
|
+
id=id,
|
|
780
|
+
execute_saved_query_request=execute_saved_query_request,
|
|
781
|
+
_request_auth=_request_auth,
|
|
782
|
+
_content_type=_content_type,
|
|
783
|
+
_headers=_headers,
|
|
784
|
+
_host_index=_host_index
|
|
785
|
+
)
|
|
786
|
+
|
|
787
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
788
|
+
'200': "QueryResponse",
|
|
789
|
+
'404': "ApiErrorResponse",
|
|
790
|
+
}
|
|
791
|
+
response_data = self.api_client.call_api(
|
|
792
|
+
*_param,
|
|
793
|
+
_request_timeout=_request_timeout
|
|
794
|
+
)
|
|
795
|
+
return response_data.response
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
def _execute_saved_query_serialize(
|
|
799
|
+
self,
|
|
800
|
+
id,
|
|
801
|
+
execute_saved_query_request,
|
|
802
|
+
_request_auth,
|
|
803
|
+
_content_type,
|
|
804
|
+
_headers,
|
|
805
|
+
_host_index,
|
|
806
|
+
) -> RequestSerialized:
|
|
807
|
+
|
|
808
|
+
_host = None
|
|
809
|
+
|
|
810
|
+
_collection_formats: Dict[str, str] = {
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
_path_params: Dict[str, str] = {}
|
|
814
|
+
_query_params: List[Tuple[str, str]] = []
|
|
815
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
816
|
+
_form_params: List[Tuple[str, str]] = []
|
|
817
|
+
_files: Dict[
|
|
818
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
819
|
+
] = {}
|
|
820
|
+
_body_params: Optional[bytes] = None
|
|
821
|
+
|
|
822
|
+
# process the path parameters
|
|
823
|
+
if id is not None:
|
|
824
|
+
_path_params['id'] = id
|
|
825
|
+
# process the query parameters
|
|
826
|
+
# process the header parameters
|
|
827
|
+
# process the form parameters
|
|
828
|
+
# process the body parameter
|
|
829
|
+
if execute_saved_query_request is not None:
|
|
830
|
+
_body_params = execute_saved_query_request
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
# set the HTTP header `Accept`
|
|
834
|
+
if 'Accept' not in _header_params:
|
|
835
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
836
|
+
[
|
|
837
|
+
'application/json'
|
|
838
|
+
]
|
|
839
|
+
)
|
|
840
|
+
|
|
841
|
+
# set the HTTP header `Content-Type`
|
|
842
|
+
if _content_type:
|
|
843
|
+
_header_params['Content-Type'] = _content_type
|
|
844
|
+
else:
|
|
845
|
+
_default_content_type = (
|
|
846
|
+
self.api_client.select_header_content_type(
|
|
847
|
+
[
|
|
848
|
+
'application/json'
|
|
849
|
+
]
|
|
850
|
+
)
|
|
851
|
+
)
|
|
852
|
+
if _default_content_type is not None:
|
|
853
|
+
_header_params['Content-Type'] = _default_content_type
|
|
854
|
+
|
|
855
|
+
# authentication setting
|
|
856
|
+
_auth_settings: List[str] = [
|
|
857
|
+
'BearerAuth'
|
|
858
|
+
]
|
|
859
|
+
|
|
860
|
+
return self.api_client.param_serialize(
|
|
861
|
+
method='POST',
|
|
862
|
+
resource_path='/v1/queries/{id}/execute',
|
|
863
|
+
path_params=_path_params,
|
|
864
|
+
query_params=_query_params,
|
|
865
|
+
header_params=_header_params,
|
|
866
|
+
body=_body_params,
|
|
867
|
+
post_params=_form_params,
|
|
868
|
+
files=_files,
|
|
869
|
+
auth_settings=_auth_settings,
|
|
870
|
+
collection_formats=_collection_formats,
|
|
871
|
+
_host=_host,
|
|
872
|
+
_request_auth=_request_auth
|
|
873
|
+
)
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
@validate_call
|
|
879
|
+
def get_saved_query(
|
|
880
|
+
self,
|
|
881
|
+
id: Annotated[StrictStr, Field(description="Saved query ID")],
|
|
882
|
+
_request_timeout: Union[
|
|
883
|
+
None,
|
|
884
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
885
|
+
Tuple[
|
|
886
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
887
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
888
|
+
]
|
|
889
|
+
] = None,
|
|
890
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
891
|
+
_content_type: Optional[StrictStr] = None,
|
|
892
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
893
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
894
|
+
) -> SavedQueryDetail:
|
|
895
|
+
"""Get saved query
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
:param id: Saved query ID (required)
|
|
899
|
+
:type id: str
|
|
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._get_saved_query_serialize(
|
|
923
|
+
id=id,
|
|
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': "SavedQueryDetail",
|
|
932
|
+
'404': "ApiErrorResponse",
|
|
933
|
+
}
|
|
934
|
+
response_data = self.api_client.call_api(
|
|
935
|
+
*_param,
|
|
936
|
+
_request_timeout=_request_timeout
|
|
937
|
+
)
|
|
938
|
+
response_data.read()
|
|
939
|
+
return self.api_client.response_deserialize(
|
|
940
|
+
response_data=response_data,
|
|
941
|
+
response_types_map=_response_types_map,
|
|
942
|
+
).data
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
@validate_call
|
|
946
|
+
def get_saved_query_with_http_info(
|
|
947
|
+
self,
|
|
948
|
+
id: Annotated[StrictStr, Field(description="Saved query ID")],
|
|
949
|
+
_request_timeout: Union[
|
|
950
|
+
None,
|
|
951
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
952
|
+
Tuple[
|
|
953
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
954
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
955
|
+
]
|
|
956
|
+
] = None,
|
|
957
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
958
|
+
_content_type: Optional[StrictStr] = None,
|
|
959
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
960
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
961
|
+
) -> ApiResponse[SavedQueryDetail]:
|
|
962
|
+
"""Get saved query
|
|
963
|
+
|
|
964
|
+
|
|
965
|
+
:param id: Saved query ID (required)
|
|
966
|
+
:type id: str
|
|
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._get_saved_query_serialize(
|
|
990
|
+
id=id,
|
|
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': "SavedQueryDetail",
|
|
999
|
+
'404': "ApiErrorResponse",
|
|
1000
|
+
}
|
|
1001
|
+
response_data = self.api_client.call_api(
|
|
1002
|
+
*_param,
|
|
1003
|
+
_request_timeout=_request_timeout
|
|
1004
|
+
)
|
|
1005
|
+
response_data.read()
|
|
1006
|
+
return self.api_client.response_deserialize(
|
|
1007
|
+
response_data=response_data,
|
|
1008
|
+
response_types_map=_response_types_map,
|
|
1009
|
+
)
|
|
1010
|
+
|
|
1011
|
+
|
|
1012
|
+
@validate_call
|
|
1013
|
+
def get_saved_query_without_preload_content(
|
|
1014
|
+
self,
|
|
1015
|
+
id: Annotated[StrictStr, Field(description="Saved query ID")],
|
|
1016
|
+
_request_timeout: Union[
|
|
1017
|
+
None,
|
|
1018
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1019
|
+
Tuple[
|
|
1020
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1021
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1022
|
+
]
|
|
1023
|
+
] = None,
|
|
1024
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1025
|
+
_content_type: Optional[StrictStr] = None,
|
|
1026
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1027
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1028
|
+
) -> RESTResponseType:
|
|
1029
|
+
"""Get saved query
|
|
1030
|
+
|
|
1031
|
+
|
|
1032
|
+
:param id: Saved query ID (required)
|
|
1033
|
+
:type id: str
|
|
1034
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1035
|
+
number provided, it will be total request
|
|
1036
|
+
timeout. It can also be a pair (tuple) of
|
|
1037
|
+
(connection, read) timeouts.
|
|
1038
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1039
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1040
|
+
request; this effectively ignores the
|
|
1041
|
+
authentication in the spec for a single request.
|
|
1042
|
+
:type _request_auth: dict, optional
|
|
1043
|
+
:param _content_type: force content-type for the request.
|
|
1044
|
+
:type _content_type: str, Optional
|
|
1045
|
+
:param _headers: set to override the headers for a single
|
|
1046
|
+
request; this effectively ignores the headers
|
|
1047
|
+
in the spec for a single request.
|
|
1048
|
+
:type _headers: dict, optional
|
|
1049
|
+
:param _host_index: set to override the host_index for a single
|
|
1050
|
+
request; this effectively ignores the host_index
|
|
1051
|
+
in the spec for a single request.
|
|
1052
|
+
:type _host_index: int, optional
|
|
1053
|
+
:return: Returns the result object.
|
|
1054
|
+
""" # noqa: E501
|
|
1055
|
+
|
|
1056
|
+
_param = self._get_saved_query_serialize(
|
|
1057
|
+
id=id,
|
|
1058
|
+
_request_auth=_request_auth,
|
|
1059
|
+
_content_type=_content_type,
|
|
1060
|
+
_headers=_headers,
|
|
1061
|
+
_host_index=_host_index
|
|
1062
|
+
)
|
|
1063
|
+
|
|
1064
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1065
|
+
'200': "SavedQueryDetail",
|
|
1066
|
+
'404': "ApiErrorResponse",
|
|
1067
|
+
}
|
|
1068
|
+
response_data = self.api_client.call_api(
|
|
1069
|
+
*_param,
|
|
1070
|
+
_request_timeout=_request_timeout
|
|
1071
|
+
)
|
|
1072
|
+
return response_data.response
|
|
1073
|
+
|
|
1074
|
+
|
|
1075
|
+
def _get_saved_query_serialize(
|
|
1076
|
+
self,
|
|
1077
|
+
id,
|
|
1078
|
+
_request_auth,
|
|
1079
|
+
_content_type,
|
|
1080
|
+
_headers,
|
|
1081
|
+
_host_index,
|
|
1082
|
+
) -> RequestSerialized:
|
|
1083
|
+
|
|
1084
|
+
_host = None
|
|
1085
|
+
|
|
1086
|
+
_collection_formats: Dict[str, str] = {
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
_path_params: Dict[str, str] = {}
|
|
1090
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1091
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1092
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1093
|
+
_files: Dict[
|
|
1094
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1095
|
+
] = {}
|
|
1096
|
+
_body_params: Optional[bytes] = None
|
|
1097
|
+
|
|
1098
|
+
# process the path parameters
|
|
1099
|
+
if id is not None:
|
|
1100
|
+
_path_params['id'] = id
|
|
1101
|
+
# process the query parameters
|
|
1102
|
+
# process the header parameters
|
|
1103
|
+
# process the form parameters
|
|
1104
|
+
# process the body parameter
|
|
1105
|
+
|
|
1106
|
+
|
|
1107
|
+
# set the HTTP header `Accept`
|
|
1108
|
+
if 'Accept' not in _header_params:
|
|
1109
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1110
|
+
[
|
|
1111
|
+
'application/json'
|
|
1112
|
+
]
|
|
1113
|
+
)
|
|
1114
|
+
|
|
1115
|
+
|
|
1116
|
+
# authentication setting
|
|
1117
|
+
_auth_settings: List[str] = [
|
|
1118
|
+
'BearerAuth'
|
|
1119
|
+
]
|
|
1120
|
+
|
|
1121
|
+
return self.api_client.param_serialize(
|
|
1122
|
+
method='GET',
|
|
1123
|
+
resource_path='/v1/queries/{id}',
|
|
1124
|
+
path_params=_path_params,
|
|
1125
|
+
query_params=_query_params,
|
|
1126
|
+
header_params=_header_params,
|
|
1127
|
+
body=_body_params,
|
|
1128
|
+
post_params=_form_params,
|
|
1129
|
+
files=_files,
|
|
1130
|
+
auth_settings=_auth_settings,
|
|
1131
|
+
collection_formats=_collection_formats,
|
|
1132
|
+
_host=_host,
|
|
1133
|
+
_request_auth=_request_auth
|
|
1134
|
+
)
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
@validate_call
|
|
1140
|
+
def list_saved_queries(
|
|
1141
|
+
self,
|
|
1142
|
+
limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Maximum number of results")] = None,
|
|
1143
|
+
offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset")] = None,
|
|
1144
|
+
_request_timeout: Union[
|
|
1145
|
+
None,
|
|
1146
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1147
|
+
Tuple[
|
|
1148
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1149
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1150
|
+
]
|
|
1151
|
+
] = None,
|
|
1152
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1153
|
+
_content_type: Optional[StrictStr] = None,
|
|
1154
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1155
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1156
|
+
) -> ListSavedQueriesResponse:
|
|
1157
|
+
"""List saved queries
|
|
1158
|
+
|
|
1159
|
+
|
|
1160
|
+
:param limit: Maximum number of results
|
|
1161
|
+
:type limit: int
|
|
1162
|
+
:param offset: Pagination offset
|
|
1163
|
+
:type offset: int
|
|
1164
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1165
|
+
number provided, it will be total request
|
|
1166
|
+
timeout. It can also be a pair (tuple) of
|
|
1167
|
+
(connection, read) timeouts.
|
|
1168
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1169
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1170
|
+
request; this effectively ignores the
|
|
1171
|
+
authentication in the spec for a single request.
|
|
1172
|
+
:type _request_auth: dict, optional
|
|
1173
|
+
:param _content_type: force content-type for the request.
|
|
1174
|
+
:type _content_type: str, Optional
|
|
1175
|
+
:param _headers: set to override the headers for a single
|
|
1176
|
+
request; this effectively ignores the headers
|
|
1177
|
+
in the spec for a single request.
|
|
1178
|
+
:type _headers: dict, optional
|
|
1179
|
+
:param _host_index: set to override the host_index for a single
|
|
1180
|
+
request; this effectively ignores the host_index
|
|
1181
|
+
in the spec for a single request.
|
|
1182
|
+
:type _host_index: int, optional
|
|
1183
|
+
:return: Returns the result object.
|
|
1184
|
+
""" # noqa: E501
|
|
1185
|
+
|
|
1186
|
+
_param = self._list_saved_queries_serialize(
|
|
1187
|
+
limit=limit,
|
|
1188
|
+
offset=offset,
|
|
1189
|
+
_request_auth=_request_auth,
|
|
1190
|
+
_content_type=_content_type,
|
|
1191
|
+
_headers=_headers,
|
|
1192
|
+
_host_index=_host_index
|
|
1193
|
+
)
|
|
1194
|
+
|
|
1195
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1196
|
+
'200': "ListSavedQueriesResponse",
|
|
1197
|
+
}
|
|
1198
|
+
response_data = self.api_client.call_api(
|
|
1199
|
+
*_param,
|
|
1200
|
+
_request_timeout=_request_timeout
|
|
1201
|
+
)
|
|
1202
|
+
response_data.read()
|
|
1203
|
+
return self.api_client.response_deserialize(
|
|
1204
|
+
response_data=response_data,
|
|
1205
|
+
response_types_map=_response_types_map,
|
|
1206
|
+
).data
|
|
1207
|
+
|
|
1208
|
+
|
|
1209
|
+
@validate_call
|
|
1210
|
+
def list_saved_queries_with_http_info(
|
|
1211
|
+
self,
|
|
1212
|
+
limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Maximum number of results")] = None,
|
|
1213
|
+
offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset")] = None,
|
|
1214
|
+
_request_timeout: Union[
|
|
1215
|
+
None,
|
|
1216
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1217
|
+
Tuple[
|
|
1218
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1219
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1220
|
+
]
|
|
1221
|
+
] = None,
|
|
1222
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1223
|
+
_content_type: Optional[StrictStr] = None,
|
|
1224
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1225
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1226
|
+
) -> ApiResponse[ListSavedQueriesResponse]:
|
|
1227
|
+
"""List saved queries
|
|
1228
|
+
|
|
1229
|
+
|
|
1230
|
+
:param limit: Maximum number of results
|
|
1231
|
+
:type limit: int
|
|
1232
|
+
:param offset: Pagination offset
|
|
1233
|
+
:type offset: int
|
|
1234
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1235
|
+
number provided, it will be total request
|
|
1236
|
+
timeout. It can also be a pair (tuple) of
|
|
1237
|
+
(connection, read) timeouts.
|
|
1238
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1239
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1240
|
+
request; this effectively ignores the
|
|
1241
|
+
authentication in the spec for a single request.
|
|
1242
|
+
:type _request_auth: dict, optional
|
|
1243
|
+
:param _content_type: force content-type for the request.
|
|
1244
|
+
:type _content_type: str, Optional
|
|
1245
|
+
:param _headers: set to override the headers for a single
|
|
1246
|
+
request; this effectively ignores the headers
|
|
1247
|
+
in the spec for a single request.
|
|
1248
|
+
:type _headers: dict, optional
|
|
1249
|
+
:param _host_index: set to override the host_index for a single
|
|
1250
|
+
request; this effectively ignores the host_index
|
|
1251
|
+
in the spec for a single request.
|
|
1252
|
+
:type _host_index: int, optional
|
|
1253
|
+
:return: Returns the result object.
|
|
1254
|
+
""" # noqa: E501
|
|
1255
|
+
|
|
1256
|
+
_param = self._list_saved_queries_serialize(
|
|
1257
|
+
limit=limit,
|
|
1258
|
+
offset=offset,
|
|
1259
|
+
_request_auth=_request_auth,
|
|
1260
|
+
_content_type=_content_type,
|
|
1261
|
+
_headers=_headers,
|
|
1262
|
+
_host_index=_host_index
|
|
1263
|
+
)
|
|
1264
|
+
|
|
1265
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1266
|
+
'200': "ListSavedQueriesResponse",
|
|
1267
|
+
}
|
|
1268
|
+
response_data = self.api_client.call_api(
|
|
1269
|
+
*_param,
|
|
1270
|
+
_request_timeout=_request_timeout
|
|
1271
|
+
)
|
|
1272
|
+
response_data.read()
|
|
1273
|
+
return self.api_client.response_deserialize(
|
|
1274
|
+
response_data=response_data,
|
|
1275
|
+
response_types_map=_response_types_map,
|
|
1276
|
+
)
|
|
1277
|
+
|
|
1278
|
+
|
|
1279
|
+
@validate_call
|
|
1280
|
+
def list_saved_queries_without_preload_content(
|
|
1281
|
+
self,
|
|
1282
|
+
limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Maximum number of results")] = None,
|
|
1283
|
+
offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset")] = None,
|
|
1284
|
+
_request_timeout: Union[
|
|
1285
|
+
None,
|
|
1286
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1287
|
+
Tuple[
|
|
1288
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1289
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1290
|
+
]
|
|
1291
|
+
] = None,
|
|
1292
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1293
|
+
_content_type: Optional[StrictStr] = None,
|
|
1294
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1295
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1296
|
+
) -> RESTResponseType:
|
|
1297
|
+
"""List saved queries
|
|
1298
|
+
|
|
1299
|
+
|
|
1300
|
+
:param limit: Maximum number of results
|
|
1301
|
+
:type limit: int
|
|
1302
|
+
:param offset: Pagination offset
|
|
1303
|
+
:type offset: int
|
|
1304
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1305
|
+
number provided, it will be total request
|
|
1306
|
+
timeout. It can also be a pair (tuple) of
|
|
1307
|
+
(connection, read) timeouts.
|
|
1308
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1309
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1310
|
+
request; this effectively ignores the
|
|
1311
|
+
authentication in the spec for a single request.
|
|
1312
|
+
:type _request_auth: dict, optional
|
|
1313
|
+
:param _content_type: force content-type for the request.
|
|
1314
|
+
:type _content_type: str, Optional
|
|
1315
|
+
:param _headers: set to override the headers for a single
|
|
1316
|
+
request; this effectively ignores the headers
|
|
1317
|
+
in the spec for a single request.
|
|
1318
|
+
:type _headers: dict, optional
|
|
1319
|
+
:param _host_index: set to override the host_index for a single
|
|
1320
|
+
request; this effectively ignores the host_index
|
|
1321
|
+
in the spec for a single request.
|
|
1322
|
+
:type _host_index: int, optional
|
|
1323
|
+
:return: Returns the result object.
|
|
1324
|
+
""" # noqa: E501
|
|
1325
|
+
|
|
1326
|
+
_param = self._list_saved_queries_serialize(
|
|
1327
|
+
limit=limit,
|
|
1328
|
+
offset=offset,
|
|
1329
|
+
_request_auth=_request_auth,
|
|
1330
|
+
_content_type=_content_type,
|
|
1331
|
+
_headers=_headers,
|
|
1332
|
+
_host_index=_host_index
|
|
1333
|
+
)
|
|
1334
|
+
|
|
1335
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1336
|
+
'200': "ListSavedQueriesResponse",
|
|
1337
|
+
}
|
|
1338
|
+
response_data = self.api_client.call_api(
|
|
1339
|
+
*_param,
|
|
1340
|
+
_request_timeout=_request_timeout
|
|
1341
|
+
)
|
|
1342
|
+
return response_data.response
|
|
1343
|
+
|
|
1344
|
+
|
|
1345
|
+
def _list_saved_queries_serialize(
|
|
1346
|
+
self,
|
|
1347
|
+
limit,
|
|
1348
|
+
offset,
|
|
1349
|
+
_request_auth,
|
|
1350
|
+
_content_type,
|
|
1351
|
+
_headers,
|
|
1352
|
+
_host_index,
|
|
1353
|
+
) -> RequestSerialized:
|
|
1354
|
+
|
|
1355
|
+
_host = None
|
|
1356
|
+
|
|
1357
|
+
_collection_formats: Dict[str, str] = {
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
_path_params: Dict[str, str] = {}
|
|
1361
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1362
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1363
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1364
|
+
_files: Dict[
|
|
1365
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1366
|
+
] = {}
|
|
1367
|
+
_body_params: Optional[bytes] = None
|
|
1368
|
+
|
|
1369
|
+
# process the path parameters
|
|
1370
|
+
# process the query parameters
|
|
1371
|
+
if limit is not None:
|
|
1372
|
+
|
|
1373
|
+
_query_params.append(('limit', limit))
|
|
1374
|
+
|
|
1375
|
+
if offset is not None:
|
|
1376
|
+
|
|
1377
|
+
_query_params.append(('offset', offset))
|
|
1378
|
+
|
|
1379
|
+
# process the header parameters
|
|
1380
|
+
# process the form parameters
|
|
1381
|
+
# process the body parameter
|
|
1382
|
+
|
|
1383
|
+
|
|
1384
|
+
# set the HTTP header `Accept`
|
|
1385
|
+
if 'Accept' not in _header_params:
|
|
1386
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1387
|
+
[
|
|
1388
|
+
'application/json'
|
|
1389
|
+
]
|
|
1390
|
+
)
|
|
1391
|
+
|
|
1392
|
+
|
|
1393
|
+
# authentication setting
|
|
1394
|
+
_auth_settings: List[str] = [
|
|
1395
|
+
'BearerAuth'
|
|
1396
|
+
]
|
|
1397
|
+
|
|
1398
|
+
return self.api_client.param_serialize(
|
|
1399
|
+
method='GET',
|
|
1400
|
+
resource_path='/v1/queries',
|
|
1401
|
+
path_params=_path_params,
|
|
1402
|
+
query_params=_query_params,
|
|
1403
|
+
header_params=_header_params,
|
|
1404
|
+
body=_body_params,
|
|
1405
|
+
post_params=_form_params,
|
|
1406
|
+
files=_files,
|
|
1407
|
+
auth_settings=_auth_settings,
|
|
1408
|
+
collection_formats=_collection_formats,
|
|
1409
|
+
_host=_host,
|
|
1410
|
+
_request_auth=_request_auth
|
|
1411
|
+
)
|
|
1412
|
+
|
|
1413
|
+
|
|
1414
|
+
|
|
1415
|
+
|
|
1416
|
+
@validate_call
|
|
1417
|
+
def list_saved_query_versions(
|
|
1418
|
+
self,
|
|
1419
|
+
id: Annotated[StrictStr, Field(description="Saved query ID")],
|
|
1420
|
+
limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Maximum number of versions")] = None,
|
|
1421
|
+
offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset")] = None,
|
|
1422
|
+
_request_timeout: Union[
|
|
1423
|
+
None,
|
|
1424
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1425
|
+
Tuple[
|
|
1426
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1427
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1428
|
+
]
|
|
1429
|
+
] = None,
|
|
1430
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1431
|
+
_content_type: Optional[StrictStr] = None,
|
|
1432
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1433
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1434
|
+
) -> ListSavedQueryVersionsResponse:
|
|
1435
|
+
"""List saved query versions
|
|
1436
|
+
|
|
1437
|
+
|
|
1438
|
+
:param id: Saved query ID (required)
|
|
1439
|
+
:type id: str
|
|
1440
|
+
:param limit: Maximum number of versions
|
|
1441
|
+
:type limit: int
|
|
1442
|
+
:param offset: Pagination offset
|
|
1443
|
+
:type offset: int
|
|
1444
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1445
|
+
number provided, it will be total request
|
|
1446
|
+
timeout. It can also be a pair (tuple) of
|
|
1447
|
+
(connection, read) timeouts.
|
|
1448
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1449
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1450
|
+
request; this effectively ignores the
|
|
1451
|
+
authentication in the spec for a single request.
|
|
1452
|
+
:type _request_auth: dict, optional
|
|
1453
|
+
:param _content_type: force content-type for the request.
|
|
1454
|
+
:type _content_type: str, Optional
|
|
1455
|
+
:param _headers: set to override the headers for a single
|
|
1456
|
+
request; this effectively ignores the headers
|
|
1457
|
+
in the spec for a single request.
|
|
1458
|
+
:type _headers: dict, optional
|
|
1459
|
+
:param _host_index: set to override the host_index for a single
|
|
1460
|
+
request; this effectively ignores the host_index
|
|
1461
|
+
in the spec for a single request.
|
|
1462
|
+
:type _host_index: int, optional
|
|
1463
|
+
:return: Returns the result object.
|
|
1464
|
+
""" # noqa: E501
|
|
1465
|
+
|
|
1466
|
+
_param = self._list_saved_query_versions_serialize(
|
|
1467
|
+
id=id,
|
|
1468
|
+
limit=limit,
|
|
1469
|
+
offset=offset,
|
|
1470
|
+
_request_auth=_request_auth,
|
|
1471
|
+
_content_type=_content_type,
|
|
1472
|
+
_headers=_headers,
|
|
1473
|
+
_host_index=_host_index
|
|
1474
|
+
)
|
|
1475
|
+
|
|
1476
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1477
|
+
'200': "ListSavedQueryVersionsResponse",
|
|
1478
|
+
'404': "ApiErrorResponse",
|
|
1479
|
+
}
|
|
1480
|
+
response_data = self.api_client.call_api(
|
|
1481
|
+
*_param,
|
|
1482
|
+
_request_timeout=_request_timeout
|
|
1483
|
+
)
|
|
1484
|
+
response_data.read()
|
|
1485
|
+
return self.api_client.response_deserialize(
|
|
1486
|
+
response_data=response_data,
|
|
1487
|
+
response_types_map=_response_types_map,
|
|
1488
|
+
).data
|
|
1489
|
+
|
|
1490
|
+
|
|
1491
|
+
@validate_call
|
|
1492
|
+
def list_saved_query_versions_with_http_info(
|
|
1493
|
+
self,
|
|
1494
|
+
id: Annotated[StrictStr, Field(description="Saved query ID")],
|
|
1495
|
+
limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Maximum number of versions")] = None,
|
|
1496
|
+
offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset")] = None,
|
|
1497
|
+
_request_timeout: Union[
|
|
1498
|
+
None,
|
|
1499
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1500
|
+
Tuple[
|
|
1501
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1502
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1503
|
+
]
|
|
1504
|
+
] = None,
|
|
1505
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1506
|
+
_content_type: Optional[StrictStr] = None,
|
|
1507
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1508
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1509
|
+
) -> ApiResponse[ListSavedQueryVersionsResponse]:
|
|
1510
|
+
"""List saved query versions
|
|
1511
|
+
|
|
1512
|
+
|
|
1513
|
+
:param id: Saved query ID (required)
|
|
1514
|
+
:type id: str
|
|
1515
|
+
:param limit: Maximum number of versions
|
|
1516
|
+
:type limit: int
|
|
1517
|
+
:param offset: Pagination offset
|
|
1518
|
+
:type offset: int
|
|
1519
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1520
|
+
number provided, it will be total request
|
|
1521
|
+
timeout. It can also be a pair (tuple) of
|
|
1522
|
+
(connection, read) timeouts.
|
|
1523
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1524
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1525
|
+
request; this effectively ignores the
|
|
1526
|
+
authentication in the spec for a single request.
|
|
1527
|
+
:type _request_auth: dict, optional
|
|
1528
|
+
:param _content_type: force content-type for the request.
|
|
1529
|
+
:type _content_type: str, Optional
|
|
1530
|
+
:param _headers: set to override the headers for a single
|
|
1531
|
+
request; this effectively ignores the headers
|
|
1532
|
+
in the spec for a single request.
|
|
1533
|
+
:type _headers: dict, optional
|
|
1534
|
+
:param _host_index: set to override the host_index for a single
|
|
1535
|
+
request; this effectively ignores the host_index
|
|
1536
|
+
in the spec for a single request.
|
|
1537
|
+
:type _host_index: int, optional
|
|
1538
|
+
:return: Returns the result object.
|
|
1539
|
+
""" # noqa: E501
|
|
1540
|
+
|
|
1541
|
+
_param = self._list_saved_query_versions_serialize(
|
|
1542
|
+
id=id,
|
|
1543
|
+
limit=limit,
|
|
1544
|
+
offset=offset,
|
|
1545
|
+
_request_auth=_request_auth,
|
|
1546
|
+
_content_type=_content_type,
|
|
1547
|
+
_headers=_headers,
|
|
1548
|
+
_host_index=_host_index
|
|
1549
|
+
)
|
|
1550
|
+
|
|
1551
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1552
|
+
'200': "ListSavedQueryVersionsResponse",
|
|
1553
|
+
'404': "ApiErrorResponse",
|
|
1554
|
+
}
|
|
1555
|
+
response_data = self.api_client.call_api(
|
|
1556
|
+
*_param,
|
|
1557
|
+
_request_timeout=_request_timeout
|
|
1558
|
+
)
|
|
1559
|
+
response_data.read()
|
|
1560
|
+
return self.api_client.response_deserialize(
|
|
1561
|
+
response_data=response_data,
|
|
1562
|
+
response_types_map=_response_types_map,
|
|
1563
|
+
)
|
|
1564
|
+
|
|
1565
|
+
|
|
1566
|
+
@validate_call
|
|
1567
|
+
def list_saved_query_versions_without_preload_content(
|
|
1568
|
+
self,
|
|
1569
|
+
id: Annotated[StrictStr, Field(description="Saved query ID")],
|
|
1570
|
+
limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Maximum number of versions")] = None,
|
|
1571
|
+
offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset")] = None,
|
|
1572
|
+
_request_timeout: Union[
|
|
1573
|
+
None,
|
|
1574
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1575
|
+
Tuple[
|
|
1576
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1577
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1578
|
+
]
|
|
1579
|
+
] = None,
|
|
1580
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1581
|
+
_content_type: Optional[StrictStr] = None,
|
|
1582
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1583
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1584
|
+
) -> RESTResponseType:
|
|
1585
|
+
"""List saved query versions
|
|
1586
|
+
|
|
1587
|
+
|
|
1588
|
+
:param id: Saved query ID (required)
|
|
1589
|
+
:type id: str
|
|
1590
|
+
:param limit: Maximum number of versions
|
|
1591
|
+
:type limit: int
|
|
1592
|
+
:param offset: Pagination offset
|
|
1593
|
+
:type offset: int
|
|
1594
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1595
|
+
number provided, it will be total request
|
|
1596
|
+
timeout. It can also be a pair (tuple) of
|
|
1597
|
+
(connection, read) timeouts.
|
|
1598
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1599
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1600
|
+
request; this effectively ignores the
|
|
1601
|
+
authentication in the spec for a single request.
|
|
1602
|
+
:type _request_auth: dict, optional
|
|
1603
|
+
:param _content_type: force content-type for the request.
|
|
1604
|
+
:type _content_type: str, Optional
|
|
1605
|
+
:param _headers: set to override the headers for a single
|
|
1606
|
+
request; this effectively ignores the headers
|
|
1607
|
+
in the spec for a single request.
|
|
1608
|
+
:type _headers: dict, optional
|
|
1609
|
+
:param _host_index: set to override the host_index for a single
|
|
1610
|
+
request; this effectively ignores the host_index
|
|
1611
|
+
in the spec for a single request.
|
|
1612
|
+
:type _host_index: int, optional
|
|
1613
|
+
:return: Returns the result object.
|
|
1614
|
+
""" # noqa: E501
|
|
1615
|
+
|
|
1616
|
+
_param = self._list_saved_query_versions_serialize(
|
|
1617
|
+
id=id,
|
|
1618
|
+
limit=limit,
|
|
1619
|
+
offset=offset,
|
|
1620
|
+
_request_auth=_request_auth,
|
|
1621
|
+
_content_type=_content_type,
|
|
1622
|
+
_headers=_headers,
|
|
1623
|
+
_host_index=_host_index
|
|
1624
|
+
)
|
|
1625
|
+
|
|
1626
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1627
|
+
'200': "ListSavedQueryVersionsResponse",
|
|
1628
|
+
'404': "ApiErrorResponse",
|
|
1629
|
+
}
|
|
1630
|
+
response_data = self.api_client.call_api(
|
|
1631
|
+
*_param,
|
|
1632
|
+
_request_timeout=_request_timeout
|
|
1633
|
+
)
|
|
1634
|
+
return response_data.response
|
|
1635
|
+
|
|
1636
|
+
|
|
1637
|
+
def _list_saved_query_versions_serialize(
|
|
1638
|
+
self,
|
|
1639
|
+
id,
|
|
1640
|
+
limit,
|
|
1641
|
+
offset,
|
|
1642
|
+
_request_auth,
|
|
1643
|
+
_content_type,
|
|
1644
|
+
_headers,
|
|
1645
|
+
_host_index,
|
|
1646
|
+
) -> RequestSerialized:
|
|
1647
|
+
|
|
1648
|
+
_host = None
|
|
1649
|
+
|
|
1650
|
+
_collection_formats: Dict[str, str] = {
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
_path_params: Dict[str, str] = {}
|
|
1654
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1655
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1656
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1657
|
+
_files: Dict[
|
|
1658
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1659
|
+
] = {}
|
|
1660
|
+
_body_params: Optional[bytes] = None
|
|
1661
|
+
|
|
1662
|
+
# process the path parameters
|
|
1663
|
+
if id is not None:
|
|
1664
|
+
_path_params['id'] = id
|
|
1665
|
+
# process the query parameters
|
|
1666
|
+
if limit is not None:
|
|
1667
|
+
|
|
1668
|
+
_query_params.append(('limit', limit))
|
|
1669
|
+
|
|
1670
|
+
if offset is not None:
|
|
1671
|
+
|
|
1672
|
+
_query_params.append(('offset', offset))
|
|
1673
|
+
|
|
1674
|
+
# process the header parameters
|
|
1675
|
+
# process the form parameters
|
|
1676
|
+
# process the body parameter
|
|
1677
|
+
|
|
1678
|
+
|
|
1679
|
+
# set the HTTP header `Accept`
|
|
1680
|
+
if 'Accept' not in _header_params:
|
|
1681
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1682
|
+
[
|
|
1683
|
+
'application/json'
|
|
1684
|
+
]
|
|
1685
|
+
)
|
|
1686
|
+
|
|
1687
|
+
|
|
1688
|
+
# authentication setting
|
|
1689
|
+
_auth_settings: List[str] = [
|
|
1690
|
+
'BearerAuth'
|
|
1691
|
+
]
|
|
1692
|
+
|
|
1693
|
+
return self.api_client.param_serialize(
|
|
1694
|
+
method='GET',
|
|
1695
|
+
resource_path='/v1/queries/{id}/versions',
|
|
1696
|
+
path_params=_path_params,
|
|
1697
|
+
query_params=_query_params,
|
|
1698
|
+
header_params=_header_params,
|
|
1699
|
+
body=_body_params,
|
|
1700
|
+
post_params=_form_params,
|
|
1701
|
+
files=_files,
|
|
1702
|
+
auth_settings=_auth_settings,
|
|
1703
|
+
collection_formats=_collection_formats,
|
|
1704
|
+
_host=_host,
|
|
1705
|
+
_request_auth=_request_auth
|
|
1706
|
+
)
|
|
1707
|
+
|
|
1708
|
+
|
|
1709
|
+
|
|
1710
|
+
|
|
1711
|
+
@validate_call
|
|
1712
|
+
def update_saved_query(
|
|
1713
|
+
self,
|
|
1714
|
+
id: Annotated[StrictStr, Field(description="Saved query ID")],
|
|
1715
|
+
update_saved_query_request: UpdateSavedQueryRequest,
|
|
1716
|
+
_request_timeout: Union[
|
|
1717
|
+
None,
|
|
1718
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1719
|
+
Tuple[
|
|
1720
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1721
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1722
|
+
]
|
|
1723
|
+
] = None,
|
|
1724
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1725
|
+
_content_type: Optional[StrictStr] = None,
|
|
1726
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1727
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1728
|
+
) -> SavedQueryDetail:
|
|
1729
|
+
"""Update saved query
|
|
1730
|
+
|
|
1731
|
+
Update a saved query. If the SQL changes, a new version is created (previous versions are preserved). Name, tags, description, and classification overrides can also be updated.
|
|
1732
|
+
|
|
1733
|
+
:param id: Saved query ID (required)
|
|
1734
|
+
:type id: str
|
|
1735
|
+
:param update_saved_query_request: (required)
|
|
1736
|
+
:type update_saved_query_request: UpdateSavedQueryRequest
|
|
1737
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1738
|
+
number provided, it will be total request
|
|
1739
|
+
timeout. It can also be a pair (tuple) of
|
|
1740
|
+
(connection, read) timeouts.
|
|
1741
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1742
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1743
|
+
request; this effectively ignores the
|
|
1744
|
+
authentication in the spec for a single request.
|
|
1745
|
+
:type _request_auth: dict, optional
|
|
1746
|
+
:param _content_type: force content-type for the request.
|
|
1747
|
+
:type _content_type: str, Optional
|
|
1748
|
+
:param _headers: set to override the headers for a single
|
|
1749
|
+
request; this effectively ignores the headers
|
|
1750
|
+
in the spec for a single request.
|
|
1751
|
+
:type _headers: dict, optional
|
|
1752
|
+
:param _host_index: set to override the host_index for a single
|
|
1753
|
+
request; this effectively ignores the host_index
|
|
1754
|
+
in the spec for a single request.
|
|
1755
|
+
:type _host_index: int, optional
|
|
1756
|
+
:return: Returns the result object.
|
|
1757
|
+
""" # noqa: E501
|
|
1758
|
+
|
|
1759
|
+
_param = self._update_saved_query_serialize(
|
|
1760
|
+
id=id,
|
|
1761
|
+
update_saved_query_request=update_saved_query_request,
|
|
1762
|
+
_request_auth=_request_auth,
|
|
1763
|
+
_content_type=_content_type,
|
|
1764
|
+
_headers=_headers,
|
|
1765
|
+
_host_index=_host_index
|
|
1766
|
+
)
|
|
1767
|
+
|
|
1768
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1769
|
+
'200': "SavedQueryDetail",
|
|
1770
|
+
'400': "ApiErrorResponse",
|
|
1771
|
+
'404': "ApiErrorResponse",
|
|
1772
|
+
}
|
|
1773
|
+
response_data = self.api_client.call_api(
|
|
1774
|
+
*_param,
|
|
1775
|
+
_request_timeout=_request_timeout
|
|
1776
|
+
)
|
|
1777
|
+
response_data.read()
|
|
1778
|
+
return self.api_client.response_deserialize(
|
|
1779
|
+
response_data=response_data,
|
|
1780
|
+
response_types_map=_response_types_map,
|
|
1781
|
+
).data
|
|
1782
|
+
|
|
1783
|
+
|
|
1784
|
+
@validate_call
|
|
1785
|
+
def update_saved_query_with_http_info(
|
|
1786
|
+
self,
|
|
1787
|
+
id: Annotated[StrictStr, Field(description="Saved query ID")],
|
|
1788
|
+
update_saved_query_request: UpdateSavedQueryRequest,
|
|
1789
|
+
_request_timeout: Union[
|
|
1790
|
+
None,
|
|
1791
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1792
|
+
Tuple[
|
|
1793
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1794
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1795
|
+
]
|
|
1796
|
+
] = None,
|
|
1797
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1798
|
+
_content_type: Optional[StrictStr] = None,
|
|
1799
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1800
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1801
|
+
) -> ApiResponse[SavedQueryDetail]:
|
|
1802
|
+
"""Update saved query
|
|
1803
|
+
|
|
1804
|
+
Update a saved query. If the SQL changes, a new version is created (previous versions are preserved). Name, tags, description, and classification overrides can also be updated.
|
|
1805
|
+
|
|
1806
|
+
:param id: Saved query ID (required)
|
|
1807
|
+
:type id: str
|
|
1808
|
+
:param update_saved_query_request: (required)
|
|
1809
|
+
:type update_saved_query_request: UpdateSavedQueryRequest
|
|
1810
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1811
|
+
number provided, it will be total request
|
|
1812
|
+
timeout. It can also be a pair (tuple) of
|
|
1813
|
+
(connection, read) timeouts.
|
|
1814
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1815
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1816
|
+
request; this effectively ignores the
|
|
1817
|
+
authentication in the spec for a single request.
|
|
1818
|
+
:type _request_auth: dict, optional
|
|
1819
|
+
:param _content_type: force content-type for the request.
|
|
1820
|
+
:type _content_type: str, Optional
|
|
1821
|
+
:param _headers: set to override the headers for a single
|
|
1822
|
+
request; this effectively ignores the headers
|
|
1823
|
+
in the spec for a single request.
|
|
1824
|
+
:type _headers: dict, optional
|
|
1825
|
+
:param _host_index: set to override the host_index for a single
|
|
1826
|
+
request; this effectively ignores the host_index
|
|
1827
|
+
in the spec for a single request.
|
|
1828
|
+
:type _host_index: int, optional
|
|
1829
|
+
:return: Returns the result object.
|
|
1830
|
+
""" # noqa: E501
|
|
1831
|
+
|
|
1832
|
+
_param = self._update_saved_query_serialize(
|
|
1833
|
+
id=id,
|
|
1834
|
+
update_saved_query_request=update_saved_query_request,
|
|
1835
|
+
_request_auth=_request_auth,
|
|
1836
|
+
_content_type=_content_type,
|
|
1837
|
+
_headers=_headers,
|
|
1838
|
+
_host_index=_host_index
|
|
1839
|
+
)
|
|
1840
|
+
|
|
1841
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1842
|
+
'200': "SavedQueryDetail",
|
|
1843
|
+
'400': "ApiErrorResponse",
|
|
1844
|
+
'404': "ApiErrorResponse",
|
|
1845
|
+
}
|
|
1846
|
+
response_data = self.api_client.call_api(
|
|
1847
|
+
*_param,
|
|
1848
|
+
_request_timeout=_request_timeout
|
|
1849
|
+
)
|
|
1850
|
+
response_data.read()
|
|
1851
|
+
return self.api_client.response_deserialize(
|
|
1852
|
+
response_data=response_data,
|
|
1853
|
+
response_types_map=_response_types_map,
|
|
1854
|
+
)
|
|
1855
|
+
|
|
1856
|
+
|
|
1857
|
+
@validate_call
|
|
1858
|
+
def update_saved_query_without_preload_content(
|
|
1859
|
+
self,
|
|
1860
|
+
id: Annotated[StrictStr, Field(description="Saved query ID")],
|
|
1861
|
+
update_saved_query_request: UpdateSavedQueryRequest,
|
|
1862
|
+
_request_timeout: Union[
|
|
1863
|
+
None,
|
|
1864
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1865
|
+
Tuple[
|
|
1866
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1867
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1868
|
+
]
|
|
1869
|
+
] = None,
|
|
1870
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1871
|
+
_content_type: Optional[StrictStr] = None,
|
|
1872
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1873
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1874
|
+
) -> RESTResponseType:
|
|
1875
|
+
"""Update saved query
|
|
1876
|
+
|
|
1877
|
+
Update a saved query. If the SQL changes, a new version is created (previous versions are preserved). Name, tags, description, and classification overrides can also be updated.
|
|
1878
|
+
|
|
1879
|
+
:param id: Saved query ID (required)
|
|
1880
|
+
:type id: str
|
|
1881
|
+
:param update_saved_query_request: (required)
|
|
1882
|
+
:type update_saved_query_request: UpdateSavedQueryRequest
|
|
1883
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1884
|
+
number provided, it will be total request
|
|
1885
|
+
timeout. It can also be a pair (tuple) of
|
|
1886
|
+
(connection, read) timeouts.
|
|
1887
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1888
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1889
|
+
request; this effectively ignores the
|
|
1890
|
+
authentication in the spec for a single request.
|
|
1891
|
+
:type _request_auth: dict, optional
|
|
1892
|
+
:param _content_type: force content-type for the request.
|
|
1893
|
+
:type _content_type: str, Optional
|
|
1894
|
+
:param _headers: set to override the headers for a single
|
|
1895
|
+
request; this effectively ignores the headers
|
|
1896
|
+
in the spec for a single request.
|
|
1897
|
+
:type _headers: dict, optional
|
|
1898
|
+
:param _host_index: set to override the host_index for a single
|
|
1899
|
+
request; this effectively ignores the host_index
|
|
1900
|
+
in the spec for a single request.
|
|
1901
|
+
:type _host_index: int, optional
|
|
1902
|
+
:return: Returns the result object.
|
|
1903
|
+
""" # noqa: E501
|
|
1904
|
+
|
|
1905
|
+
_param = self._update_saved_query_serialize(
|
|
1906
|
+
id=id,
|
|
1907
|
+
update_saved_query_request=update_saved_query_request,
|
|
1908
|
+
_request_auth=_request_auth,
|
|
1909
|
+
_content_type=_content_type,
|
|
1910
|
+
_headers=_headers,
|
|
1911
|
+
_host_index=_host_index
|
|
1912
|
+
)
|
|
1913
|
+
|
|
1914
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1915
|
+
'200': "SavedQueryDetail",
|
|
1916
|
+
'400': "ApiErrorResponse",
|
|
1917
|
+
'404': "ApiErrorResponse",
|
|
1918
|
+
}
|
|
1919
|
+
response_data = self.api_client.call_api(
|
|
1920
|
+
*_param,
|
|
1921
|
+
_request_timeout=_request_timeout
|
|
1922
|
+
)
|
|
1923
|
+
return response_data.response
|
|
1924
|
+
|
|
1925
|
+
|
|
1926
|
+
def _update_saved_query_serialize(
|
|
1927
|
+
self,
|
|
1928
|
+
id,
|
|
1929
|
+
update_saved_query_request,
|
|
1930
|
+
_request_auth,
|
|
1931
|
+
_content_type,
|
|
1932
|
+
_headers,
|
|
1933
|
+
_host_index,
|
|
1934
|
+
) -> RequestSerialized:
|
|
1935
|
+
|
|
1936
|
+
_host = None
|
|
1937
|
+
|
|
1938
|
+
_collection_formats: Dict[str, str] = {
|
|
1939
|
+
}
|
|
1940
|
+
|
|
1941
|
+
_path_params: Dict[str, str] = {}
|
|
1942
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1943
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1944
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1945
|
+
_files: Dict[
|
|
1946
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1947
|
+
] = {}
|
|
1948
|
+
_body_params: Optional[bytes] = None
|
|
1949
|
+
|
|
1950
|
+
# process the path parameters
|
|
1951
|
+
if id is not None:
|
|
1952
|
+
_path_params['id'] = id
|
|
1953
|
+
# process the query parameters
|
|
1954
|
+
# process the header parameters
|
|
1955
|
+
# process the form parameters
|
|
1956
|
+
# process the body parameter
|
|
1957
|
+
if update_saved_query_request is not None:
|
|
1958
|
+
_body_params = update_saved_query_request
|
|
1959
|
+
|
|
1960
|
+
|
|
1961
|
+
# set the HTTP header `Accept`
|
|
1962
|
+
if 'Accept' not in _header_params:
|
|
1963
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1964
|
+
[
|
|
1965
|
+
'application/json'
|
|
1966
|
+
]
|
|
1967
|
+
)
|
|
1968
|
+
|
|
1969
|
+
# set the HTTP header `Content-Type`
|
|
1970
|
+
if _content_type:
|
|
1971
|
+
_header_params['Content-Type'] = _content_type
|
|
1972
|
+
else:
|
|
1973
|
+
_default_content_type = (
|
|
1974
|
+
self.api_client.select_header_content_type(
|
|
1975
|
+
[
|
|
1976
|
+
'application/json'
|
|
1977
|
+
]
|
|
1978
|
+
)
|
|
1979
|
+
)
|
|
1980
|
+
if _default_content_type is not None:
|
|
1981
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1982
|
+
|
|
1983
|
+
# authentication setting
|
|
1984
|
+
_auth_settings: List[str] = [
|
|
1985
|
+
'BearerAuth'
|
|
1986
|
+
]
|
|
1987
|
+
|
|
1988
|
+
return self.api_client.param_serialize(
|
|
1989
|
+
method='PUT',
|
|
1990
|
+
resource_path='/v1/queries/{id}',
|
|
1991
|
+
path_params=_path_params,
|
|
1992
|
+
query_params=_query_params,
|
|
1993
|
+
header_params=_header_params,
|
|
1994
|
+
body=_body_params,
|
|
1995
|
+
post_params=_form_params,
|
|
1996
|
+
files=_files,
|
|
1997
|
+
auth_settings=_auth_settings,
|
|
1998
|
+
collection_formats=_collection_formats,
|
|
1999
|
+
_host=_host,
|
|
2000
|
+
_request_auth=_request_auth
|
|
2001
|
+
)
|
|
2002
|
+
|
|
2003
|
+
|