Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 7 additions & 135 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7475,89 +7475,23 @@ components:
properties:
data:
items:
$ref: '#/components/schemas/TableRowResourceIdentifier'
$ref: '#/components/schemas/BatchDeleteRowsRequestData'
maxItems: 200
type: array
required:
- data
type: object
BatchRowsQueryDataType:
default: reference-tables-batch-rows-query
description: Resource type identifier for batch queries of reference table rows.
enum:
- reference-tables-batch-rows-query
example: reference-tables-batch-rows-query
type: string
x-enum-varnames:
- REFERENCE_TABLES_BATCH_ROWS_QUERY
BatchRowsQueryRequest:
properties:
data:
$ref: '#/components/schemas/BatchRowsQueryRequestData'
type: object
BatchRowsQueryRequestData:
properties:
attributes:
$ref: '#/components/schemas/BatchRowsQueryRequestDataAttributes'
type:
$ref: '#/components/schemas/BatchRowsQueryDataType'
required:
- type
type: object
BatchRowsQueryRequestDataAttributes:
properties:
row_ids:
example:
- row_id_1
- row_id_2
items:
type: string
type: array
table_id:
example: 00000000-0000-0000-0000-000000000000
type: string
required:
- row_ids
- table_id
type: object
BatchRowsQueryResponse:
example:
data:
id: 00000000-0000-0000-0000-000000000000
relationships:
rows:
data:
- id: row_id_1
type: row
- id: row_id_2
type: row
type: reference-tables-batch-rows-query
properties:
data:
$ref: '#/components/schemas/BatchRowsQueryResponseData'
type: object
BatchRowsQueryResponseData:
BatchDeleteRowsRequestData:
description: Row resource containing a single row identifier for deletion.
properties:
id:
example: primary_key_value
type: string
relationships:
$ref: '#/components/schemas/BatchRowsQueryResponseDataRelationships'
type:
$ref: '#/components/schemas/BatchRowsQueryDataType'
$ref: '#/components/schemas/TableRowResourceDataType'
required:
- type
type: object
BatchRowsQueryResponseDataRelationships:
properties:
rows:
$ref: '#/components/schemas/BatchRowsQueryResponseDataRelationshipsRows'
type: object
BatchRowsQueryResponseDataRelationshipsRows:
properties:
data:
items:
$ref: '#/components/schemas/TableRowResourceIdentifier'
type: array
- id
type: object
BatchUpsertRowsRequestArray:
description: The request body for creating or updating multiple rows into a
Expand Down Expand Up @@ -59634,6 +59568,7 @@ components:
SecurityMonitoringStandardDataSource:
default: logs
description: Source of events, either logs, audit trail, or Datadog events.
`app_sec_spans` is deprecated in favor of `spans`.
enum:
- logs
- audit
Expand Down Expand Up @@ -67019,18 +66954,6 @@ components:
type: string
x-enum-varnames:
- ROW
TableRowResourceIdentifier:
description: Row resource containing a single row identifier.
properties:
id:
example: primary_key_value
type: string
type:
$ref: '#/components/schemas/TableRowResourceDataType'
required:
- type
- id
type: object
TagsEventAttribute:
description: Array of tags associated with your event.
example:
Expand Down Expand Up @@ -96466,57 +96389,6 @@ paths:
operator: OR
permissions:
- timeseries_query
/api/v2/reference-tables/queries/batch-rows:
post:
description: Batch query reference table rows by their primary key values. Returns
only found rows in the included array.
operationId: BatchRowsQuery
requestBody:
content:
application/json:
examples:
happy_path:
summary: Batch query reference table rows by their primary key values.
value:
data:
attributes:
row_ids:
- row_id_1
- row_id_2
table_id: 00000000-0000-0000-0000-000000000000
type: reference-tables-batch-rows-query
schema:
$ref: '#/components/schemas/BatchRowsQueryRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BatchRowsQueryResponse'
description: Successfully retrieved rows. Some or all requested rows were
found. Response includes found rows in the included section.
'400':
$ref: '#/components/responses/BadRequestResponse'
'403':
$ref: '#/components/responses/ForbiddenResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Internal Server Error
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ: []
summary: Batch rows query
tags:
- Reference Tables
/api/v2/reference-tables/tables:
get:
description: List all reference tables in this organization.
Expand Down
60 changes: 2 additions & 58 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2769,59 +2769,10 @@ datadog\_api\_client.v2.model.batch\_delete\_rows\_request\_array module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.batch\_rows\_query\_data\_type module
-------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.batch_rows_query_data_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.batch\_rows\_query\_request module
----------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.batch_rows_query_request
:members:
:show-inheritance:

datadog\_api\_client.v2.model.batch\_rows\_query\_request\_data module
----------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.batch_rows_query_request_data
:members:
:show-inheritance:

datadog\_api\_client.v2.model.batch\_rows\_query\_request\_data\_attributes module
----------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.batch_rows_query_request_data_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.batch\_rows\_query\_response module
-----------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.batch_rows_query_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.batch\_rows\_query\_response\_data module
datadog\_api\_client.v2.model.batch\_delete\_rows\_request\_data module
-----------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.batch_rows_query_response_data
:members:
:show-inheritance:

datadog\_api\_client.v2.model.batch\_rows\_query\_response\_data\_relationships module
--------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.batch_rows_query_response_data_relationships
:members:
:show-inheritance:

datadog\_api\_client.v2.model.batch\_rows\_query\_response\_data\_relationships\_rows module
--------------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.batch_rows_query_response_data_relationships_rows
.. automodule:: datadog_api_client.v2.model.batch_delete_rows_request_data
:members:
:show-inheritance:

Expand Down Expand Up @@ -29355,13 +29306,6 @@ datadog\_api\_client.v2.model.table\_row\_resource\_data\_type module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.table\_row\_resource\_identifier module
---------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.table_row_resource_identifier
:members:
:show-inheritance:

datadog\_api\_client.v2.model.tags\_event\_attribute module
-----------------------------------------------------------

Expand Down
31 changes: 0 additions & 31 deletions examples/v2/reference-tables/BatchRowsQuery.py

This file was deleted.

4 changes: 2 additions & 2 deletions examples/v2/reference-tables/DeleteRows.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.reference_tables_api import ReferenceTablesApi
from datadog_api_client.v2.model.batch_delete_rows_request_array import BatchDeleteRowsRequestArray
from datadog_api_client.v2.model.batch_delete_rows_request_data import BatchDeleteRowsRequestData
from datadog_api_client.v2.model.table_row_resource_data_type import TableRowResourceDataType
from datadog_api_client.v2.model.table_row_resource_identifier import TableRowResourceIdentifier

body = BatchDeleteRowsRequestArray(
data=[
TableRowResourceIdentifier(
BatchDeleteRowsRequestData(
id="primary_key_value",
type=TableRowResourceDataType.ROW,
),
Expand Down
38 changes: 0 additions & 38 deletions src/datadog_api_client/v2/api/reference_tables_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
UnsetType,
unset,
)
from datadog_api_client.v2.model.batch_rows_query_response import BatchRowsQueryResponse
from datadog_api_client.v2.model.batch_rows_query_request import BatchRowsQueryRequest
from datadog_api_client.v2.model.table_result_v2_array import TableResultV2Array
from datadog_api_client.v2.model.reference_table_sort_type import ReferenceTableSortType
from datadog_api_client.v2.model.table_result_v2 import TableResultV2
Expand All @@ -35,26 +33,6 @@ def __init__(self, api_client=None):
api_client = ApiClient(Configuration())
self.api_client = api_client

self._batch_rows_query_endpoint = _Endpoint(
settings={
"response_type": (BatchRowsQueryResponse,),
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
"endpoint_path": "/api/v2/reference-tables/queries/batch-rows",
"operation_id": "batch_rows_query",
"http_method": "POST",
"version": "v2",
},
params_map={
"body": {
"required": True,
"openapi_types": (BatchRowsQueryRequest,),
"location": "body",
},
},
headers_map={"accept": ["application/json"], "content_type": ["application/json"]},
api_client=api_client,
)

self._create_reference_table_endpoint = _Endpoint(
settings={
"response_type": (TableResultV2,),
Expand Down Expand Up @@ -303,22 +281,6 @@ def __init__(self, api_client=None):
api_client=api_client,
)

def batch_rows_query(
self,
body: BatchRowsQueryRequest,
) -> BatchRowsQueryResponse:
"""Batch rows query.

Batch query reference table rows by their primary key values. Returns only found rows in the included array.

:type body: BatchRowsQueryRequest
:rtype: BatchRowsQueryResponse
"""
kwargs: Dict[str, Any] = {}
kwargs["body"] = body

return self._batch_rows_query_endpoint.call_with_http_info(**kwargs)

def create_reference_table(
self,
body: CreateTableRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


if TYPE_CHECKING:
from datadog_api_client.v2.model.table_row_resource_identifier import TableRowResourceIdentifier
from datadog_api_client.v2.model.batch_delete_rows_request_data import BatchDeleteRowsRequestData


class BatchDeleteRowsRequestArray(ModelNormal):
Expand All @@ -24,22 +24,22 @@ class BatchDeleteRowsRequestArray(ModelNormal):

@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.table_row_resource_identifier import TableRowResourceIdentifier
from datadog_api_client.v2.model.batch_delete_rows_request_data import BatchDeleteRowsRequestData

return {
"data": ([TableRowResourceIdentifier],),
"data": ([BatchDeleteRowsRequestData],),
}

attribute_map = {
"data": "data",
}

def __init__(self_, data: List[TableRowResourceIdentifier], **kwargs):
def __init__(self_, data: List[BatchDeleteRowsRequestData], **kwargs):
"""
The request body for deleting multiple rows from a reference table.

:param data:
:type data: [TableRowResourceIdentifier]
:type data: [BatchDeleteRowsRequestData]
"""
super().__init__(kwargs)

Expand Down
Loading
Loading