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
hotdata/api/jobs_api.py
ADDED
|
@@ -0,0 +1,619 @@
|
|
|
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.job_status_response import JobStatusResponse
|
|
23
|
+
from hotdata.models.job_type import JobType
|
|
24
|
+
from hotdata.models.list_jobs_response import ListJobsResponse
|
|
25
|
+
|
|
26
|
+
from hotdata.api_client import ApiClient, RequestSerialized
|
|
27
|
+
from hotdata.api_response import ApiResponse
|
|
28
|
+
from hotdata.rest import RESTResponseType
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class JobsApi:
|
|
32
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
33
|
+
Ref: https://openapi-generator.tech
|
|
34
|
+
|
|
35
|
+
Do not edit the class manually.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
def __init__(self, api_client=None) -> None:
|
|
39
|
+
if api_client is None:
|
|
40
|
+
api_client = ApiClient.get_default()
|
|
41
|
+
self.api_client = api_client
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@validate_call
|
|
45
|
+
def get_job(
|
|
46
|
+
self,
|
|
47
|
+
id: Annotated[StrictStr, Field(description="Job ID")],
|
|
48
|
+
_request_timeout: Union[
|
|
49
|
+
None,
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Tuple[
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
54
|
+
]
|
|
55
|
+
] = None,
|
|
56
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_content_type: Optional[StrictStr] = None,
|
|
58
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
60
|
+
) -> JobStatusResponse:
|
|
61
|
+
"""Get job status
|
|
62
|
+
|
|
63
|
+
Get the current status of a background job. Poll this endpoint to track job progress.
|
|
64
|
+
|
|
65
|
+
:param id: Job ID (required)
|
|
66
|
+
:type id: str
|
|
67
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
68
|
+
number provided, it will be total request
|
|
69
|
+
timeout. It can also be a pair (tuple) of
|
|
70
|
+
(connection, read) timeouts.
|
|
71
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
72
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
73
|
+
request; this effectively ignores the
|
|
74
|
+
authentication in the spec for a single request.
|
|
75
|
+
:type _request_auth: dict, optional
|
|
76
|
+
:param _content_type: force content-type for the request.
|
|
77
|
+
:type _content_type: str, Optional
|
|
78
|
+
:param _headers: set to override the headers for a single
|
|
79
|
+
request; this effectively ignores the headers
|
|
80
|
+
in the spec for a single request.
|
|
81
|
+
:type _headers: dict, optional
|
|
82
|
+
:param _host_index: set to override the host_index for a single
|
|
83
|
+
request; this effectively ignores the host_index
|
|
84
|
+
in the spec for a single request.
|
|
85
|
+
:type _host_index: int, optional
|
|
86
|
+
:return: Returns the result object.
|
|
87
|
+
""" # noqa: E501
|
|
88
|
+
|
|
89
|
+
_param = self._get_job_serialize(
|
|
90
|
+
id=id,
|
|
91
|
+
_request_auth=_request_auth,
|
|
92
|
+
_content_type=_content_type,
|
|
93
|
+
_headers=_headers,
|
|
94
|
+
_host_index=_host_index
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
98
|
+
'200': "JobStatusResponse",
|
|
99
|
+
'404': "ApiErrorResponse",
|
|
100
|
+
}
|
|
101
|
+
response_data = self.api_client.call_api(
|
|
102
|
+
*_param,
|
|
103
|
+
_request_timeout=_request_timeout
|
|
104
|
+
)
|
|
105
|
+
response_data.read()
|
|
106
|
+
return self.api_client.response_deserialize(
|
|
107
|
+
response_data=response_data,
|
|
108
|
+
response_types_map=_response_types_map,
|
|
109
|
+
).data
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
@validate_call
|
|
113
|
+
def get_job_with_http_info(
|
|
114
|
+
self,
|
|
115
|
+
id: Annotated[StrictStr, Field(description="Job ID")],
|
|
116
|
+
_request_timeout: Union[
|
|
117
|
+
None,
|
|
118
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
119
|
+
Tuple[
|
|
120
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
121
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
122
|
+
]
|
|
123
|
+
] = None,
|
|
124
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
125
|
+
_content_type: Optional[StrictStr] = None,
|
|
126
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
127
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
128
|
+
) -> ApiResponse[JobStatusResponse]:
|
|
129
|
+
"""Get job status
|
|
130
|
+
|
|
131
|
+
Get the current status of a background job. Poll this endpoint to track job progress.
|
|
132
|
+
|
|
133
|
+
:param id: Job ID (required)
|
|
134
|
+
:type id: str
|
|
135
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
136
|
+
number provided, it will be total request
|
|
137
|
+
timeout. It can also be a pair (tuple) of
|
|
138
|
+
(connection, read) timeouts.
|
|
139
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
140
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
141
|
+
request; this effectively ignores the
|
|
142
|
+
authentication in the spec for a single request.
|
|
143
|
+
:type _request_auth: dict, optional
|
|
144
|
+
:param _content_type: force content-type for the request.
|
|
145
|
+
:type _content_type: str, Optional
|
|
146
|
+
:param _headers: set to override the headers for a single
|
|
147
|
+
request; this effectively ignores the headers
|
|
148
|
+
in the spec for a single request.
|
|
149
|
+
:type _headers: dict, optional
|
|
150
|
+
:param _host_index: set to override the host_index for a single
|
|
151
|
+
request; this effectively ignores the host_index
|
|
152
|
+
in the spec for a single request.
|
|
153
|
+
:type _host_index: int, optional
|
|
154
|
+
:return: Returns the result object.
|
|
155
|
+
""" # noqa: E501
|
|
156
|
+
|
|
157
|
+
_param = self._get_job_serialize(
|
|
158
|
+
id=id,
|
|
159
|
+
_request_auth=_request_auth,
|
|
160
|
+
_content_type=_content_type,
|
|
161
|
+
_headers=_headers,
|
|
162
|
+
_host_index=_host_index
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
166
|
+
'200': "JobStatusResponse",
|
|
167
|
+
'404': "ApiErrorResponse",
|
|
168
|
+
}
|
|
169
|
+
response_data = self.api_client.call_api(
|
|
170
|
+
*_param,
|
|
171
|
+
_request_timeout=_request_timeout
|
|
172
|
+
)
|
|
173
|
+
response_data.read()
|
|
174
|
+
return self.api_client.response_deserialize(
|
|
175
|
+
response_data=response_data,
|
|
176
|
+
response_types_map=_response_types_map,
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
@validate_call
|
|
181
|
+
def get_job_without_preload_content(
|
|
182
|
+
self,
|
|
183
|
+
id: Annotated[StrictStr, Field(description="Job ID")],
|
|
184
|
+
_request_timeout: Union[
|
|
185
|
+
None,
|
|
186
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
187
|
+
Tuple[
|
|
188
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
189
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
190
|
+
]
|
|
191
|
+
] = None,
|
|
192
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
193
|
+
_content_type: Optional[StrictStr] = None,
|
|
194
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
195
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
196
|
+
) -> RESTResponseType:
|
|
197
|
+
"""Get job status
|
|
198
|
+
|
|
199
|
+
Get the current status of a background job. Poll this endpoint to track job progress.
|
|
200
|
+
|
|
201
|
+
:param id: Job ID (required)
|
|
202
|
+
:type id: str
|
|
203
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
204
|
+
number provided, it will be total request
|
|
205
|
+
timeout. It can also be a pair (tuple) of
|
|
206
|
+
(connection, read) timeouts.
|
|
207
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
208
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
209
|
+
request; this effectively ignores the
|
|
210
|
+
authentication in the spec for a single request.
|
|
211
|
+
:type _request_auth: dict, optional
|
|
212
|
+
:param _content_type: force content-type for the request.
|
|
213
|
+
:type _content_type: str, Optional
|
|
214
|
+
:param _headers: set to override the headers for a single
|
|
215
|
+
request; this effectively ignores the headers
|
|
216
|
+
in the spec for a single request.
|
|
217
|
+
:type _headers: dict, optional
|
|
218
|
+
:param _host_index: set to override the host_index for a single
|
|
219
|
+
request; this effectively ignores the host_index
|
|
220
|
+
in the spec for a single request.
|
|
221
|
+
:type _host_index: int, optional
|
|
222
|
+
:return: Returns the result object.
|
|
223
|
+
""" # noqa: E501
|
|
224
|
+
|
|
225
|
+
_param = self._get_job_serialize(
|
|
226
|
+
id=id,
|
|
227
|
+
_request_auth=_request_auth,
|
|
228
|
+
_content_type=_content_type,
|
|
229
|
+
_headers=_headers,
|
|
230
|
+
_host_index=_host_index
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
234
|
+
'200': "JobStatusResponse",
|
|
235
|
+
'404': "ApiErrorResponse",
|
|
236
|
+
}
|
|
237
|
+
response_data = self.api_client.call_api(
|
|
238
|
+
*_param,
|
|
239
|
+
_request_timeout=_request_timeout
|
|
240
|
+
)
|
|
241
|
+
return response_data.response
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
def _get_job_serialize(
|
|
245
|
+
self,
|
|
246
|
+
id,
|
|
247
|
+
_request_auth,
|
|
248
|
+
_content_type,
|
|
249
|
+
_headers,
|
|
250
|
+
_host_index,
|
|
251
|
+
) -> RequestSerialized:
|
|
252
|
+
|
|
253
|
+
_host = None
|
|
254
|
+
|
|
255
|
+
_collection_formats: Dict[str, str] = {
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
_path_params: Dict[str, str] = {}
|
|
259
|
+
_query_params: List[Tuple[str, str]] = []
|
|
260
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
261
|
+
_form_params: List[Tuple[str, str]] = []
|
|
262
|
+
_files: Dict[
|
|
263
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
264
|
+
] = {}
|
|
265
|
+
_body_params: Optional[bytes] = None
|
|
266
|
+
|
|
267
|
+
# process the path parameters
|
|
268
|
+
if id is not None:
|
|
269
|
+
_path_params['id'] = id
|
|
270
|
+
# process the query parameters
|
|
271
|
+
# process the header parameters
|
|
272
|
+
# process the form parameters
|
|
273
|
+
# process the body parameter
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
# set the HTTP header `Accept`
|
|
277
|
+
if 'Accept' not in _header_params:
|
|
278
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
279
|
+
[
|
|
280
|
+
'application/json'
|
|
281
|
+
]
|
|
282
|
+
)
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
# authentication setting
|
|
286
|
+
_auth_settings: List[str] = [
|
|
287
|
+
'BearerAuth'
|
|
288
|
+
]
|
|
289
|
+
|
|
290
|
+
return self.api_client.param_serialize(
|
|
291
|
+
method='GET',
|
|
292
|
+
resource_path='/v1/jobs/{id}',
|
|
293
|
+
path_params=_path_params,
|
|
294
|
+
query_params=_query_params,
|
|
295
|
+
header_params=_header_params,
|
|
296
|
+
body=_body_params,
|
|
297
|
+
post_params=_form_params,
|
|
298
|
+
files=_files,
|
|
299
|
+
auth_settings=_auth_settings,
|
|
300
|
+
collection_formats=_collection_formats,
|
|
301
|
+
_host=_host,
|
|
302
|
+
_request_auth=_request_auth
|
|
303
|
+
)
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
@validate_call
|
|
309
|
+
def list_jobs(
|
|
310
|
+
self,
|
|
311
|
+
job_type: Annotated[Optional[JobType], Field(description="Filter by job type")] = None,
|
|
312
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter by status (comma-separated, e.g. status=pending,running)")] = None,
|
|
313
|
+
limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Max results (default 50)")] = None,
|
|
314
|
+
offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Offset for pagination")] = None,
|
|
315
|
+
_request_timeout: Union[
|
|
316
|
+
None,
|
|
317
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
318
|
+
Tuple[
|
|
319
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
320
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
321
|
+
]
|
|
322
|
+
] = None,
|
|
323
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
324
|
+
_content_type: Optional[StrictStr] = None,
|
|
325
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
326
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
327
|
+
) -> ListJobsResponse:
|
|
328
|
+
"""List jobs
|
|
329
|
+
|
|
330
|
+
List background jobs with optional filters by type and status.
|
|
331
|
+
|
|
332
|
+
:param job_type: Filter by job type
|
|
333
|
+
:type job_type: JobType
|
|
334
|
+
:param status: Filter by status (comma-separated, e.g. status=pending,running)
|
|
335
|
+
:type status: str
|
|
336
|
+
:param limit: Max results (default 50)
|
|
337
|
+
:type limit: int
|
|
338
|
+
:param offset: Offset for pagination
|
|
339
|
+
:type offset: int
|
|
340
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
341
|
+
number provided, it will be total request
|
|
342
|
+
timeout. It can also be a pair (tuple) of
|
|
343
|
+
(connection, read) timeouts.
|
|
344
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
345
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
346
|
+
request; this effectively ignores the
|
|
347
|
+
authentication in the spec for a single request.
|
|
348
|
+
:type _request_auth: dict, optional
|
|
349
|
+
:param _content_type: force content-type for the request.
|
|
350
|
+
:type _content_type: str, Optional
|
|
351
|
+
:param _headers: set to override the headers for a single
|
|
352
|
+
request; this effectively ignores the headers
|
|
353
|
+
in the spec for a single request.
|
|
354
|
+
:type _headers: dict, optional
|
|
355
|
+
:param _host_index: set to override the host_index for a single
|
|
356
|
+
request; this effectively ignores the host_index
|
|
357
|
+
in the spec for a single request.
|
|
358
|
+
:type _host_index: int, optional
|
|
359
|
+
:return: Returns the result object.
|
|
360
|
+
""" # noqa: E501
|
|
361
|
+
|
|
362
|
+
_param = self._list_jobs_serialize(
|
|
363
|
+
job_type=job_type,
|
|
364
|
+
status=status,
|
|
365
|
+
limit=limit,
|
|
366
|
+
offset=offset,
|
|
367
|
+
_request_auth=_request_auth,
|
|
368
|
+
_content_type=_content_type,
|
|
369
|
+
_headers=_headers,
|
|
370
|
+
_host_index=_host_index
|
|
371
|
+
)
|
|
372
|
+
|
|
373
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
374
|
+
'200': "ListJobsResponse",
|
|
375
|
+
}
|
|
376
|
+
response_data = self.api_client.call_api(
|
|
377
|
+
*_param,
|
|
378
|
+
_request_timeout=_request_timeout
|
|
379
|
+
)
|
|
380
|
+
response_data.read()
|
|
381
|
+
return self.api_client.response_deserialize(
|
|
382
|
+
response_data=response_data,
|
|
383
|
+
response_types_map=_response_types_map,
|
|
384
|
+
).data
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
@validate_call
|
|
388
|
+
def list_jobs_with_http_info(
|
|
389
|
+
self,
|
|
390
|
+
job_type: Annotated[Optional[JobType], Field(description="Filter by job type")] = None,
|
|
391
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter by status (comma-separated, e.g. status=pending,running)")] = None,
|
|
392
|
+
limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Max results (default 50)")] = None,
|
|
393
|
+
offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Offset for pagination")] = None,
|
|
394
|
+
_request_timeout: Union[
|
|
395
|
+
None,
|
|
396
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
397
|
+
Tuple[
|
|
398
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
399
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
400
|
+
]
|
|
401
|
+
] = None,
|
|
402
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
403
|
+
_content_type: Optional[StrictStr] = None,
|
|
404
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
405
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
406
|
+
) -> ApiResponse[ListJobsResponse]:
|
|
407
|
+
"""List jobs
|
|
408
|
+
|
|
409
|
+
List background jobs with optional filters by type and status.
|
|
410
|
+
|
|
411
|
+
:param job_type: Filter by job type
|
|
412
|
+
:type job_type: JobType
|
|
413
|
+
:param status: Filter by status (comma-separated, e.g. status=pending,running)
|
|
414
|
+
:type status: str
|
|
415
|
+
:param limit: Max results (default 50)
|
|
416
|
+
:type limit: int
|
|
417
|
+
:param offset: Offset for pagination
|
|
418
|
+
:type offset: int
|
|
419
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
420
|
+
number provided, it will be total request
|
|
421
|
+
timeout. It can also be a pair (tuple) of
|
|
422
|
+
(connection, read) timeouts.
|
|
423
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
424
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
425
|
+
request; this effectively ignores the
|
|
426
|
+
authentication in the spec for a single request.
|
|
427
|
+
:type _request_auth: dict, optional
|
|
428
|
+
:param _content_type: force content-type for the request.
|
|
429
|
+
:type _content_type: str, Optional
|
|
430
|
+
:param _headers: set to override the headers for a single
|
|
431
|
+
request; this effectively ignores the headers
|
|
432
|
+
in the spec for a single request.
|
|
433
|
+
:type _headers: dict, optional
|
|
434
|
+
:param _host_index: set to override the host_index for a single
|
|
435
|
+
request; this effectively ignores the host_index
|
|
436
|
+
in the spec for a single request.
|
|
437
|
+
:type _host_index: int, optional
|
|
438
|
+
:return: Returns the result object.
|
|
439
|
+
""" # noqa: E501
|
|
440
|
+
|
|
441
|
+
_param = self._list_jobs_serialize(
|
|
442
|
+
job_type=job_type,
|
|
443
|
+
status=status,
|
|
444
|
+
limit=limit,
|
|
445
|
+
offset=offset,
|
|
446
|
+
_request_auth=_request_auth,
|
|
447
|
+
_content_type=_content_type,
|
|
448
|
+
_headers=_headers,
|
|
449
|
+
_host_index=_host_index
|
|
450
|
+
)
|
|
451
|
+
|
|
452
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
453
|
+
'200': "ListJobsResponse",
|
|
454
|
+
}
|
|
455
|
+
response_data = self.api_client.call_api(
|
|
456
|
+
*_param,
|
|
457
|
+
_request_timeout=_request_timeout
|
|
458
|
+
)
|
|
459
|
+
response_data.read()
|
|
460
|
+
return self.api_client.response_deserialize(
|
|
461
|
+
response_data=response_data,
|
|
462
|
+
response_types_map=_response_types_map,
|
|
463
|
+
)
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
@validate_call
|
|
467
|
+
def list_jobs_without_preload_content(
|
|
468
|
+
self,
|
|
469
|
+
job_type: Annotated[Optional[JobType], Field(description="Filter by job type")] = None,
|
|
470
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter by status (comma-separated, e.g. status=pending,running)")] = None,
|
|
471
|
+
limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Max results (default 50)")] = None,
|
|
472
|
+
offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Offset for pagination")] = None,
|
|
473
|
+
_request_timeout: Union[
|
|
474
|
+
None,
|
|
475
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
476
|
+
Tuple[
|
|
477
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
478
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
479
|
+
]
|
|
480
|
+
] = None,
|
|
481
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
482
|
+
_content_type: Optional[StrictStr] = None,
|
|
483
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
484
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
485
|
+
) -> RESTResponseType:
|
|
486
|
+
"""List jobs
|
|
487
|
+
|
|
488
|
+
List background jobs with optional filters by type and status.
|
|
489
|
+
|
|
490
|
+
:param job_type: Filter by job type
|
|
491
|
+
:type job_type: JobType
|
|
492
|
+
:param status: Filter by status (comma-separated, e.g. status=pending,running)
|
|
493
|
+
:type status: str
|
|
494
|
+
:param limit: Max results (default 50)
|
|
495
|
+
:type limit: int
|
|
496
|
+
:param offset: Offset for pagination
|
|
497
|
+
:type offset: int
|
|
498
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
499
|
+
number provided, it will be total request
|
|
500
|
+
timeout. It can also be a pair (tuple) of
|
|
501
|
+
(connection, read) timeouts.
|
|
502
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
503
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
504
|
+
request; this effectively ignores the
|
|
505
|
+
authentication in the spec for a single request.
|
|
506
|
+
:type _request_auth: dict, optional
|
|
507
|
+
:param _content_type: force content-type for the request.
|
|
508
|
+
:type _content_type: str, Optional
|
|
509
|
+
:param _headers: set to override the headers for a single
|
|
510
|
+
request; this effectively ignores the headers
|
|
511
|
+
in the spec for a single request.
|
|
512
|
+
:type _headers: dict, optional
|
|
513
|
+
:param _host_index: set to override the host_index for a single
|
|
514
|
+
request; this effectively ignores the host_index
|
|
515
|
+
in the spec for a single request.
|
|
516
|
+
:type _host_index: int, optional
|
|
517
|
+
:return: Returns the result object.
|
|
518
|
+
""" # noqa: E501
|
|
519
|
+
|
|
520
|
+
_param = self._list_jobs_serialize(
|
|
521
|
+
job_type=job_type,
|
|
522
|
+
status=status,
|
|
523
|
+
limit=limit,
|
|
524
|
+
offset=offset,
|
|
525
|
+
_request_auth=_request_auth,
|
|
526
|
+
_content_type=_content_type,
|
|
527
|
+
_headers=_headers,
|
|
528
|
+
_host_index=_host_index
|
|
529
|
+
)
|
|
530
|
+
|
|
531
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
532
|
+
'200': "ListJobsResponse",
|
|
533
|
+
}
|
|
534
|
+
response_data = self.api_client.call_api(
|
|
535
|
+
*_param,
|
|
536
|
+
_request_timeout=_request_timeout
|
|
537
|
+
)
|
|
538
|
+
return response_data.response
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
def _list_jobs_serialize(
|
|
542
|
+
self,
|
|
543
|
+
job_type,
|
|
544
|
+
status,
|
|
545
|
+
limit,
|
|
546
|
+
offset,
|
|
547
|
+
_request_auth,
|
|
548
|
+
_content_type,
|
|
549
|
+
_headers,
|
|
550
|
+
_host_index,
|
|
551
|
+
) -> RequestSerialized:
|
|
552
|
+
|
|
553
|
+
_host = None
|
|
554
|
+
|
|
555
|
+
_collection_formats: Dict[str, str] = {
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
_path_params: Dict[str, str] = {}
|
|
559
|
+
_query_params: List[Tuple[str, str]] = []
|
|
560
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
561
|
+
_form_params: List[Tuple[str, str]] = []
|
|
562
|
+
_files: Dict[
|
|
563
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
564
|
+
] = {}
|
|
565
|
+
_body_params: Optional[bytes] = None
|
|
566
|
+
|
|
567
|
+
# process the path parameters
|
|
568
|
+
# process the query parameters
|
|
569
|
+
if job_type is not None:
|
|
570
|
+
|
|
571
|
+
_query_params.append(('job_type', job_type.value))
|
|
572
|
+
|
|
573
|
+
if status is not None:
|
|
574
|
+
|
|
575
|
+
_query_params.append(('status', status))
|
|
576
|
+
|
|
577
|
+
if limit is not None:
|
|
578
|
+
|
|
579
|
+
_query_params.append(('limit', limit))
|
|
580
|
+
|
|
581
|
+
if offset is not None:
|
|
582
|
+
|
|
583
|
+
_query_params.append(('offset', offset))
|
|
584
|
+
|
|
585
|
+
# process the header parameters
|
|
586
|
+
# process the form parameters
|
|
587
|
+
# process the body parameter
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
# set the HTTP header `Accept`
|
|
591
|
+
if 'Accept' not in _header_params:
|
|
592
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
593
|
+
[
|
|
594
|
+
'application/json'
|
|
595
|
+
]
|
|
596
|
+
)
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
# authentication setting
|
|
600
|
+
_auth_settings: List[str] = [
|
|
601
|
+
'BearerAuth'
|
|
602
|
+
]
|
|
603
|
+
|
|
604
|
+
return self.api_client.param_serialize(
|
|
605
|
+
method='GET',
|
|
606
|
+
resource_path='/v1/jobs',
|
|
607
|
+
path_params=_path_params,
|
|
608
|
+
query_params=_query_params,
|
|
609
|
+
header_params=_header_params,
|
|
610
|
+
body=_body_params,
|
|
611
|
+
post_params=_form_params,
|
|
612
|
+
files=_files,
|
|
613
|
+
auth_settings=_auth_settings,
|
|
614
|
+
collection_formats=_collection_formats,
|
|
615
|
+
_host=_host,
|
|
616
|
+
_request_auth=_request_auth
|
|
617
|
+
)
|
|
618
|
+
|
|
619
|
+
|