Skip to content

Commit 462c9fd

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 1dc1417 of spec repo (#3845)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 2d7455e commit 462c9fd

11 files changed

Lines changed: 840 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49873,6 +49873,51 @@ components:
4987349873
example: "/api/v2/catalog/relation?filter[from_ref]=service:service-catalog&include=entity&page[limit]=2&page[offset]=0"
4987449874
type: string
4987549875
type: object
49876+
ListRowsResponse:
49877+
description: Paginated list of reference table rows.
49878+
example:
49879+
data:
49880+
- attributes:
49881+
values:
49882+
category: tor
49883+
intention: suspicious
49884+
ip_address: 102.130.113.9
49885+
id: 102.130.113.9
49886+
type: row
49887+
links:
49888+
first: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Blimit%5D=100"
49889+
self: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ%3D%3D&page%5Blimit%5D=100"
49890+
properties:
49891+
data:
49892+
description: The rows.
49893+
items:
49894+
$ref: "#/components/schemas/TableRowResourceData"
49895+
type: array
49896+
links:
49897+
$ref: "#/components/schemas/ListRowsResponseLinks"
49898+
required:
49899+
- data
49900+
- links
49901+
type: object
49902+
ListRowsResponseLinks:
49903+
description: Pagination links for the list rows response.
49904+
properties:
49905+
first:
49906+
description: Link to the first page of results.
49907+
example: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Blimit%5D=100"
49908+
type: string
49909+
next:
49910+
description: Link to the next page of results. Only present when more rows are available.
49911+
example: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ%3D%3D&page%5Blimit%5D=100"
49912+
type: string
49913+
self:
49914+
description: Link to the current page of results.
49915+
example: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ%3D%3D&page%5Blimit%5D=100"
49916+
type: string
49917+
required:
49918+
- self
49919+
- first
49920+
type: object
4987649921
ListRulesResponse:
4987749922
description: Scorecard rules response.
4987849923
properties:
@@ -144171,6 +144216,73 @@ paths:
144171144216
summary: Upsert rows
144172144217
tags:
144173144218
- Reference Tables
144219+
/api/v2/reference-tables/tables/{id}/rows/list:
144220+
get:
144221+
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.
144222+
operationId: ListReferenceTableRows
144223+
parameters:
144224+
- description: Unique identifier of the reference table to list rows from.
144225+
example: "00000000-0000-0000-0000-000000000000"
144226+
in: path
144227+
name: id
144228+
required: true
144229+
schema:
144230+
type: string
144231+
- description: Number of rows to return per page. Defaults to 100, maximum is 1000.
144232+
example: 100
144233+
in: query
144234+
name: page[limit]
144235+
required: false
144236+
schema:
144237+
default: 100
144238+
format: int64
144239+
maximum: 1000
144240+
minimum: 1
144241+
type: integer
144242+
- description: Opaque cursor from the previous response's next link. Pass this to retrieve the next page on the same consistent snapshot.
144243+
example: "eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ=="
144244+
in: query
144245+
name: page[continuation_token]
144246+
required: false
144247+
schema:
144248+
type: string
144249+
responses:
144250+
"200":
144251+
content:
144252+
application/json:
144253+
examples:
144254+
default:
144255+
value:
144256+
data:
144257+
- attributes:
144258+
values:
144259+
category: tor
144260+
intention: suspicious
144261+
ip_address: 102.130.113.9
144262+
id: 102.130.113.9
144263+
type: row
144264+
links:
144265+
first: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Blimit%5D=100"
144266+
next: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjY5NzA0ODkwNDE4ODA3MTAzOTgsInBrIjoiMTAyLjEzMC4xMjcuMTE3In0%3D&page%5Blimit%5D=100"
144267+
self: "/api/v2/reference-tables/tables/00000000-0000-0000-0000-000000000000/rows/list?page%5Bcontinuation_token%5D=eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ%3D%3D&page%5Blimit%5D=100"
144268+
schema:
144269+
$ref: "#/components/schemas/ListRowsResponse"
144270+
description: OK
144271+
"400":
144272+
$ref: "#/components/responses/BadRequestResponse"
144273+
"403":
144274+
$ref: "#/components/responses/ForbiddenResponse"
144275+
"404":
144276+
$ref: "#/components/responses/NotFoundResponse"
144277+
"429":
144278+
$ref: "#/components/responses/TooManyRequestsResponse"
144279+
security:
144280+
- apiKeyAuth: []
144281+
appKeyAuth: []
144282+
- AuthZ: []
144283+
summary: List rows
144284+
tags:
144285+
- Reference Tables
144174144286
/api/v2/reference-tables/uploads:
144175144287
post:
144176144288
description: Create a reference table upload for bulk data ingestion
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// List rows returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.ReferenceTablesApi;
6+
import com.datadog.api.client.v2.model.ListRowsResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
ReferenceTablesApi apiInstance = new ReferenceTablesApi(defaultClient);
12+
13+
try {
14+
ListRowsResponse result =
15+
apiInstance.listReferenceTableRows("00000000-0000-0000-0000-000000000000");
16+
System.out.println(result);
17+
} catch (ApiException e) {
18+
System.err.println("Exception when calling ReferenceTablesApi#listReferenceTableRows");
19+
System.err.println("Status code: " + e.getCode());
20+
System.err.println("Reason: " + e.getResponseBody());
21+
System.err.println("Response headers: " + e.getResponseHeaders());
22+
e.printStackTrace();
23+
}
24+
}
25+
}

src/main/java/com/datadog/api/client/v2/api/ReferenceTablesApi.java

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import com.datadog.api.client.v2.model.CreateTableRequest;
1212
import com.datadog.api.client.v2.model.CreateUploadRequest;
1313
import com.datadog.api.client.v2.model.CreateUploadResponse;
14+
import com.datadog.api.client.v2.model.ListRowsResponse;
1415
import com.datadog.api.client.v2.model.PatchTableRequest;
1516
import com.datadog.api.client.v2.model.ReferenceTableSortType;
1617
import com.datadog.api.client.v2.model.TableResultV2;
@@ -1031,6 +1032,226 @@ public CompletableFuture<ApiResponse<TableResultV2>> getTableWithHttpInfoAsync(S
10311032
new GenericType<TableResultV2>() {});
10321033
}
10331034

1035+
/** Manage optional parameters to listReferenceTableRows. */
1036+
public static class ListReferenceTableRowsOptionalParameters {
1037+
private Long pageLimit;
1038+
private String pageContinuationToken;
1039+
1040+
/**
1041+
* Set pageLimit.
1042+
*
1043+
* @param pageLimit Number of rows to return per page. Defaults to 100, maximum is 1000.
1044+
* (optional, default to 100)
1045+
* @return ListReferenceTableRowsOptionalParameters
1046+
*/
1047+
public ListReferenceTableRowsOptionalParameters pageLimit(Long pageLimit) {
1048+
this.pageLimit = pageLimit;
1049+
return this;
1050+
}
1051+
1052+
/**
1053+
* Set pageContinuationToken.
1054+
*
1055+
* @param pageContinuationToken Opaque cursor from the previous response's next link. Pass this
1056+
* to retrieve the next page on the same consistent snapshot. (optional)
1057+
* @return ListReferenceTableRowsOptionalParameters
1058+
*/
1059+
public ListReferenceTableRowsOptionalParameters pageContinuationToken(
1060+
String pageContinuationToken) {
1061+
this.pageContinuationToken = pageContinuationToken;
1062+
return this;
1063+
}
1064+
}
1065+
1066+
/**
1067+
* List rows.
1068+
*
1069+
* <p>See {@link #listReferenceTableRowsWithHttpInfo}.
1070+
*
1071+
* @param id Unique identifier of the reference table to list rows from. (required)
1072+
* @return ListRowsResponse
1073+
* @throws ApiException if fails to make API call
1074+
*/
1075+
public ListRowsResponse listReferenceTableRows(String id) throws ApiException {
1076+
return listReferenceTableRowsWithHttpInfo(id, new ListReferenceTableRowsOptionalParameters())
1077+
.getData();
1078+
}
1079+
1080+
/**
1081+
* List rows.
1082+
*
1083+
* <p>See {@link #listReferenceTableRowsWithHttpInfoAsync}.
1084+
*
1085+
* @param id Unique identifier of the reference table to list rows from. (required)
1086+
* @return CompletableFuture&lt;ListRowsResponse&gt;
1087+
*/
1088+
public CompletableFuture<ListRowsResponse> listReferenceTableRowsAsync(String id) {
1089+
return listReferenceTableRowsWithHttpInfoAsync(
1090+
id, new ListReferenceTableRowsOptionalParameters())
1091+
.thenApply(
1092+
response -> {
1093+
return response.getData();
1094+
});
1095+
}
1096+
1097+
/**
1098+
* List rows.
1099+
*
1100+
* <p>See {@link #listReferenceTableRowsWithHttpInfo}.
1101+
*
1102+
* @param id Unique identifier of the reference table to list rows from. (required)
1103+
* @param parameters Optional parameters for the request.
1104+
* @return ListRowsResponse
1105+
* @throws ApiException if fails to make API call
1106+
*/
1107+
public ListRowsResponse listReferenceTableRows(
1108+
String id, ListReferenceTableRowsOptionalParameters parameters) throws ApiException {
1109+
return listReferenceTableRowsWithHttpInfo(id, parameters).getData();
1110+
}
1111+
1112+
/**
1113+
* List rows.
1114+
*
1115+
* <p>See {@link #listReferenceTableRowsWithHttpInfoAsync}.
1116+
*
1117+
* @param id Unique identifier of the reference table to list rows from. (required)
1118+
* @param parameters Optional parameters for the request.
1119+
* @return CompletableFuture&lt;ListRowsResponse&gt;
1120+
*/
1121+
public CompletableFuture<ListRowsResponse> listReferenceTableRowsAsync(
1122+
String id, ListReferenceTableRowsOptionalParameters parameters) {
1123+
return listReferenceTableRowsWithHttpInfoAsync(id, parameters)
1124+
.thenApply(
1125+
response -> {
1126+
return response.getData();
1127+
});
1128+
}
1129+
1130+
/**
1131+
* List all rows in a reference table using cursor-based pagination. Pass the <code>
1132+
* page[continuation_token]</code> from the previous response to fetch the next page on the same
1133+
* consistent snapshot. Returns 400 for tables with more than 10,000,000 rows.
1134+
*
1135+
* @param id Unique identifier of the reference table to list rows from. (required)
1136+
* @param parameters Optional parameters for the request.
1137+
* @return ApiResponse&lt;ListRowsResponse&gt;
1138+
* @throws ApiException if fails to make API call
1139+
* @http.response.details
1140+
* <table border="1">
1141+
* <caption>Response details</caption>
1142+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
1143+
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
1144+
* <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
1145+
* <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
1146+
* <tr><td> 404 </td><td> Not Found </td><td> - </td></tr>
1147+
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
1148+
* </table>
1149+
*/
1150+
public ApiResponse<ListRowsResponse> listReferenceTableRowsWithHttpInfo(
1151+
String id, ListReferenceTableRowsOptionalParameters parameters) throws ApiException {
1152+
Object localVarPostBody = null;
1153+
1154+
// verify the required parameter 'id' is set
1155+
if (id == null) {
1156+
throw new ApiException(
1157+
400, "Missing the required parameter 'id' when calling listReferenceTableRows");
1158+
}
1159+
Long pageLimit = parameters.pageLimit;
1160+
String pageContinuationToken = parameters.pageContinuationToken;
1161+
// create path and map variables
1162+
String localVarPath =
1163+
"/api/v2/reference-tables/tables/{id}/rows/list"
1164+
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
1165+
1166+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
1167+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
1168+
1169+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
1170+
localVarQueryParams.addAll(
1171+
apiClient.parameterToPairs("", "page[continuation_token]", pageContinuationToken));
1172+
1173+
Invocation.Builder builder =
1174+
apiClient.createBuilder(
1175+
"v2.ReferenceTablesApi.listReferenceTableRows",
1176+
localVarPath,
1177+
localVarQueryParams,
1178+
localVarHeaderParams,
1179+
new HashMap<String, String>(),
1180+
new String[] {"application/json"},
1181+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
1182+
return apiClient.invokeAPI(
1183+
"GET",
1184+
builder,
1185+
localVarHeaderParams,
1186+
new String[] {},
1187+
localVarPostBody,
1188+
new HashMap<String, Object>(),
1189+
false,
1190+
new GenericType<ListRowsResponse>() {});
1191+
}
1192+
1193+
/**
1194+
* List rows.
1195+
*
1196+
* <p>See {@link #listReferenceTableRowsWithHttpInfo}.
1197+
*
1198+
* @param id Unique identifier of the reference table to list rows from. (required)
1199+
* @param parameters Optional parameters for the request.
1200+
* @return CompletableFuture&lt;ApiResponse&lt;ListRowsResponse&gt;&gt;
1201+
*/
1202+
public CompletableFuture<ApiResponse<ListRowsResponse>> listReferenceTableRowsWithHttpInfoAsync(
1203+
String id, ListReferenceTableRowsOptionalParameters parameters) {
1204+
Object localVarPostBody = null;
1205+
1206+
// verify the required parameter 'id' is set
1207+
if (id == null) {
1208+
CompletableFuture<ApiResponse<ListRowsResponse>> result = new CompletableFuture<>();
1209+
result.completeExceptionally(
1210+
new ApiException(
1211+
400, "Missing the required parameter 'id' when calling listReferenceTableRows"));
1212+
return result;
1213+
}
1214+
Long pageLimit = parameters.pageLimit;
1215+
String pageContinuationToken = parameters.pageContinuationToken;
1216+
// create path and map variables
1217+
String localVarPath =
1218+
"/api/v2/reference-tables/tables/{id}/rows/list"
1219+
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
1220+
1221+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
1222+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
1223+
1224+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
1225+
localVarQueryParams.addAll(
1226+
apiClient.parameterToPairs("", "page[continuation_token]", pageContinuationToken));
1227+
1228+
Invocation.Builder builder;
1229+
try {
1230+
builder =
1231+
apiClient.createBuilder(
1232+
"v2.ReferenceTablesApi.listReferenceTableRows",
1233+
localVarPath,
1234+
localVarQueryParams,
1235+
localVarHeaderParams,
1236+
new HashMap<String, String>(),
1237+
new String[] {"application/json"},
1238+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
1239+
} catch (ApiException ex) {
1240+
CompletableFuture<ApiResponse<ListRowsResponse>> result = new CompletableFuture<>();
1241+
result.completeExceptionally(ex);
1242+
return result;
1243+
}
1244+
return apiClient.invokeAPIAsync(
1245+
"GET",
1246+
builder,
1247+
localVarHeaderParams,
1248+
new String[] {},
1249+
localVarPostBody,
1250+
new HashMap<String, Object>(),
1251+
false,
1252+
new GenericType<ListRowsResponse>() {});
1253+
}
1254+
10341255
/** Manage optional parameters to listTables. */
10351256
public static class ListTablesOptionalParameters {
10361257
private Long pageLimit;

0 commit comments

Comments
 (0)