Skip to content

Commit 6d40c6d

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 1dc1417 of spec repo (#3533)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent e1d2b56 commit 6d40c6d

13 files changed

Lines changed: 391 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49873,6 +49873,51 @@ components:
4987349873
example: "/api/v2/catalog/relation?filter[from_ref]=service:service-catalog&include=entity&page[limit]=2&page[offset]=0"
4987449874
type: string
4987549875
type: object
49876+
ListRowsResponse:
49877+
description: Paginated list of reference table rows.
49878+
example:
49879+
data:
49880+
- attributes:
49881+
values:
49882+
category: tor
49883+
intention: suspicious
49884+
ip_address: 102.130.113.9
49885+
id: 102.130.113.9
49886+
type: row
49887+
links:
49888+
first: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Blimit%5D=100"
49889+
self: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ%3D%3D&page%5Blimit%5D=100"
49890+
properties:
49891+
data:
49892+
description: The rows.
49893+
items:
49894+
$ref: "#/components/schemas/TableRowResourceData"
49895+
type: array
49896+
links:
49897+
$ref: "#/components/schemas/ListRowsResponseLinks"
49898+
required:
49899+
- data
49900+
- links
49901+
type: object
49902+
ListRowsResponseLinks:
49903+
description: Pagination links for the list rows response.
49904+
properties:
49905+
first:
49906+
description: Link to the first page of results.
49907+
example: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Blimit%5D=100"
49908+
type: string
49909+
next:
49910+
description: Link to the next page of results. Only present when more rows are available.
49911+
example: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ%3D%3D&page%5Blimit%5D=100"
49912+
type: string
49913+
self:
49914+
description: Link to the current page of results.
49915+
example: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ%3D%3D&page%5Blimit%5D=100"
49916+
type: string
49917+
required:
49918+
- self
49919+
- first
49920+
type: object
4987649921
ListRulesResponse:
4987749922
description: Scorecard rules response.
4987849923
properties:
@@ -144171,6 +144216,73 @@ paths:
144171144216
summary: Upsert rows
144172144217
tags:
144173144218
- Reference Tables
144219+
/api/v2/reference-tables/tables/{id}/rows/list:
144220+
get:
144221+
description: 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.
144222+
operationId: ListReferenceTableRows
144223+
parameters:
144224+
- description: Unique identifier of the reference table to list rows from.
144225+
example: "00000000-0000-0000-0000-000000000000"
144226+
in: path
144227+
name: id
144228+
required: true
144229+
schema:
144230+
type: string
144231+
- description: Number of rows to return per page. Defaults to 100, maximum is 1000.
144232+
example: 100
144233+
in: query
144234+
name: page[limit]
144235+
required: false
144236+
schema:
144237+
default: 100
144238+
format: int64
144239+
maximum: 1000
144240+
minimum: 1
144241+
type: integer
144242+
- description: Opaque cursor from the previous response's next link. Pass this to retrieve the next page on the same consistent snapshot.
144243+
example: "eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ=="
144244+
in: query
144245+
name: page[continuation_token]
144246+
required: false
144247+
schema:
144248+
type: string
144249+
responses:
144250+
"200":
144251+
content:
144252+
application/json:
144253+
examples:
144254+
default:
144255+
value:
144256+
data:
144257+
- attributes:
144258+
values:
144259+
category: tor
144260+
intention: suspicious
144261+
ip_address: 102.130.113.9
144262+
id: 102.130.113.9
144263+
type: row
144264+
links:
144265+
first: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Blimit%5D=100"
144266+
next: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjY5NzA0ODkwNDE4ODA3MTAzOTgsInBrIjoiMTAyLjEzMC4xMjcuMTE3In0%3D&page%5Blimit%5D=100"
144267+
self: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ%3D%3D&page%5Blimit%5D=100"
144268+
schema:
144269+
$ref: "#/components/schemas/ListRowsResponse"
144270+
description: OK
144271+
"400":
144272+
$ref: "#/components/responses/BadRequestResponse"
144273+
"403":
144274+
$ref: "#/components/responses/ForbiddenResponse"
144275+
"404":
144276+
$ref: "#/components/responses/NotFoundResponse"
144277+
"429":
144278+
$ref: "#/components/responses/TooManyRequestsResponse"
144279+
security:
144280+
- apiKeyAuth: []
144281+
appKeyAuth: []
144282+
- AuthZ: []
144283+
summary: List rows
144284+
tags:
144285+
- Reference Tables
144174144286
/api/v2/reference-tables/uploads:
144175144287
post:
144176144288
description: Create a reference table upload for bulk data ingestion

docs/datadog_api_client.v2.model.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19016,6 +19016,20 @@ datadog\_api\_client.v2.model.list\_relation\_catalog\_response\_links module
1901619016
:members:
1901719017
:show-inheritance:
1901819018

19019+
datadog\_api\_client.v2.model.list\_rows\_response module
19020+
---------------------------------------------------------
19021+
19022+
.. automodule:: datadog_api_client.v2.model.list_rows_response
19023+
:members:
19024+
:show-inheritance:
19025+
19026+
datadog\_api\_client.v2.model.list\_rows\_response\_links module
19027+
----------------------------------------------------------------
19028+
19029+
.. automodule:: datadog_api_client.v2.model.list_rows_response_links
19030+
:members:
19031+
:show-inheritance:
19032+
1901919033
datadog\_api\_client.v2.model.list\_rules\_response module
1902019034
----------------------------------------------------------
1902119035

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
List rows returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.reference_tables_api import ReferenceTablesApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = ReferenceTablesApi(api_client)
11+
response = api_instance.list_reference_table_rows(
12+
id="id",
13+
)
14+
15+
print(response)

src/datadog_api_client/v2/api/reference_tables_api.py

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from datadog_api_client.v2.model.batch_delete_rows_request_array import BatchDeleteRowsRequestArray
2222
from datadog_api_client.v2.model.table_row_resource_array import TableRowResourceArray
2323
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
2425
from datadog_api_client.v2.model.create_upload_response import CreateUploadResponse
2526
from datadog_api_client.v2.model.create_upload_request import CreateUploadRequest
2627

@@ -197,6 +198,43 @@ def __init__(self, api_client=None):
197198
api_client=api_client,
198199
)
199200

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+
200238
self._list_tables_endpoint = _Endpoint(
201239
settings={
202240
"response_type": (TableResultV2Array,),
@@ -433,6 +471,36 @@ def get_table(
433471

434472
return self._get_table_endpoint.call_with_http_info(**kwargs)
435473

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+
436504
def list_tables(
437505
self,
438506
*,
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import List, TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
)
12+
13+
14+
if TYPE_CHECKING:
15+
from datadog_api_client.v2.model.table_row_resource_data import TableRowResourceData
16+
from datadog_api_client.v2.model.list_rows_response_links import ListRowsResponseLinks
17+
18+
19+
class ListRowsResponse(ModelNormal):
20+
@cached_property
21+
def openapi_types(_):
22+
from datadog_api_client.v2.model.table_row_resource_data import TableRowResourceData
23+
from datadog_api_client.v2.model.list_rows_response_links import ListRowsResponseLinks
24+
25+
return {
26+
"data": ([TableRowResourceData],),
27+
"links": (ListRowsResponseLinks,),
28+
}
29+
30+
attribute_map = {
31+
"data": "data",
32+
"links": "links",
33+
}
34+
35+
def __init__(self_, data: List[TableRowResourceData], links: ListRowsResponseLinks, **kwargs):
36+
"""
37+
Paginated list of reference table rows.
38+
39+
:param data: The rows.
40+
:type data: [TableRowResourceData]
41+
42+
:param links: Pagination links for the list rows response.
43+
:type links: ListRowsResponseLinks
44+
"""
45+
super().__init__(kwargs)
46+
47+
self_.data = data
48+
self_.links = links
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import Union
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
class ListRowsResponseLinks(ModelNormal):
17+
@cached_property
18+
def openapi_types(_):
19+
return {
20+
"first": (str,),
21+
"next": (str,),
22+
"self": (str,),
23+
}
24+
25+
attribute_map = {
26+
"first": "first",
27+
"next": "next",
28+
"self": "self",
29+
}
30+
31+
def __init__(self_, first: str, self: str, next: Union[str, UnsetType] = unset, **kwargs):
32+
"""
33+
Pagination links for the list rows response.
34+
35+
:param first: Link to the first page of results.
36+
:type first: str
37+
38+
:param next: Link to the next page of results. Only present when more rows are available.
39+
:type next: str, optional
40+
41+
:param self: Link to the current page of results.
42+
:type self: str
43+
"""
44+
if next is not unset:
45+
kwargs["next"] = next
46+
super().__init__(kwargs)
47+
48+
self_.first = first
49+
self_.self = self

src/datadog_api_client/v2/models/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3934,6 +3934,8 @@
39343934
from datadog_api_client.v2.model.list_powerpacks_response import ListPowerpacksResponse
39353935
from datadog_api_client.v2.model.list_relation_catalog_response import ListRelationCatalogResponse
39363936
from datadog_api_client.v2.model.list_relation_catalog_response_links import ListRelationCatalogResponseLinks
3937+
from datadog_api_client.v2.model.list_rows_response import ListRowsResponse
3938+
from datadog_api_client.v2.model.list_rows_response_links import ListRowsResponseLinks
39373939
from datadog_api_client.v2.model.list_rules_response import ListRulesResponse
39383940
from datadog_api_client.v2.model.list_rules_response_data_item import ListRulesResponseDataItem
39393941
from datadog_api_client.v2.model.list_rules_response_links import ListRulesResponseLinks
@@ -11547,6 +11549,8 @@
1154711549
"ListPowerpacksResponse",
1154811550
"ListRelationCatalogResponse",
1154911551
"ListRelationCatalogResponseLinks",
11552+
"ListRowsResponse",
11553+
"ListRowsResponseLinks",
1155011554
"ListRulesResponse",
1155111555
"ListRulesResponseDataItem",
1155211556
"ListRulesResponseLinks",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2026-05-15T19:32:21.293Z
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
interactions:
2+
- request:
3+
body: null
4+
headers:
5+
accept:
6+
- application/json
7+
method: GET
8+
uri: https://api.datadoghq.com/api/v2/reference-tables/tables/not-a-valid-uuid/rows/list
9+
response:
10+
body:
11+
string: '{"errors":[{"title":"Generic Error","detail":"table ID must be a valid
12+
UUID format"}]}'
13+
headers:
14+
content-type:
15+
- application/vnd.api+json
16+
status:
17+
code: 400
18+
message: Bad Request
19+
version: 1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2026-05-15T19:32:23.068Z

0 commit comments

Comments
 (0)