Skip to content

Commit 11eaa5a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 31fbabf of spec repo
1 parent 82987f5 commit 11eaa5a

9 files changed

Lines changed: 533 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
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# List reference table rows returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::ReferenceTablesAPI.new
5+
p api_instance.list_reference_table_rows("id")

features/scenarios_model_mapping.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3832,6 +3832,11 @@
38323832
"id" => "String",
38333833
"body" => "BatchUpsertRowsRequestArray",
38343834
},
3835+
"v2.ListReferenceTableRows" => {
3836+
"id" => "String",
3837+
"page_limit" => "Integer",
3838+
"page_continuation_token" => "String",
3839+
},
38353840
"v2.CreateReferenceTableUpload" => {
38363841
"body" => "CreateUploadRequest",
38373842
},

features/v2/reference_tables.feature

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,35 @@ Feature: Reference Tables
142142
When the request is sent
143143
Then the response status is 200 OK
144144

145+
@generated @skip @team:DataDog/redapl-experiences
146+
Scenario: List reference table rows returns "Bad Request" response
147+
Given new "ListReferenceTableRows" request
148+
And request contains "id" parameter from "REPLACE.ME"
149+
When the request is sent
150+
Then the response status is 400 Bad Request
151+
152+
@team:DataDog/redapl-experiences
153+
Scenario: List reference table rows returns "Bad Request" response for invalid limit
154+
Given new "ListReferenceTableRows" request
155+
And request contains "id" parameter with value "00000000-0000-0000-0000-000000000000"
156+
And request contains "page[limit]" parameter with value "0"
157+
When the request is sent
158+
Then the response status is 400 Bad Request
159+
160+
@team:DataDog/redapl-experiences
161+
Scenario: List reference table rows returns "Not Found" response
162+
Given new "ListReferenceTableRows" request
163+
And request contains "id" parameter with value "00000000-0000-0000-0000-000000000000"
164+
When the request is sent
165+
Then the response status is 404 Not Found
166+
167+
@generated @skip @team:DataDog/redapl-experiences
168+
Scenario: List reference table rows returns "OK" response
169+
Given new "ListReferenceTableRows" request
170+
And request contains "id" parameter from "REPLACE.ME"
171+
When the request is sent
172+
Then the response status is 200 OK
173+
145174
@skip @team:DataDog/redapl-experiences
146175
Scenario: List tables returns "OK" response
147176
Given new "ListTables" request

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4790,6 +4790,12 @@
47904790
"type": "unsafe"
47914791
}
47924792
},
4793+
"ListReferenceTableRows": {
4794+
"tag": "Reference Tables",
4795+
"undo": {
4796+
"type": "safe"
4797+
}
4798+
},
47934799
"CreateReferenceTableUpload": {
47944800
"tag": "Reference Tables",
47954801
"undo": {

lib/datadog_api_client/inflector.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3555,6 +3555,8 @@ def overrides
35553555
"v2.list_powerpacks_response" => "ListPowerpacksResponse",
35563556
"v2.list_relation_catalog_response" => "ListRelationCatalogResponse",
35573557
"v2.list_relation_catalog_response_links" => "ListRelationCatalogResponseLinks",
3558+
"v2.list_rows_response" => "ListRowsResponse",
3559+
"v2.list_rows_response_links" => "ListRowsResponseLinks",
35583560
"v2.list_rules_response" => "ListRulesResponse",
35593561
"v2.list_rules_response_data_item" => "ListRulesResponseDataItem",
35603562
"v2.list_rules_response_links" => "ListRulesResponseLinks",

lib/datadog_api_client/v2/api/reference_tables_api.rb

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,81 @@ def get_table_with_http_info(id, opts = {})
502502
return data, status_code, headers
503503
end
504504

505+
# List reference table rows.
506+
#
507+
# @see #list_reference_table_rows_with_http_info
508+
def list_reference_table_rows(id, opts = {})
509+
data, _status_code, _headers = list_reference_table_rows_with_http_info(id, opts)
510+
data
511+
end
512+
513+
# List reference table rows.
514+
#
515+
# 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.
516+
#
517+
# @param id [String] Unique identifier of the reference table to list rows from.
518+
# @param opts [Hash] the optional parameters
519+
# @option opts [Integer] :page_limit Number of rows to return per page. Defaults to 100, maximum is 1000.
520+
# @option opts [String] :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.
521+
# @return [Array<(ListRowsResponse, Integer, Hash)>] ListRowsResponse data, response status code and response headers
522+
def list_reference_table_rows_with_http_info(id, opts = {})
523+
524+
if @api_client.config.debugging
525+
@api_client.config.logger.debug 'Calling API: ReferenceTablesAPI.list_reference_table_rows ...'
526+
end
527+
# verify the required parameter 'id' is set
528+
if @api_client.config.client_side_validation && id.nil?
529+
fail ArgumentError, "Missing the required parameter 'id' when calling ReferenceTablesAPI.list_reference_table_rows"
530+
end
531+
if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] > 1000
532+
fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling ReferenceTablesAPI.list_reference_table_rows, must be smaller than or equal to 1000.'
533+
end
534+
if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] < 1
535+
fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling ReferenceTablesAPI.list_reference_table_rows, must be greater than or equal to 1.'
536+
end
537+
# resource path
538+
local_var_path = '/api/v2/reference-tables/tables/{id}/rows/list'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/'))
539+
540+
# query parameters
541+
query_params = opts[:query_params] || {}
542+
query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil?
543+
query_params[:'page[continuation_token]'] = opts[:'page_continuation_token'] if !opts[:'page_continuation_token'].nil?
544+
545+
# header parameters
546+
header_params = opts[:header_params] || {}
547+
# HTTP header 'Accept' (if needed)
548+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
549+
550+
# form parameters
551+
form_params = opts[:form_params] || {}
552+
553+
# http body (model)
554+
post_body = opts[:debug_body]
555+
556+
# return_type
557+
return_type = opts[:debug_return_type] || 'ListRowsResponse'
558+
559+
# auth_names
560+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
561+
562+
new_options = opts.merge(
563+
:operation => :list_reference_table_rows,
564+
:header_params => header_params,
565+
:query_params => query_params,
566+
:form_params => form_params,
567+
:body => post_body,
568+
:auth_names => auth_names,
569+
:return_type => return_type,
570+
:api_version => "V2"
571+
)
572+
573+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
574+
if @api_client.config.debugging
575+
@api_client.config.logger.debug "API called: ReferenceTablesAPI#list_reference_table_rows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
576+
end
577+
return data, status_code, headers
578+
end
579+
505580
# List tables.
506581
#
507582
# @see #list_tables_with_http_info

0 commit comments

Comments
 (0)