Skip to content

Commit c3205f9

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 31fbabf of spec repo
1 parent 5c6f8ac commit c3205f9

9 files changed

Lines changed: 344 additions & 0 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42992,6 +42992,51 @@ components:
4299242992
example: "/api/v2/catalog/relation?filter[from_ref]=service:service-catalog&include=entity&page[limit]=2&page[offset]=0"
4299342993
type: string
4299442994
type: object
42995+
ListRowsResponse:
42996+
description: Paginated list of reference table rows.
42997+
example:
42998+
data:
42999+
- attributes:
43000+
values:
43001+
category: tor
43002+
intention: suspicious
43003+
ip_address: 102.130.113.9
43004+
id: 102.130.113.9
43005+
type: row
43006+
links:
43007+
first: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Blimit%5D=100"
43008+
self: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ%3D%3D&page%5Blimit%5D=100"
43009+
properties:
43010+
data:
43011+
description: The rows.
43012+
items:
43013+
$ref: "#/components/schemas/TableRowResourceData"
43014+
type: array
43015+
links:
43016+
$ref: "#/components/schemas/ListRowsResponseLinks"
43017+
required:
43018+
- data
43019+
- links
43020+
type: object
43021+
ListRowsResponseLinks:
43022+
description: Pagination links for the list rows response.
43023+
properties:
43024+
first:
43025+
description: Link to the first page of results.
43026+
example: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Blimit%5D=100"
43027+
type: string
43028+
next:
43029+
description: Link to the next page of results. Only present when more rows are available.
43030+
example: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ%3D%3D&page%5Blimit%5D=100"
43031+
type: string
43032+
self:
43033+
description: Link to the current page of results.
43034+
example: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ%3D%3D&page%5Blimit%5D=100"
43035+
type: string
43036+
required:
43037+
- self
43038+
- first
43039+
type: object
4299543040
ListRulesResponse:
4299643041
description: Scorecard rules response.
4299743042
properties:
@@ -126634,6 +126679,72 @@ paths:
126634126679
summary: Upsert rows
126635126680
tags:
126636126681
- Reference Tables
126682+
/api/v2/reference-tables/tables/{id}/rows/list:
126683+
get:
126684+
description: List rows from a reference table using cursor-based pagination. Use the returned continuation_token in the next request to fetch the following page. Returns a 400 error for tables with more than 10,000,000 rows.
126685+
operationId: ListReferenceTableRows
126686+
parameters:
126687+
- description: Unique identifier of the reference table to list rows from.
126688+
example: "00000000-0000-0000-0000-000000000000"
126689+
in: path
126690+
name: id
126691+
required: true
126692+
schema:
126693+
type: string
126694+
- description: Number of rows to return per page. Defaults to 100, maximum is 1000.
126695+
example: 100
126696+
in: query
126697+
name: page[limit]
126698+
required: false
126699+
schema:
126700+
default: 100
126701+
format: int64
126702+
maximum: 1000
126703+
minimum: 1
126704+
type: integer
126705+
- description: Opaque cursor returned in the previous response links.next. Pass this value to retrieve the next page of results on the same consistent snapshot.
126706+
example: "eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ=="
126707+
in: query
126708+
name: page[continuation_token]
126709+
required: false
126710+
schema:
126711+
type: string
126712+
responses:
126713+
"200":
126714+
content:
126715+
application/json:
126716+
examples:
126717+
default:
126718+
value:
126719+
data:
126720+
- attributes:
126721+
values:
126722+
category: tor
126723+
intention: suspicious
126724+
ip_address: 102.130.113.9
126725+
id: 102.130.113.9
126726+
type: row
126727+
links:
126728+
first: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Blimit%5D=100"
126729+
self: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Blimit%5D=100"
126730+
schema:
126731+
$ref: "#/components/schemas/ListRowsResponse"
126732+
description: OK
126733+
"400":
126734+
$ref: "#/components/responses/BadRequestResponse"
126735+
"403":
126736+
$ref: "#/components/responses/ForbiddenResponse"
126737+
"404":
126738+
$ref: "#/components/responses/NotFoundResponse"
126739+
"429":
126740+
$ref: "#/components/responses/TooManyRequestsResponse"
126741+
security:
126742+
- apiKeyAuth: []
126743+
appKeyAuth: []
126744+
- AuthZ: []
126745+
summary: List reference table rows
126746+
tags:
126747+
- Reference Tables
126637126748
/api/v2/reference-tables/uploads:
126638126749
post:
126639126750
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
@@ -17259,6 +17259,20 @@ datadog\_api\_client.v2.model.list\_relation\_catalog\_response\_links module
1725917259
:members:
1726017260
:show-inheritance:
1726117261

17262+
datadog\_api\_client.v2.model.list\_rows\_response module
17263+
---------------------------------------------------------
17264+
17265+
.. automodule:: datadog_api_client.v2.model.list_rows_response
17266+
:members:
17267+
:show-inheritance:
17268+
17269+
datadog\_api\_client.v2.model.list\_rows\_response\_links module
17270+
----------------------------------------------------------------
17271+
17272+
.. automodule:: datadog_api_client.v2.model.list_rows_response_links
17273+
:members:
17274+
:show-inheritance:
17275+
1726217276
datadog\_api\_client.v2.model.list\_rules\_response module
1726317277
----------------------------------------------------------
1726417278

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
List reference table 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 reference table rows.
482+
483+
List rows from a reference table using cursor-based pagination. Use the returned continuation_token in the next request to fetch the following page. Returns a 400 error 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 returned in the previous response links.next. Pass this value to retrieve the next page of results 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
@@ -3464,6 +3464,8 @@
34643464
from datadog_api_client.v2.model.list_powerpacks_response import ListPowerpacksResponse
34653465
from datadog_api_client.v2.model.list_relation_catalog_response import ListRelationCatalogResponse
34663466
from datadog_api_client.v2.model.list_relation_catalog_response_links import ListRelationCatalogResponseLinks
3467+
from datadog_api_client.v2.model.list_rows_response import ListRowsResponse
3468+
from datadog_api_client.v2.model.list_rows_response_links import ListRowsResponseLinks
34673469
from datadog_api_client.v2.model.list_rules_response import ListRulesResponse
34683470
from datadog_api_client.v2.model.list_rules_response_data_item import ListRulesResponseDataItem
34693471
from datadog_api_client.v2.model.list_rules_response_links import ListRulesResponseLinks
@@ -10267,6 +10269,8 @@
1026710269
"ListPowerpacksResponse",
1026810270
"ListRelationCatalogResponse",
1026910271
"ListRelationCatalogResponseLinks",
10272+
"ListRowsResponse",
10273+
"ListRowsResponseLinks",
1027010274
"ListRulesResponse",
1027110275
"ListRulesResponseDataItem",
1027210276
"ListRulesResponseLinks",

0 commit comments

Comments
 (0)