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
112 changes: 112 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43548,6 +43548,51 @@ components:
example: "/api/v2/catalog/relation?filter[from_ref]=service:service-catalog&include=entity&page[limit]=2&page[offset]=0"
type: string
type: object
ListRowsResponse:
description: Paginated list of reference table rows.
example:
data:
- attributes:
values:
category: tor
intention: suspicious
ip_address: 102.130.113.9
id: 102.130.113.9
type: row
links:
first: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Blimit%5D=100"
self: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ%3D%3D&page%5Blimit%5D=100"
properties:
data:
description: The rows.
items:
$ref: "#/components/schemas/TableRowResourceData"
type: array
links:
$ref: "#/components/schemas/ListRowsResponseLinks"
required:
- data
- links
type: object
ListRowsResponseLinks:
description: Pagination links for the list rows response.
properties:
first:
description: Link to the first page of results.
example: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Blimit%5D=100"
type: string
next:
description: Link to the next page of results. Only present when more rows are available.
example: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ%3D%3D&page%5Blimit%5D=100"
type: string
self:
description: Link to the current page of results.
example: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ%3D%3D&page%5Blimit%5D=100"
type: string
required:
- self
- first
type: object
ListRulesResponse:
description: Scorecard rules response.
properties:
Expand Down Expand Up @@ -127568,6 +127613,73 @@ paths:
summary: Upsert rows
tags:
- Reference Tables
/api/v2/reference-tables/tables/{id}/rows/list:
get:
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.
operationId: ListReferenceTableRows
parameters:
- description: Unique identifier of the reference table to list rows from.
example: "00000000-0000-0000-0000-000000000000"
in: path
name: id
required: true
schema:
type: string
- description: Number of rows to return per page. Defaults to 100, maximum is 1000.
example: 100
in: query
name: page[limit]
required: false
schema:
default: 100
format: int64
maximum: 1000
minimum: 1
type: integer
- description: Opaque cursor from the previous response's next link. Pass this to retrieve the next page on the same consistent snapshot.
example: "eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ=="
in: query
name: page[continuation_token]
required: false
schema:
type: string
responses:
"200":
content:
application/json:
examples:
default:
value:
data:
- attributes:
values:
category: tor
intention: suspicious
ip_address: 102.130.113.9
id: 102.130.113.9
type: row
links:
first: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Blimit%5D=100"
next: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjY5NzA0ODkwNDE4ODA3MTAzOTgsInBrIjoiMTAyLjEzMC4xMjcuMTE3In0%3D&page%5Blimit%5D=100"
self: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ%3D%3D&page%5Blimit%5D=100"
schema:
$ref: "#/components/schemas/ListRowsResponse"
description: OK
"400":
$ref: "#/components/responses/BadRequestResponse"
"403":
$ref: "#/components/responses/ForbiddenResponse"
"404":
$ref: "#/components/responses/NotFoundResponse"
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ: []
summary: List rows
tags:
- Reference Tables
/api/v2/reference-tables/uploads:
post:
description: Create a reference table upload for bulk data ingestion
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-05-15T19:32:21.293Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-05-15T19:32:23.068Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions examples/v2/reference-tables/ListReferenceTableRows.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# List rows returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::ReferenceTablesAPI.new
p api_instance.list_reference_table_rows("id")
5 changes: 5 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3855,6 +3855,11 @@
"id" => "String",
"body" => "BatchUpsertRowsRequestArray",
},
"v2.ListReferenceTableRows" => {
"id" => "String",
"page_limit" => "Integer",
"page_continuation_token" => "String",
},
"v2.CreateReferenceTableUpload" => {
"body" => "CreateUploadRequest",
},
Expand Down
35 changes: 35 additions & 0 deletions features/v2/reference_tables.feature
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,41 @@ Feature: Reference Tables
When the request is sent
Then the response status is 200 OK

@team:DataDog/redapl-experiences
Scenario: List reference table rows returns "Bad Request" response for invalid limit
Given new "ListReferenceTableRows" request
And request contains "id" parameter with value "not-a-valid-uuid"
When the request is sent
Then the response status is 400 Bad Request

@team:DataDog/redapl-experiences
Scenario: List reference table rows returns "Not Found" response
Given new "ListReferenceTableRows" request
And request contains "id" parameter with value "00000000-0000-0000-0000-000000000000"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/redapl-experiences
Scenario: List rows returns "Bad Request" response
Given new "ListReferenceTableRows" request
And request contains "id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/redapl-experiences
Scenario: List rows returns "Not Found" response
Given new "ListReferenceTableRows" request
And request contains "id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/redapl-experiences
Scenario: List rows returns "OK" response
Given new "ListReferenceTableRows" request
And request contains "id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@skip @team:DataDog/redapl-experiences
Scenario: List tables returns "OK" response
Given new "ListTables" request
Expand Down
6 changes: 6 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4820,6 +4820,12 @@
"type": "unsafe"
}
},
"ListReferenceTableRows": {
"tag": "Reference Tables",
"undo": {
"type": "safe"
}
},
"CreateReferenceTableUpload": {
"tag": "Reference Tables",
"undo": {
Expand Down
2 changes: 2 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3573,6 +3573,8 @@ def overrides
"v2.list_powerpacks_response" => "ListPowerpacksResponse",
"v2.list_relation_catalog_response" => "ListRelationCatalogResponse",
"v2.list_relation_catalog_response_links" => "ListRelationCatalogResponseLinks",
"v2.list_rows_response" => "ListRowsResponse",
"v2.list_rows_response_links" => "ListRowsResponseLinks",
"v2.list_rules_response" => "ListRulesResponse",
"v2.list_rules_response_data_item" => "ListRulesResponseDataItem",
"v2.list_rules_response_links" => "ListRulesResponseLinks",
Expand Down
75 changes: 75 additions & 0 deletions lib/datadog_api_client/v2/api/reference_tables_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,81 @@ def get_table_with_http_info(id, opts = {})
return data, status_code, headers
end

# List rows.
#
# @see #list_reference_table_rows_with_http_info
def list_reference_table_rows(id, opts = {})
data, _status_code, _headers = list_reference_table_rows_with_http_info(id, opts)
data
end

# List rows.
#
# 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.
#
# @param id [String] Unique identifier of the reference table to list rows from.
# @param opts [Hash] the optional parameters
# @option opts [Integer] :page_limit Number of rows to return per page. Defaults to 100, maximum is 1000.
# @option opts [String] :page_continuation_token Opaque cursor from the previous response's next link. Pass this to retrieve the next page on the same consistent snapshot.
# @return [Array<(ListRowsResponse, Integer, Hash)>] ListRowsResponse data, response status code and response headers
def list_reference_table_rows_with_http_info(id, opts = {})

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ReferenceTablesAPI.list_reference_table_rows ...'
end
# verify the required parameter 'id' is set
if @api_client.config.client_side_validation && id.nil?
fail ArgumentError, "Missing the required parameter 'id' when calling ReferenceTablesAPI.list_reference_table_rows"
end
if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] > 1000
fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling ReferenceTablesAPI.list_reference_table_rows, must be smaller than or equal to 1000.'
end
if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] < 1
fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling ReferenceTablesAPI.list_reference_table_rows, must be greater than or equal to 1.'
end
# resource path
local_var_path = '/api/v2/reference-tables/tables/{id}/rows/list'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/'))

# query parameters
query_params = opts[:query_params] || {}
query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil?
query_params[:'page[continuation_token]'] = opts[:'page_continuation_token'] if !opts[:'page_continuation_token'].nil?

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

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

# http body (model)
post_body = opts[:debug_body]

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

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

new_options = opts.merge(
:operation => :list_reference_table_rows,
: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::Get, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ReferenceTablesAPI#list_reference_table_rows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end

# List tables.
#
# @see #list_tables_with_http_info
Expand Down
Loading
Loading