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
19 changes: 0 additions & 19 deletions examples/v2/reference-tables/BatchRowsQuery.rb

This file was deleted.

2 changes: 1 addition & 1 deletion examples/v2/reference-tables/DeleteRows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

body = DatadogAPIClient::V2::BatchDeleteRowsRequestArray.new({
data: [
DatadogAPIClient::V2::TableRowResourceIdentifier.new({
DatadogAPIClient::V2::BatchDeleteRowsRequestData.new({
id: "primary_key_value",
type: DatadogAPIClient::V2::TableRowResourceDataType::ROW,
}),
Expand Down
3 changes: 0 additions & 3 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3247,9 +3247,6 @@
"v2.ListConnections" => {
"entity" => "String",
},
"v2.BatchRowsQuery" => {
"body" => "BatchRowsQueryRequest",
},
"v2.ListTables" => {
"page_limit" => "Integer",
"page_offset" => "Integer",
Expand Down
21 changes: 0 additions & 21 deletions features/v2/reference_tables.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,6 @@ Feature: Reference Tables
And a valid "appKeyAuth" key in the system
And an instance of "ReferenceTables" API

@generated @skip @team:DataDog/redapl-experiences
Scenario: Batch rows query returns "Bad Request" response
Given new "BatchRowsQuery" request
And body with value {"data": {"attributes": {"row_ids": ["row_id_1", "row_id_2"], "table_id": "00000000-0000-0000-0000-000000000000"}, "type": "reference-tables-batch-rows-query"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/redapl-experiences
Scenario: Batch rows query returns "Not Found" response
Given new "BatchRowsQuery" request
And body with value {"data": {"attributes": {"row_ids": ["row_id_1", "row_id_2"], "table_id": "00000000-0000-0000-0000-000000000000"}, "type": "reference-tables-batch-rows-query"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/redapl-experiences
Scenario: Batch rows query returns "Successfully retrieved rows. Some or all requested rows were found. Response includes found rows in the included section." response
Given new "BatchRowsQuery" request
And body with value {"data": {"attributes": {"row_ids": ["row_id_1", "row_id_2"], "table_id": "00000000-0000-0000-0000-000000000000"}, "type": "reference-tables-batch-rows-query"}}
When the request is sent
Then the response status is 200 Successfully retrieved rows. Some or all requested rows were found. Response includes found rows in the included section.

@generated @skip @team:DataDog/redapl-experiences
Scenario: Create reference table returns "Bad Request" response
Given new "CreateReferenceTable" request
Expand Down
6 changes: 0 additions & 6 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3963,12 +3963,6 @@
"type": "idempotent"
}
},
"BatchRowsQuery": {
"tag": "Reference Tables",
"undo": {
"type": "safe"
}
},
"ListTables": {
"tag": "Reference Tables",
"undo": {
Expand Down
10 changes: 1 addition & 9 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1394,14 +1394,7 @@ def overrides
"v2.azure_uc_config_post_request_type" => "AzureUCConfigPostRequestType",
"v2.azure_uc_configs_response" => "AzureUCConfigsResponse",
"v2.batch_delete_rows_request_array" => "BatchDeleteRowsRequestArray",
"v2.batch_rows_query_data_type" => "BatchRowsQueryDataType",
"v2.batch_rows_query_request" => "BatchRowsQueryRequest",
"v2.batch_rows_query_request_data" => "BatchRowsQueryRequestData",
"v2.batch_rows_query_request_data_attributes" => "BatchRowsQueryRequestDataAttributes",
"v2.batch_rows_query_response" => "BatchRowsQueryResponse",
"v2.batch_rows_query_response_data" => "BatchRowsQueryResponseData",
"v2.batch_rows_query_response_data_relationships" => "BatchRowsQueryResponseDataRelationships",
"v2.batch_rows_query_response_data_relationships_rows" => "BatchRowsQueryResponseDataRelationshipsRows",
"v2.batch_delete_rows_request_data" => "BatchDeleteRowsRequestData",
"v2.batch_upsert_rows_request_array" => "BatchUpsertRowsRequestArray",
"v2.batch_upsert_rows_request_data" => "BatchUpsertRowsRequestData",
"v2.batch_upsert_rows_request_data_attributes" => "BatchUpsertRowsRequestDataAttributes",
Expand Down Expand Up @@ -5176,7 +5169,6 @@ def overrides
"v2.table_row_resource_data" => "TableRowResourceData",
"v2.table_row_resource_data_attributes" => "TableRowResourceDataAttributes",
"v2.table_row_resource_data_type" => "TableRowResourceDataType",
"v2.table_row_resource_identifier" => "TableRowResourceIdentifier",
"v2.team" => "Team",
"v2.team_attributes" => "TeamAttributes",
"v2.team_connection" => "TeamConnection",
Expand Down
67 changes: 0 additions & 67 deletions lib/datadog_api_client/v2/api/reference_tables_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,73 +23,6 @@ def initialize(api_client = DatadogAPIClient::APIClient.default)
@api_client = api_client
end

# Batch rows query.
#
# @see #batch_rows_query_with_http_info
def batch_rows_query(body, opts = {})
data, _status_code, _headers = batch_rows_query_with_http_info(body, opts)
data
end

# Batch rows query.
#
# Batch query reference table rows by their primary key values. Returns only found rows in the included array.
#
# @param body [BatchRowsQueryRequest]
# @param opts [Hash] the optional parameters
# @return [Array<(BatchRowsQueryResponse, Integer, Hash)>] BatchRowsQueryResponse data, response status code and response headers
def batch_rows_query_with_http_info(body, opts = {})

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ReferenceTablesAPI.batch_rows_query ...'
end
# verify the required parameter 'body' is set
if @api_client.config.client_side_validation && body.nil?
fail ArgumentError, "Missing the required parameter 'body' when calling ReferenceTablesAPI.batch_rows_query"
end
# resource path
local_var_path = '/api/v2/reference-tables/queries/batch-rows'

# query parameters
query_params = opts[:query_params] || {}

# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
# HTTP header 'Content-Type'
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

# form parameters
form_params = opts[:form_params] || {}

# http body (model)
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

# return_type
return_type = opts[:debug_return_type] || 'BatchRowsQueryResponse'

# auth_names
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]

new_options = opts.merge(
:operation => :batch_rows_query,
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type,
:api_version => "V2"
)

data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ReferenceTablesAPI#batch_rows_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end

# Create reference table.
#
# @see #create_reference_table_with_http_info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def self.attribute_map
# @!visibility private
def self.openapi_types
{
:'data' => :'Array<TableRowResourceIdentifier>'
:'data' => :'Array<BatchDeleteRowsRequestData>'
}
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
require 'time'

module DatadogAPIClient::V2
# Row resource containing a single row identifier.
class TableRowResourceIdentifier
# Row resource containing a single row identifier for deletion.
class BatchDeleteRowsRequestData
include BaseGenericModel

#
Expand Down Expand Up @@ -52,7 +52,7 @@ def self.openapi_types
# @!visibility private
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TableRowResourceIdentifier` initialize method"
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::BatchDeleteRowsRequestData` initialize method"
end

self.additional_properties = {}
Expand Down
Loading
Loading