Skip to content

Commit 2ae9cd7

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 31fbabf of spec repo
1 parent 5f72606 commit 2ae9cd7

7 files changed

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

0 commit comments

Comments
 (0)