rapidata 2.13.1__py3-none-any.whl → 2.14.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.
Potentially problematic release.
This version of rapidata might be problematic. Click here for more details.
- rapidata/api_client/__init__.py +18 -4
- rapidata/api_client/api/__init__.py +1 -0
- rapidata/api_client/api/dataset_api.py +265 -0
- rapidata/api_client/api/rapid_api.py +262 -0
- rapidata/api_client/api/workflow_api.py +298 -1
- rapidata/api_client/models/__init__.py +17 -4
- rapidata/api_client/models/add_campaign_model.py +3 -3
- rapidata/api_client/models/add_validation_rapid_model.py +3 -3
- rapidata/api_client/models/add_validation_text_rapid_model.py +3 -3
- rapidata/api_client/models/classification_metadata.py +2 -4
- rapidata/api_client/models/compare_workflow_config.py +17 -2
- rapidata/api_client/models/compare_workflow_config_metadata_value.py +238 -0
- rapidata/api_client/models/compare_workflow_config_model.py +17 -2
- rapidata/api_client/models/compare_workflow_model.py +17 -2
- rapidata/api_client/models/count_metadata.py +1 -3
- rapidata/api_client/models/create_datapoint_from_urls_model.py +26 -4
- rapidata/api_client/models/create_datapoint_from_urls_model_metadata_inner.py +168 -0
- rapidata/api_client/models/create_datapoint_result.py +5 -3
- rapidata/api_client/models/datapoint.py +7 -30
- rapidata/api_client/models/datapoint_asset.py +40 -40
- rapidata/api_client/models/datapoint_metadata_model.py +3 -3
- rapidata/api_client/models/datapoint_model.py +3 -3
- rapidata/api_client/models/early_stopping_referee_model.py +1 -1
- rapidata/api_client/models/get_compare_workflow_results_result.py +3 -3
- rapidata/api_client/models/get_datapoint_by_id_result.py +3 -3
- rapidata/api_client/models/get_failed_datapoints_result.py +95 -0
- rapidata/api_client/models/get_rapid_responses_result.py +112 -0
- rapidata/api_client/models/get_responses_result.py +95 -0
- rapidata/api_client/models/get_simple_workflow_results_result.py +10 -4
- rapidata/api_client/models/image_dimension_metadata.py +1 -3
- rapidata/api_client/models/location_metadata.py +2 -4
- rapidata/api_client/models/metadata_visibilities.py +1 -0
- rapidata/api_client/models/multi_asset_model.py +3 -3
- rapidata/api_client/models/original_filename_metadata.py +2 -4
- rapidata/api_client/models/prompt_metadata.py +1 -3
- rapidata/api_client/models/scrub_result.py +4 -4
- rapidata/api_client/models/source_url_metadata.py +98 -0
- rapidata/api_client/models/text_metadata.py +3 -5
- rapidata/api_client/models/transcription_metadata.py +1 -3
- rapidata/api_client/models/upload_text_sources_to_dataset_model.py +17 -2
- rapidata/api_client_README.md +21 -4
- rapidata/rapidata_client/assets/_media_asset.py +5 -1
- rapidata/rapidata_client/assets/_multi_asset.py +6 -1
- rapidata/rapidata_client/filter/country_filter.py +1 -1
- rapidata/rapidata_client/filter/rapidata_filters.py +10 -2
- rapidata/rapidata_client/order/_rapidata_dataset.py +311 -108
- rapidata/rapidata_client/order/_rapidata_order_builder.py +5 -5
- rapidata/rapidata_client/order/rapidata_order.py +2 -2
- rapidata/rapidata_client/order/rapidata_order_manager.py +55 -6
- rapidata/rapidata_client/order/rapidata_results.py +2 -1
- rapidata/rapidata_client/rapidata_client.py +4 -0
- rapidata/rapidata_client/selection/rapidata_selections.py +10 -9
- rapidata/rapidata_client/settings/no_shuffle.py +2 -2
- rapidata/rapidata_client/settings/rapidata_settings.py +8 -0
- rapidata/rapidata_client/validation/rapids/rapids.py +4 -5
- rapidata/rapidata_client/workflow/__init__.py +1 -0
- rapidata/rapidata_client/workflow/_ranking_workflow.py +51 -0
- rapidata/service/credential_manager.py +7 -0
- rapidata/service/openapi_service.py +6 -6
- {rapidata-2.13.1.dist-info → rapidata-2.14.1.dist-info}/METADATA +1 -1
- {rapidata-2.13.1.dist-info → rapidata-2.14.1.dist-info}/RECORD +63 -56
- {rapidata-2.13.1.dist-info → rapidata-2.14.1.dist-info}/LICENSE +0 -0
- {rapidata-2.13.1.dist-info → rapidata-2.14.1.dist-info}/WHEEL +0 -0
|
@@ -20,6 +20,7 @@ from pydantic import Field, StrictBytes, StrictStr
|
|
|
20
20
|
from typing import List, Optional, Tuple, Union
|
|
21
21
|
from typing_extensions import Annotated
|
|
22
22
|
from rapidata.api_client.models.create_demographic_rapid_model import CreateDemographicRapidModel
|
|
23
|
+
from rapidata.api_client.models.get_rapid_responses_result import GetRapidResponsesResult
|
|
23
24
|
from rapidata.api_client.models.inspect_report_result import InspectReportResult
|
|
24
25
|
from rapidata.api_client.models.query_model import QueryModel
|
|
25
26
|
from rapidata.api_client.models.query_validation_rapids_result_paged_result import QueryValidationRapidsResultPagedResult
|
|
@@ -1126,6 +1127,267 @@ class RapidApi:
|
|
|
1126
1127
|
|
|
1127
1128
|
|
|
1128
1129
|
|
|
1130
|
+
@validate_call
|
|
1131
|
+
def rapid_rapid_id_responses_get(
|
|
1132
|
+
self,
|
|
1133
|
+
rapid_id: Annotated[StrictStr, Field(description="The rapid to get the responses for.")],
|
|
1134
|
+
_request_timeout: Union[
|
|
1135
|
+
None,
|
|
1136
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1137
|
+
Tuple[
|
|
1138
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1139
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1140
|
+
]
|
|
1141
|
+
] = None,
|
|
1142
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1143
|
+
_content_type: Optional[StrictStr] = None,
|
|
1144
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1145
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1146
|
+
) -> GetRapidResponsesResult:
|
|
1147
|
+
"""Gets all responses for a given rapid.
|
|
1148
|
+
|
|
1149
|
+
|
|
1150
|
+
:param rapid_id: The rapid to get the responses for. (required)
|
|
1151
|
+
:type rapid_id: str
|
|
1152
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1153
|
+
number provided, it will be total request
|
|
1154
|
+
timeout. It can also be a pair (tuple) of
|
|
1155
|
+
(connection, read) timeouts.
|
|
1156
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1157
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1158
|
+
request; this effectively ignores the
|
|
1159
|
+
authentication in the spec for a single request.
|
|
1160
|
+
:type _request_auth: dict, optional
|
|
1161
|
+
:param _content_type: force content-type for the request.
|
|
1162
|
+
:type _content_type: str, Optional
|
|
1163
|
+
:param _headers: set to override the headers for a single
|
|
1164
|
+
request; this effectively ignores the headers
|
|
1165
|
+
in the spec for a single request.
|
|
1166
|
+
:type _headers: dict, optional
|
|
1167
|
+
:param _host_index: set to override the host_index for a single
|
|
1168
|
+
request; this effectively ignores the host_index
|
|
1169
|
+
in the spec for a single request.
|
|
1170
|
+
:type _host_index: int, optional
|
|
1171
|
+
:return: Returns the result object.
|
|
1172
|
+
""" # noqa: E501
|
|
1173
|
+
|
|
1174
|
+
_param = self._rapid_rapid_id_responses_get_serialize(
|
|
1175
|
+
rapid_id=rapid_id,
|
|
1176
|
+
_request_auth=_request_auth,
|
|
1177
|
+
_content_type=_content_type,
|
|
1178
|
+
_headers=_headers,
|
|
1179
|
+
_host_index=_host_index
|
|
1180
|
+
)
|
|
1181
|
+
|
|
1182
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1183
|
+
'200': "GetRapidResponsesResult",
|
|
1184
|
+
}
|
|
1185
|
+
response_data = self.api_client.call_api(
|
|
1186
|
+
*_param,
|
|
1187
|
+
_request_timeout=_request_timeout
|
|
1188
|
+
)
|
|
1189
|
+
response_data.read()
|
|
1190
|
+
return self.api_client.response_deserialize(
|
|
1191
|
+
response_data=response_data,
|
|
1192
|
+
response_types_map=_response_types_map,
|
|
1193
|
+
).data
|
|
1194
|
+
|
|
1195
|
+
|
|
1196
|
+
@validate_call
|
|
1197
|
+
def rapid_rapid_id_responses_get_with_http_info(
|
|
1198
|
+
self,
|
|
1199
|
+
rapid_id: Annotated[StrictStr, Field(description="The rapid to get the responses for.")],
|
|
1200
|
+
_request_timeout: Union[
|
|
1201
|
+
None,
|
|
1202
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1203
|
+
Tuple[
|
|
1204
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1205
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1206
|
+
]
|
|
1207
|
+
] = None,
|
|
1208
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1209
|
+
_content_type: Optional[StrictStr] = None,
|
|
1210
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1211
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1212
|
+
) -> ApiResponse[GetRapidResponsesResult]:
|
|
1213
|
+
"""Gets all responses for a given rapid.
|
|
1214
|
+
|
|
1215
|
+
|
|
1216
|
+
:param rapid_id: The rapid to get the responses for. (required)
|
|
1217
|
+
:type rapid_id: str
|
|
1218
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1219
|
+
number provided, it will be total request
|
|
1220
|
+
timeout. It can also be a pair (tuple) of
|
|
1221
|
+
(connection, read) timeouts.
|
|
1222
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1223
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1224
|
+
request; this effectively ignores the
|
|
1225
|
+
authentication in the spec for a single request.
|
|
1226
|
+
:type _request_auth: dict, optional
|
|
1227
|
+
:param _content_type: force content-type for the request.
|
|
1228
|
+
:type _content_type: str, Optional
|
|
1229
|
+
:param _headers: set to override the headers for a single
|
|
1230
|
+
request; this effectively ignores the headers
|
|
1231
|
+
in the spec for a single request.
|
|
1232
|
+
:type _headers: dict, optional
|
|
1233
|
+
:param _host_index: set to override the host_index for a single
|
|
1234
|
+
request; this effectively ignores the host_index
|
|
1235
|
+
in the spec for a single request.
|
|
1236
|
+
:type _host_index: int, optional
|
|
1237
|
+
:return: Returns the result object.
|
|
1238
|
+
""" # noqa: E501
|
|
1239
|
+
|
|
1240
|
+
_param = self._rapid_rapid_id_responses_get_serialize(
|
|
1241
|
+
rapid_id=rapid_id,
|
|
1242
|
+
_request_auth=_request_auth,
|
|
1243
|
+
_content_type=_content_type,
|
|
1244
|
+
_headers=_headers,
|
|
1245
|
+
_host_index=_host_index
|
|
1246
|
+
)
|
|
1247
|
+
|
|
1248
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1249
|
+
'200': "GetRapidResponsesResult",
|
|
1250
|
+
}
|
|
1251
|
+
response_data = self.api_client.call_api(
|
|
1252
|
+
*_param,
|
|
1253
|
+
_request_timeout=_request_timeout
|
|
1254
|
+
)
|
|
1255
|
+
response_data.read()
|
|
1256
|
+
return self.api_client.response_deserialize(
|
|
1257
|
+
response_data=response_data,
|
|
1258
|
+
response_types_map=_response_types_map,
|
|
1259
|
+
)
|
|
1260
|
+
|
|
1261
|
+
|
|
1262
|
+
@validate_call
|
|
1263
|
+
def rapid_rapid_id_responses_get_without_preload_content(
|
|
1264
|
+
self,
|
|
1265
|
+
rapid_id: Annotated[StrictStr, Field(description="The rapid to get the responses for.")],
|
|
1266
|
+
_request_timeout: Union[
|
|
1267
|
+
None,
|
|
1268
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1269
|
+
Tuple[
|
|
1270
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1271
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1272
|
+
]
|
|
1273
|
+
] = None,
|
|
1274
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1275
|
+
_content_type: Optional[StrictStr] = None,
|
|
1276
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1277
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1278
|
+
) -> RESTResponseType:
|
|
1279
|
+
"""Gets all responses for a given rapid.
|
|
1280
|
+
|
|
1281
|
+
|
|
1282
|
+
:param rapid_id: The rapid to get the responses for. (required)
|
|
1283
|
+
:type rapid_id: str
|
|
1284
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1285
|
+
number provided, it will be total request
|
|
1286
|
+
timeout. It can also be a pair (tuple) of
|
|
1287
|
+
(connection, read) timeouts.
|
|
1288
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1289
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1290
|
+
request; this effectively ignores the
|
|
1291
|
+
authentication in the spec for a single request.
|
|
1292
|
+
:type _request_auth: dict, optional
|
|
1293
|
+
:param _content_type: force content-type for the request.
|
|
1294
|
+
:type _content_type: str, Optional
|
|
1295
|
+
:param _headers: set to override the headers for a single
|
|
1296
|
+
request; this effectively ignores the headers
|
|
1297
|
+
in the spec for a single request.
|
|
1298
|
+
:type _headers: dict, optional
|
|
1299
|
+
:param _host_index: set to override the host_index for a single
|
|
1300
|
+
request; this effectively ignores the host_index
|
|
1301
|
+
in the spec for a single request.
|
|
1302
|
+
:type _host_index: int, optional
|
|
1303
|
+
:return: Returns the result object.
|
|
1304
|
+
""" # noqa: E501
|
|
1305
|
+
|
|
1306
|
+
_param = self._rapid_rapid_id_responses_get_serialize(
|
|
1307
|
+
rapid_id=rapid_id,
|
|
1308
|
+
_request_auth=_request_auth,
|
|
1309
|
+
_content_type=_content_type,
|
|
1310
|
+
_headers=_headers,
|
|
1311
|
+
_host_index=_host_index
|
|
1312
|
+
)
|
|
1313
|
+
|
|
1314
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1315
|
+
'200': "GetRapidResponsesResult",
|
|
1316
|
+
}
|
|
1317
|
+
response_data = self.api_client.call_api(
|
|
1318
|
+
*_param,
|
|
1319
|
+
_request_timeout=_request_timeout
|
|
1320
|
+
)
|
|
1321
|
+
return response_data.response
|
|
1322
|
+
|
|
1323
|
+
|
|
1324
|
+
def _rapid_rapid_id_responses_get_serialize(
|
|
1325
|
+
self,
|
|
1326
|
+
rapid_id,
|
|
1327
|
+
_request_auth,
|
|
1328
|
+
_content_type,
|
|
1329
|
+
_headers,
|
|
1330
|
+
_host_index,
|
|
1331
|
+
) -> RequestSerialized:
|
|
1332
|
+
|
|
1333
|
+
_host = None
|
|
1334
|
+
|
|
1335
|
+
_collection_formats: Dict[str, str] = {
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
_path_params: Dict[str, str] = {}
|
|
1339
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1340
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1341
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1342
|
+
_files: Dict[
|
|
1343
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1344
|
+
] = {}
|
|
1345
|
+
_body_params: Optional[bytes] = None
|
|
1346
|
+
|
|
1347
|
+
# process the path parameters
|
|
1348
|
+
if rapid_id is not None:
|
|
1349
|
+
_path_params['rapidId'] = rapid_id
|
|
1350
|
+
# process the query parameters
|
|
1351
|
+
# process the header parameters
|
|
1352
|
+
# process the form parameters
|
|
1353
|
+
# process the body parameter
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
# set the HTTP header `Accept`
|
|
1357
|
+
if 'Accept' not in _header_params:
|
|
1358
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1359
|
+
[
|
|
1360
|
+
'text/plain',
|
|
1361
|
+
'application/json',
|
|
1362
|
+
'text/json'
|
|
1363
|
+
]
|
|
1364
|
+
)
|
|
1365
|
+
|
|
1366
|
+
|
|
1367
|
+
# authentication setting
|
|
1368
|
+
_auth_settings: List[str] = [
|
|
1369
|
+
'bearer',
|
|
1370
|
+
'oauth2'
|
|
1371
|
+
]
|
|
1372
|
+
|
|
1373
|
+
return self.api_client.param_serialize(
|
|
1374
|
+
method='GET',
|
|
1375
|
+
resource_path='/rapid/{rapidId}/responses',
|
|
1376
|
+
path_params=_path_params,
|
|
1377
|
+
query_params=_query_params,
|
|
1378
|
+
header_params=_header_params,
|
|
1379
|
+
body=_body_params,
|
|
1380
|
+
post_params=_form_params,
|
|
1381
|
+
files=_files,
|
|
1382
|
+
auth_settings=_auth_settings,
|
|
1383
|
+
collection_formats=_collection_formats,
|
|
1384
|
+
_host=_host,
|
|
1385
|
+
_request_auth=_request_auth
|
|
1386
|
+
)
|
|
1387
|
+
|
|
1388
|
+
|
|
1389
|
+
|
|
1390
|
+
|
|
1129
1391
|
@validate_call
|
|
1130
1392
|
def rapid_report_id_get(
|
|
1131
1393
|
self,
|
|
@@ -16,14 +16,16 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
|
16
16
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
17
|
from typing_extensions import Annotated
|
|
18
18
|
|
|
19
|
-
from pydantic import Field, StrictBool, StrictStr
|
|
19
|
+
from pydantic import Field, StrictBool, StrictInt, StrictStr
|
|
20
20
|
from typing import Optional
|
|
21
21
|
from typing_extensions import Annotated
|
|
22
22
|
from rapidata.api_client.models.get_compare_ab_summary_result import GetCompareAbSummaryResult
|
|
23
|
+
from rapidata.api_client.models.get_responses_result import GetResponsesResult
|
|
23
24
|
from rapidata.api_client.models.get_workflow_by_id_result import GetWorkflowByIdResult
|
|
24
25
|
from rapidata.api_client.models.get_workflow_progress_result import GetWorkflowProgressResult
|
|
25
26
|
from rapidata.api_client.models.i_workflow_model_paged_result import IWorkflowModelPagedResult
|
|
26
27
|
from rapidata.api_client.models.query_workflows_model import QueryWorkflowsModel
|
|
28
|
+
from rapidata.api_client.models.sort_direction import SortDirection
|
|
27
29
|
|
|
28
30
|
from rapidata.api_client.api_client import ApiClient, RequestSerialized
|
|
29
31
|
from rapidata.api_client.api_response import ApiResponse
|
|
@@ -1101,6 +1103,301 @@ class WorkflowApi:
|
|
|
1101
1103
|
|
|
1102
1104
|
|
|
1103
1105
|
|
|
1106
|
+
@validate_call
|
|
1107
|
+
def workflow_id_responses_get(
|
|
1108
|
+
self,
|
|
1109
|
+
id: Annotated[StrictStr, Field(description="The ID of the workflow to get the responses for.")],
|
|
1110
|
+
limit: Annotated[Optional[StrictInt], Field(description="The number of responses to get.")] = None,
|
|
1111
|
+
sort: Annotated[Optional[SortDirection], Field(description="Whether the oldest or most recent responses should be returned.")] = None,
|
|
1112
|
+
_request_timeout: Union[
|
|
1113
|
+
None,
|
|
1114
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1115
|
+
Tuple[
|
|
1116
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1117
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1118
|
+
]
|
|
1119
|
+
] = None,
|
|
1120
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1121
|
+
_content_type: Optional[StrictStr] = None,
|
|
1122
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1123
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1124
|
+
) -> GetResponsesResult:
|
|
1125
|
+
"""Gets the limit most recent or oldest responses for a workflow. The responses are not guaranteed to be of any specific rapid. Instead, this endpoint returns all responses to any rapid in the workflow.
|
|
1126
|
+
|
|
1127
|
+
|
|
1128
|
+
:param id: The ID of the workflow to get the responses for. (required)
|
|
1129
|
+
:type id: str
|
|
1130
|
+
:param limit: The number of responses to get.
|
|
1131
|
+
:type limit: int
|
|
1132
|
+
:param sort: Whether the oldest or most recent responses should be returned.
|
|
1133
|
+
:type sort: SortDirection
|
|
1134
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1135
|
+
number provided, it will be total request
|
|
1136
|
+
timeout. It can also be a pair (tuple) of
|
|
1137
|
+
(connection, read) timeouts.
|
|
1138
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1139
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1140
|
+
request; this effectively ignores the
|
|
1141
|
+
authentication in the spec for a single request.
|
|
1142
|
+
:type _request_auth: dict, optional
|
|
1143
|
+
:param _content_type: force content-type for the request.
|
|
1144
|
+
:type _content_type: str, Optional
|
|
1145
|
+
:param _headers: set to override the headers for a single
|
|
1146
|
+
request; this effectively ignores the headers
|
|
1147
|
+
in the spec for a single request.
|
|
1148
|
+
:type _headers: dict, optional
|
|
1149
|
+
:param _host_index: set to override the host_index for a single
|
|
1150
|
+
request; this effectively ignores the host_index
|
|
1151
|
+
in the spec for a single request.
|
|
1152
|
+
:type _host_index: int, optional
|
|
1153
|
+
:return: Returns the result object.
|
|
1154
|
+
""" # noqa: E501
|
|
1155
|
+
|
|
1156
|
+
_param = self._workflow_id_responses_get_serialize(
|
|
1157
|
+
id=id,
|
|
1158
|
+
limit=limit,
|
|
1159
|
+
sort=sort,
|
|
1160
|
+
_request_auth=_request_auth,
|
|
1161
|
+
_content_type=_content_type,
|
|
1162
|
+
_headers=_headers,
|
|
1163
|
+
_host_index=_host_index
|
|
1164
|
+
)
|
|
1165
|
+
|
|
1166
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1167
|
+
'200': "GetResponsesResult",
|
|
1168
|
+
}
|
|
1169
|
+
response_data = self.api_client.call_api(
|
|
1170
|
+
*_param,
|
|
1171
|
+
_request_timeout=_request_timeout
|
|
1172
|
+
)
|
|
1173
|
+
response_data.read()
|
|
1174
|
+
return self.api_client.response_deserialize(
|
|
1175
|
+
response_data=response_data,
|
|
1176
|
+
response_types_map=_response_types_map,
|
|
1177
|
+
).data
|
|
1178
|
+
|
|
1179
|
+
|
|
1180
|
+
@validate_call
|
|
1181
|
+
def workflow_id_responses_get_with_http_info(
|
|
1182
|
+
self,
|
|
1183
|
+
id: Annotated[StrictStr, Field(description="The ID of the workflow to get the responses for.")],
|
|
1184
|
+
limit: Annotated[Optional[StrictInt], Field(description="The number of responses to get.")] = None,
|
|
1185
|
+
sort: Annotated[Optional[SortDirection], Field(description="Whether the oldest or most recent responses should be returned.")] = None,
|
|
1186
|
+
_request_timeout: Union[
|
|
1187
|
+
None,
|
|
1188
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1189
|
+
Tuple[
|
|
1190
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1191
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1192
|
+
]
|
|
1193
|
+
] = None,
|
|
1194
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1195
|
+
_content_type: Optional[StrictStr] = None,
|
|
1196
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1197
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1198
|
+
) -> ApiResponse[GetResponsesResult]:
|
|
1199
|
+
"""Gets the limit most recent or oldest responses for a workflow. The responses are not guaranteed to be of any specific rapid. Instead, this endpoint returns all responses to any rapid in the workflow.
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
:param id: The ID of the workflow to get the responses for. (required)
|
|
1203
|
+
:type id: str
|
|
1204
|
+
:param limit: The number of responses to get.
|
|
1205
|
+
:type limit: int
|
|
1206
|
+
:param sort: Whether the oldest or most recent responses should be returned.
|
|
1207
|
+
:type sort: SortDirection
|
|
1208
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1209
|
+
number provided, it will be total request
|
|
1210
|
+
timeout. It can also be a pair (tuple) of
|
|
1211
|
+
(connection, read) timeouts.
|
|
1212
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1213
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1214
|
+
request; this effectively ignores the
|
|
1215
|
+
authentication in the spec for a single request.
|
|
1216
|
+
:type _request_auth: dict, optional
|
|
1217
|
+
:param _content_type: force content-type for the request.
|
|
1218
|
+
:type _content_type: str, Optional
|
|
1219
|
+
:param _headers: set to override the headers for a single
|
|
1220
|
+
request; this effectively ignores the headers
|
|
1221
|
+
in the spec for a single request.
|
|
1222
|
+
:type _headers: dict, optional
|
|
1223
|
+
:param _host_index: set to override the host_index for a single
|
|
1224
|
+
request; this effectively ignores the host_index
|
|
1225
|
+
in the spec for a single request.
|
|
1226
|
+
:type _host_index: int, optional
|
|
1227
|
+
:return: Returns the result object.
|
|
1228
|
+
""" # noqa: E501
|
|
1229
|
+
|
|
1230
|
+
_param = self._workflow_id_responses_get_serialize(
|
|
1231
|
+
id=id,
|
|
1232
|
+
limit=limit,
|
|
1233
|
+
sort=sort,
|
|
1234
|
+
_request_auth=_request_auth,
|
|
1235
|
+
_content_type=_content_type,
|
|
1236
|
+
_headers=_headers,
|
|
1237
|
+
_host_index=_host_index
|
|
1238
|
+
)
|
|
1239
|
+
|
|
1240
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1241
|
+
'200': "GetResponsesResult",
|
|
1242
|
+
}
|
|
1243
|
+
response_data = self.api_client.call_api(
|
|
1244
|
+
*_param,
|
|
1245
|
+
_request_timeout=_request_timeout
|
|
1246
|
+
)
|
|
1247
|
+
response_data.read()
|
|
1248
|
+
return self.api_client.response_deserialize(
|
|
1249
|
+
response_data=response_data,
|
|
1250
|
+
response_types_map=_response_types_map,
|
|
1251
|
+
)
|
|
1252
|
+
|
|
1253
|
+
|
|
1254
|
+
@validate_call
|
|
1255
|
+
def workflow_id_responses_get_without_preload_content(
|
|
1256
|
+
self,
|
|
1257
|
+
id: Annotated[StrictStr, Field(description="The ID of the workflow to get the responses for.")],
|
|
1258
|
+
limit: Annotated[Optional[StrictInt], Field(description="The number of responses to get.")] = None,
|
|
1259
|
+
sort: Annotated[Optional[SortDirection], Field(description="Whether the oldest or most recent responses should be returned.")] = None,
|
|
1260
|
+
_request_timeout: Union[
|
|
1261
|
+
None,
|
|
1262
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1263
|
+
Tuple[
|
|
1264
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1265
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1266
|
+
]
|
|
1267
|
+
] = None,
|
|
1268
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1269
|
+
_content_type: Optional[StrictStr] = None,
|
|
1270
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1271
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1272
|
+
) -> RESTResponseType:
|
|
1273
|
+
"""Gets the limit most recent or oldest responses for a workflow. The responses are not guaranteed to be of any specific rapid. Instead, this endpoint returns all responses to any rapid in the workflow.
|
|
1274
|
+
|
|
1275
|
+
|
|
1276
|
+
:param id: The ID of the workflow to get the responses for. (required)
|
|
1277
|
+
:type id: str
|
|
1278
|
+
:param limit: The number of responses to get.
|
|
1279
|
+
:type limit: int
|
|
1280
|
+
:param sort: Whether the oldest or most recent responses should be returned.
|
|
1281
|
+
:type sort: SortDirection
|
|
1282
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1283
|
+
number provided, it will be total request
|
|
1284
|
+
timeout. It can also be a pair (tuple) of
|
|
1285
|
+
(connection, read) timeouts.
|
|
1286
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1287
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1288
|
+
request; this effectively ignores the
|
|
1289
|
+
authentication in the spec for a single request.
|
|
1290
|
+
:type _request_auth: dict, optional
|
|
1291
|
+
:param _content_type: force content-type for the request.
|
|
1292
|
+
:type _content_type: str, Optional
|
|
1293
|
+
:param _headers: set to override the headers for a single
|
|
1294
|
+
request; this effectively ignores the headers
|
|
1295
|
+
in the spec for a single request.
|
|
1296
|
+
:type _headers: dict, optional
|
|
1297
|
+
:param _host_index: set to override the host_index for a single
|
|
1298
|
+
request; this effectively ignores the host_index
|
|
1299
|
+
in the spec for a single request.
|
|
1300
|
+
:type _host_index: int, optional
|
|
1301
|
+
:return: Returns the result object.
|
|
1302
|
+
""" # noqa: E501
|
|
1303
|
+
|
|
1304
|
+
_param = self._workflow_id_responses_get_serialize(
|
|
1305
|
+
id=id,
|
|
1306
|
+
limit=limit,
|
|
1307
|
+
sort=sort,
|
|
1308
|
+
_request_auth=_request_auth,
|
|
1309
|
+
_content_type=_content_type,
|
|
1310
|
+
_headers=_headers,
|
|
1311
|
+
_host_index=_host_index
|
|
1312
|
+
)
|
|
1313
|
+
|
|
1314
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1315
|
+
'200': "GetResponsesResult",
|
|
1316
|
+
}
|
|
1317
|
+
response_data = self.api_client.call_api(
|
|
1318
|
+
*_param,
|
|
1319
|
+
_request_timeout=_request_timeout
|
|
1320
|
+
)
|
|
1321
|
+
return response_data.response
|
|
1322
|
+
|
|
1323
|
+
|
|
1324
|
+
def _workflow_id_responses_get_serialize(
|
|
1325
|
+
self,
|
|
1326
|
+
id,
|
|
1327
|
+
limit,
|
|
1328
|
+
sort,
|
|
1329
|
+
_request_auth,
|
|
1330
|
+
_content_type,
|
|
1331
|
+
_headers,
|
|
1332
|
+
_host_index,
|
|
1333
|
+
) -> RequestSerialized:
|
|
1334
|
+
|
|
1335
|
+
_host = None
|
|
1336
|
+
|
|
1337
|
+
_collection_formats: Dict[str, str] = {
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
_path_params: Dict[str, str] = {}
|
|
1341
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1342
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1343
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1344
|
+
_files: Dict[
|
|
1345
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1346
|
+
] = {}
|
|
1347
|
+
_body_params: Optional[bytes] = None
|
|
1348
|
+
|
|
1349
|
+
# process the path parameters
|
|
1350
|
+
if id is not None:
|
|
1351
|
+
_path_params['id'] = id
|
|
1352
|
+
# process the query parameters
|
|
1353
|
+
if limit is not None:
|
|
1354
|
+
|
|
1355
|
+
_query_params.append(('limit', limit))
|
|
1356
|
+
|
|
1357
|
+
if sort is not None:
|
|
1358
|
+
|
|
1359
|
+
_query_params.append(('sort', sort.value))
|
|
1360
|
+
|
|
1361
|
+
# process the header parameters
|
|
1362
|
+
# process the form parameters
|
|
1363
|
+
# process the body parameter
|
|
1364
|
+
|
|
1365
|
+
|
|
1366
|
+
# set the HTTP header `Accept`
|
|
1367
|
+
if 'Accept' not in _header_params:
|
|
1368
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1369
|
+
[
|
|
1370
|
+
'text/plain',
|
|
1371
|
+
'application/json',
|
|
1372
|
+
'text/json'
|
|
1373
|
+
]
|
|
1374
|
+
)
|
|
1375
|
+
|
|
1376
|
+
|
|
1377
|
+
# authentication setting
|
|
1378
|
+
_auth_settings: List[str] = [
|
|
1379
|
+
'bearer',
|
|
1380
|
+
'oauth2'
|
|
1381
|
+
]
|
|
1382
|
+
|
|
1383
|
+
return self.api_client.param_serialize(
|
|
1384
|
+
method='GET',
|
|
1385
|
+
resource_path='/workflow/{id}/responses',
|
|
1386
|
+
path_params=_path_params,
|
|
1387
|
+
query_params=_query_params,
|
|
1388
|
+
header_params=_header_params,
|
|
1389
|
+
body=_body_params,
|
|
1390
|
+
post_params=_form_params,
|
|
1391
|
+
files=_files,
|
|
1392
|
+
auth_settings=_auth_settings,
|
|
1393
|
+
collection_formats=_collection_formats,
|
|
1394
|
+
_host=_host,
|
|
1395
|
+
_request_auth=_request_auth
|
|
1396
|
+
)
|
|
1397
|
+
|
|
1398
|
+
|
|
1399
|
+
|
|
1400
|
+
|
|
1104
1401
|
@validate_call
|
|
1105
1402
|
def workflow_query_get(
|
|
1106
1403
|
self,
|