|
21 | 21 | from datadog_api_client.v2.model.batch_delete_rows_request_array import BatchDeleteRowsRequestArray |
22 | 22 | from datadog_api_client.v2.model.table_row_resource_array import TableRowResourceArray |
23 | 23 | from datadog_api_client.v2.model.batch_upsert_rows_request_array import BatchUpsertRowsRequestArray |
| 24 | +from datadog_api_client.v2.model.list_rows_response import ListRowsResponse |
24 | 25 | from datadog_api_client.v2.model.create_upload_response import CreateUploadResponse |
25 | 26 | from datadog_api_client.v2.model.create_upload_request import CreateUploadRequest |
26 | 27 |
|
@@ -197,6 +198,43 @@ def __init__(self, api_client=None): |
197 | 198 | api_client=api_client, |
198 | 199 | ) |
199 | 200 |
|
| 201 | + self._list_reference_table_rows_endpoint = _Endpoint( |
| 202 | + settings={ |
| 203 | + "response_type": (ListRowsResponse,), |
| 204 | + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], |
| 205 | + "endpoint_path": "/api/v2/reference-tables/tables/{id}/rows/list", |
| 206 | + "operation_id": "list_reference_table_rows", |
| 207 | + "http_method": "GET", |
| 208 | + "version": "v2", |
| 209 | + }, |
| 210 | + params_map={ |
| 211 | + "id": { |
| 212 | + "required": True, |
| 213 | + "openapi_types": (str,), |
| 214 | + "attribute": "id", |
| 215 | + "location": "path", |
| 216 | + }, |
| 217 | + "page_limit": { |
| 218 | + "validation": { |
| 219 | + "inclusive_maximum": 1000, |
| 220 | + "inclusive_minimum": 1, |
| 221 | + }, |
| 222 | + "openapi_types": (int,), |
| 223 | + "attribute": "page[limit]", |
| 224 | + "location": "query", |
| 225 | + }, |
| 226 | + "page_continuation_token": { |
| 227 | + "openapi_types": (str,), |
| 228 | + "attribute": "page[continuation_token]", |
| 229 | + "location": "query", |
| 230 | + }, |
| 231 | + }, |
| 232 | + headers_map={ |
| 233 | + "accept": ["application/json"], |
| 234 | + }, |
| 235 | + api_client=api_client, |
| 236 | + ) |
| 237 | + |
200 | 238 | self._list_tables_endpoint = _Endpoint( |
201 | 239 | settings={ |
202 | 240 | "response_type": (TableResultV2Array,), |
@@ -433,6 +471,36 @@ def get_table( |
433 | 471 |
|
434 | 472 | return self._get_table_endpoint.call_with_http_info(**kwargs) |
435 | 473 |
|
| 474 | + def list_reference_table_rows( |
| 475 | + self, |
| 476 | + id: str, |
| 477 | + *, |
| 478 | + page_limit: Union[int, UnsetType] = unset, |
| 479 | + page_continuation_token: Union[str, UnsetType] = unset, |
| 480 | + ) -> ListRowsResponse: |
| 481 | + """List rows. |
| 482 | +
|
| 483 | + List all rows in a reference table using cursor-based pagination. Pass the ``page[continuation_token]`` from the previous response to fetch the next page on the same consistent snapshot. Returns 400 for tables with more than 10,000,000 rows. |
| 484 | +
|
| 485 | + :param id: Unique identifier of the reference table to list rows from. |
| 486 | + :type id: str |
| 487 | + :param page_limit: Number of rows to return per page. Defaults to 100, maximum is 1000. |
| 488 | + :type page_limit: int, optional |
| 489 | + :param page_continuation_token: Opaque cursor from the previous response's next link. Pass this to retrieve the next page on the same consistent snapshot. |
| 490 | + :type page_continuation_token: str, optional |
| 491 | + :rtype: ListRowsResponse |
| 492 | + """ |
| 493 | + kwargs: Dict[str, Any] = {} |
| 494 | + kwargs["id"] = id |
| 495 | + |
| 496 | + if page_limit is not unset: |
| 497 | + kwargs["page_limit"] = page_limit |
| 498 | + |
| 499 | + if page_continuation_token is not unset: |
| 500 | + kwargs["page_continuation_token"] = page_continuation_token |
| 501 | + |
| 502 | + return self._list_reference_table_rows_endpoint.call_with_http_info(**kwargs) |
| 503 | + |
436 | 504 | def list_tables( |
437 | 505 | self, |
438 | 506 | *, |
|
0 commit comments