Skip to content

Commit 79db404

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 99e84ba of spec repo
1 parent 4d3d697 commit 79db404

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
@@ -43548,6 +43548,51 @@ components:
4354843548
example: "/api/v2/catalog/relation?filter[from_ref]=service:service-catalog&include=entity&page[limit]=2&page[offset]=0"
4354943549
type: string
4355043550
type: object
43551+
ListRowsResponse:
43552+
description: Paginated list of reference table rows.
43553+
example:
43554+
data:
43555+
- attributes:
43556+
values:
43557+
category: tor
43558+
intention: suspicious
43559+
ip_address: 102.130.113.9
43560+
id: 102.130.113.9
43561+
type: row
43562+
links:
43563+
first: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Blimit%5D=100"
43564+
self: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ%3D%3D&page%5Blimit%5D=100"
43565+
properties:
43566+
data:
43567+
description: The rows.
43568+
items:
43569+
$ref: "#/components/schemas/TableRowResourceData"
43570+
type: array
43571+
links:
43572+
$ref: "#/components/schemas/ListRowsResponseLinks"
43573+
required:
43574+
- data
43575+
- links
43576+
type: object
43577+
ListRowsResponseLinks:
43578+
description: Pagination links for the list rows response.
43579+
properties:
43580+
first:
43581+
description: Link to the first page of results.
43582+
example: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Blimit%5D=100"
43583+
type: string
43584+
next:
43585+
description: Link to the next page of results. Only present when more rows are available.
43586+
example: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ%3D%3D&page%5Blimit%5D=100"
43587+
type: string
43588+
self:
43589+
description: Link to the current page of results.
43590+
example: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ%3D%3D&page%5Blimit%5D=100"
43591+
type: string
43592+
required:
43593+
- self
43594+
- first
43595+
type: object
4355143596
ListRulesResponse:
4355243597
description: Scorecard rules response.
4355343598
properties:
@@ -127568,6 +127613,73 @@ paths:
127568127613
summary: Upsert rows
127569127614
tags:
127570127615
- Reference Tables
127616+
/api/v2/reference-tables/tables/{id}/rows/list:
127617+
get:
127618+
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.
127619+
operationId: ListReferenceTableRows
127620+
parameters:
127621+
- description: Unique identifier of the reference table to list rows from.
127622+
example: "00000000-0000-0000-0000-000000000000"
127623+
in: path
127624+
name: id
127625+
required: true
127626+
schema:
127627+
type: string
127628+
- description: Number of rows to return per page. Defaults to 100, maximum is 1000.
127629+
example: 100
127630+
in: query
127631+
name: page[limit]
127632+
required: false
127633+
schema:
127634+
default: 100
127635+
format: int64
127636+
maximum: 1000
127637+
minimum: 1
127638+
type: integer
127639+
- description: Opaque cursor from the previous response's next link. Pass this to retrieve the next page on the same consistent snapshot.
127640+
example: "eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ=="
127641+
in: query
127642+
name: page[continuation_token]
127643+
required: false
127644+
schema:
127645+
type: string
127646+
responses:
127647+
"200":
127648+
content:
127649+
application/json:
127650+
examples:
127651+
default:
127652+
value:
127653+
data:
127654+
- attributes:
127655+
values:
127656+
category: tor
127657+
intention: suspicious
127658+
ip_address: 102.130.113.9
127659+
id: 102.130.113.9
127660+
type: row
127661+
links:
127662+
first: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Blimit%5D=100"
127663+
next: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjY5NzA0ODkwNDE4ODA3MTAzOTgsInBrIjoiMTAyLjEzMC4xMjcuMTE3In0%3D&page%5Blimit%5D=100"
127664+
self: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ%3D%3D&page%5Blimit%5D=100"
127665+
schema:
127666+
$ref: "#/components/schemas/ListRowsResponse"
127667+
description: OK
127668+
"400":
127669+
$ref: "#/components/responses/BadRequestResponse"
127670+
"403":
127671+
$ref: "#/components/responses/ForbiddenResponse"
127672+
"404":
127673+
$ref: "#/components/responses/NotFoundResponse"
127674+
"429":
127675+
$ref: "#/components/responses/TooManyRequestsResponse"
127676+
security:
127677+
- apiKeyAuth: []
127678+
appKeyAuth: []
127679+
- AuthZ: []
127680+
summary: List rows
127681+
tags:
127682+
- Reference Tables
127571127683
/api/v2/reference-tables/uploads:
127572127684
post:
127573127685
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
@@ -17399,6 +17399,20 @@ datadog\_api\_client.v2.model.list\_relation\_catalog\_response\_links module
1739917399
:members:
1740017400
:show-inheritance:
1740117401

17402+
datadog\_api\_client.v2.model.list\_rows\_response module
17403+
---------------------------------------------------------
17404+
17405+
.. automodule:: datadog_api_client.v2.model.list_rows_response
17406+
:members:
17407+
:show-inheritance:
17408+
17409+
datadog\_api\_client.v2.model.list\_rows\_response\_links module
17410+
----------------------------------------------------------------
17411+
17412+
.. automodule:: datadog_api_client.v2.model.list_rows_response_links
17413+
:members:
17414+
:show-inheritance:
17415+
1740217416
datadog\_api\_client.v2.model.list\_rules\_response module
1740317417
----------------------------------------------------------
1740417418

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
@@ -3504,6 +3504,8 @@
35043504
from datadog_api_client.v2.model.list_powerpacks_response import ListPowerpacksResponse
35053505
from datadog_api_client.v2.model.list_relation_catalog_response import ListRelationCatalogResponse
35063506
from datadog_api_client.v2.model.list_relation_catalog_response_links import ListRelationCatalogResponseLinks
3507+
from datadog_api_client.v2.model.list_rows_response import ListRowsResponse
3508+
from datadog_api_client.v2.model.list_rows_response_links import ListRowsResponseLinks
35073509
from datadog_api_client.v2.model.list_rules_response import ListRulesResponse
35083510
from datadog_api_client.v2.model.list_rules_response_data_item import ListRulesResponseDataItem
35093511
from datadog_api_client.v2.model.list_rules_response_links import ListRulesResponseLinks
@@ -10339,6 +10341,8 @@
1033910341
"ListPowerpacksResponse",
1034010342
"ListRelationCatalogResponse",
1034110343
"ListRelationCatalogResponseLinks",
10344+
"ListRowsResponse",
10345+
"ListRowsResponseLinks",
1034210346
"ListRulesResponse",
1034310347
"ListRulesResponseDataItem",
1034410348
"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)