Skip to content

Commit c92baff

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit cf78334 of spec repo
1 parent bff9053 commit c92baff

118 files changed

Lines changed: 1185 additions & 127 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "d02c8a3",
3-
"generated": "2025-08-08 12:08:35.449"
2+
"spec_repo_commit": "cf78334",
3+
"generated": "2025-08-12 18:26:37.328"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14454,6 +14454,10 @@ components:
1445414454
description: Entity definition in raw JSON or YAML representation.
1445514455
example: "apiVersion: v3\nkind: service\nmetadata:\n name: myservice\n"
1445614456
type: string
14457+
EntityReference:
14458+
description: The unique reference for an IDP entity.
14459+
example: service:my-service
14460+
type: string
1445714461
EntityRelationships:
1445814462
description: Entity relationships.
1445914463
properties:
@@ -43034,6 +43038,57 @@ components:
4303443038
id:
4303543039
$ref: '#/components/schemas/ApiID'
4303643040
type: object
43041+
UpdateOutcomesAsyncAttributes:
43042+
description: The JSON:API attributes for a batched set of scorecard outcomes.
43043+
properties:
43044+
results:
43045+
description: Set of scorecard outcomes to update asynchronously.
43046+
items:
43047+
$ref: '#/components/schemas/UpdateOutcomesAsyncRequestItem'
43048+
type: array
43049+
type: object
43050+
UpdateOutcomesAsyncRequest:
43051+
description: Scorecard outcomes batch request.
43052+
properties:
43053+
data:
43054+
$ref: '#/components/schemas/UpdateOutcomesAsyncRequestData'
43055+
type: object
43056+
UpdateOutcomesAsyncRequestData:
43057+
description: Scorecard outcomes batch request data.
43058+
properties:
43059+
attributes:
43060+
$ref: '#/components/schemas/UpdateOutcomesAsyncAttributes'
43061+
type:
43062+
$ref: '#/components/schemas/UpdateOutcomesAsyncType'
43063+
type: object
43064+
UpdateOutcomesAsyncRequestItem:
43065+
description: Scorecard outcome for a single entity and rule.
43066+
properties:
43067+
entity_reference:
43068+
$ref: '#/components/schemas/EntityReference'
43069+
remarks:
43070+
description: Any remarks regarding the scorecard rule's evaluation, and
43071+
supports HTML hyperlinks.
43072+
example: 'See: <a href="https://app.datadoghq.com/services">Services</a>'
43073+
type: string
43074+
rule_id:
43075+
$ref: '#/components/schemas/RuleId'
43076+
state:
43077+
$ref: '#/components/schemas/State'
43078+
required:
43079+
- rule_id
43080+
- entity_reference
43081+
- state
43082+
type: object
43083+
UpdateOutcomesAsyncType:
43084+
default: batched-outcome
43085+
description: The JSON:API type for scorecard outcomes.
43086+
enum:
43087+
- batched-outcome
43088+
example: batched-outcome
43089+
type: string
43090+
x-enum-varnames:
43091+
- BATCHED_OUTCOME
4303743092
UpdateResourceEvaluationFiltersRequest:
4303843093
description: Request object to update a resource filter.
4303943094
properties:
@@ -61018,6 +61073,37 @@ paths:
6101861073
resultsPath: data
6101961074
x-unstable: '**Note**: This endpoint is in public beta.
6102061075

61076+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
61077+
post:
61078+
description: Updates multiple scorecard rule outcomes in a single batched request.
61079+
operationId: UpdateScorecardOutcomesAsync
61080+
requestBody:
61081+
content:
61082+
application/json:
61083+
schema:
61084+
$ref: '#/components/schemas/UpdateOutcomesAsyncRequest'
61085+
description: Set of scorecard outcomes.
61086+
required: true
61087+
responses:
61088+
'202':
61089+
description: Accepted
61090+
'400':
61091+
$ref: '#/components/responses/BadRequestResponse'
61092+
'403':
61093+
$ref: '#/components/responses/ForbiddenResponse'
61094+
'429':
61095+
$ref: '#/components/responses/TooManyRequestsResponse'
61096+
security:
61097+
- apiKeyAuth: []
61098+
appKeyAuth: []
61099+
- AuthZ:
61100+
- apm_service_catalog_write
61101+
summary: Update Scorecard outcomes asynchronously
61102+
tags:
61103+
- Service Scorecards
61104+
x-codegen-request-body-name: body
61105+
x-unstable: '**Note**: This endpoint is in public beta.
61106+
6102161107
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6102261108
/api/v2/scorecard/outcomes/batch:
6102361109
post:
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// Update Scorecard outcomes asynchronously returns "Accepted" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.ServiceScorecardsApi;
6+
import com.datadog.api.client.v2.model.State;
7+
import com.datadog.api.client.v2.model.UpdateOutcomesAsyncAttributes;
8+
import com.datadog.api.client.v2.model.UpdateOutcomesAsyncRequest;
9+
import com.datadog.api.client.v2.model.UpdateOutcomesAsyncRequestData;
10+
import com.datadog.api.client.v2.model.UpdateOutcomesAsyncRequestItem;
11+
import com.datadog.api.client.v2.model.UpdateOutcomesAsyncType;
12+
import java.util.Collections;
13+
14+
public class Example {
15+
public static void main(String[] args) {
16+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
17+
defaultClient.setUnstableOperationEnabled("v2.updateScorecardOutcomesAsync", true);
18+
ServiceScorecardsApi apiInstance = new ServiceScorecardsApi(defaultClient);
19+
20+
UpdateOutcomesAsyncRequest body =
21+
new UpdateOutcomesAsyncRequest()
22+
.data(
23+
new UpdateOutcomesAsyncRequestData()
24+
.attributes(
25+
new UpdateOutcomesAsyncAttributes()
26+
.results(
27+
Collections.singletonList(
28+
new UpdateOutcomesAsyncRequestItem()
29+
.entityReference("service:my-service")
30+
.remarks(
31+
"""
32+
See: <a href="https://app.datadoghq.com/services">Services</a>
33+
""")
34+
.ruleId("q8MQxk8TCqrHnWkx")
35+
.state(State.PASS))))
36+
.type(UpdateOutcomesAsyncType.BATCHED_OUTCOME));
37+
38+
try {
39+
apiInstance.updateScorecardOutcomesAsync(body);
40+
} catch (ApiException e) {
41+
System.err.println(
42+
"Exception when calling ServiceScorecardsApi#updateScorecardOutcomesAsync");
43+
System.err.println("Status code: " + e.getCode());
44+
System.err.println("Reason: " + e.getResponseBody());
45+
System.err.println("Response headers: " + e.getResponseHeaders());
46+
e.printStackTrace();
47+
}
48+
}
49+
}

src/main/java/com/datadog/api/client/ApiClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,7 @@ public class ApiClient {
763763
put("v2.deleteScorecardRule", false);
764764
put("v2.listScorecardOutcomes", false);
765765
put("v2.listScorecardRules", false);
766+
put("v2.updateScorecardOutcomesAsync", false);
766767
put("v2.updateScorecardRule", false);
767768
put("v2.createIncidentService", false);
768769
put("v2.deleteIncidentService", false);

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

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import com.datadog.api.client.v2.model.OutcomesBatchResponse;
1414
import com.datadog.api.client.v2.model.OutcomesResponse;
1515
import com.datadog.api.client.v2.model.OutcomesResponseDataItem;
16+
import com.datadog.api.client.v2.model.UpdateOutcomesAsyncRequest;
1617
import com.datadog.api.client.v2.model.UpdateRuleRequest;
1718
import com.datadog.api.client.v2.model.UpdateRuleResponse;
1819
import jakarta.ws.rs.client.Invocation;
@@ -1295,6 +1296,155 @@ public CompletableFuture<ApiResponse<ListRulesResponse>> listScorecardRulesWithH
12951296
new GenericType<ListRulesResponse>() {});
12961297
}
12971298

1299+
/**
1300+
* Update Scorecard outcomes asynchronously.
1301+
*
1302+
* <p>See {@link #updateScorecardOutcomesAsyncWithHttpInfo}.
1303+
*
1304+
* @param body Set of scorecard outcomes. (required)
1305+
* @throws ApiException if fails to make API call
1306+
*/
1307+
public void updateScorecardOutcomesAsync(UpdateOutcomesAsyncRequest body) throws ApiException {
1308+
updateScorecardOutcomesAsyncWithHttpInfo(body);
1309+
}
1310+
1311+
/**
1312+
* Update Scorecard outcomes asynchronously.
1313+
*
1314+
* <p>See {@link #updateScorecardOutcomesAsyncWithHttpInfoAsync}.
1315+
*
1316+
* @param body Set of scorecard outcomes. (required)
1317+
* @return CompletableFuture
1318+
*/
1319+
public CompletableFuture<Void> updateScorecardOutcomesAsyncAsync(
1320+
UpdateOutcomesAsyncRequest body) {
1321+
return updateScorecardOutcomesAsyncWithHttpInfoAsync(body)
1322+
.thenApply(
1323+
response -> {
1324+
return response.getData();
1325+
});
1326+
}
1327+
1328+
/**
1329+
* Updates multiple scorecard rule outcomes in a single batched request.
1330+
*
1331+
* @param body Set of scorecard outcomes. (required)
1332+
* @return ApiResponse&lt;Void&gt;
1333+
* @throws ApiException if fails to make API call
1334+
* @http.response.details
1335+
* <table border="1">
1336+
* <caption>Response details</caption>
1337+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
1338+
* <tr><td> 202 </td><td> Accepted </td><td> - </td></tr>
1339+
* <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
1340+
* <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
1341+
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
1342+
* </table>
1343+
*/
1344+
public ApiResponse<Void> updateScorecardOutcomesAsyncWithHttpInfo(UpdateOutcomesAsyncRequest body)
1345+
throws ApiException {
1346+
// Check if unstable operation is enabled
1347+
String operationId = "updateScorecardOutcomesAsync";
1348+
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
1349+
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
1350+
} else {
1351+
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
1352+
}
1353+
Object localVarPostBody = body;
1354+
1355+
// verify the required parameter 'body' is set
1356+
if (body == null) {
1357+
throw new ApiException(
1358+
400, "Missing the required parameter 'body' when calling updateScorecardOutcomesAsync");
1359+
}
1360+
// create path and map variables
1361+
String localVarPath = "/api/v2/scorecard/outcomes";
1362+
1363+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
1364+
1365+
Invocation.Builder builder =
1366+
apiClient.createBuilder(
1367+
"v2.ServiceScorecardsApi.updateScorecardOutcomesAsync",
1368+
localVarPath,
1369+
new ArrayList<Pair>(),
1370+
localVarHeaderParams,
1371+
new HashMap<String, String>(),
1372+
new String[] {"*/*"},
1373+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
1374+
return apiClient.invokeAPI(
1375+
"POST",
1376+
builder,
1377+
localVarHeaderParams,
1378+
new String[] {"application/json"},
1379+
localVarPostBody,
1380+
new HashMap<String, Object>(),
1381+
false,
1382+
null);
1383+
}
1384+
1385+
/**
1386+
* Update Scorecard outcomes asynchronously.
1387+
*
1388+
* <p>See {@link #updateScorecardOutcomesAsyncWithHttpInfo}.
1389+
*
1390+
* @param body Set of scorecard outcomes. (required)
1391+
* @return CompletableFuture&lt;ApiResponse&lt;Void&gt;&gt;
1392+
*/
1393+
public CompletableFuture<ApiResponse<Void>> updateScorecardOutcomesAsyncWithHttpInfoAsync(
1394+
UpdateOutcomesAsyncRequest body) {
1395+
// Check if unstable operation is enabled
1396+
String operationId = "updateScorecardOutcomesAsync";
1397+
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
1398+
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
1399+
} else {
1400+
CompletableFuture<ApiResponse<Void>> result = new CompletableFuture<>();
1401+
result.completeExceptionally(
1402+
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
1403+
return result;
1404+
}
1405+
Object localVarPostBody = body;
1406+
1407+
// verify the required parameter 'body' is set
1408+
if (body == null) {
1409+
CompletableFuture<ApiResponse<Void>> result = new CompletableFuture<>();
1410+
result.completeExceptionally(
1411+
new ApiException(
1412+
400,
1413+
"Missing the required parameter 'body' when calling updateScorecardOutcomesAsync"));
1414+
return result;
1415+
}
1416+
// create path and map variables
1417+
String localVarPath = "/api/v2/scorecard/outcomes";
1418+
1419+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
1420+
1421+
Invocation.Builder builder;
1422+
try {
1423+
builder =
1424+
apiClient.createBuilder(
1425+
"v2.ServiceScorecardsApi.updateScorecardOutcomesAsync",
1426+
localVarPath,
1427+
new ArrayList<Pair>(),
1428+
localVarHeaderParams,
1429+
new HashMap<String, String>(),
1430+
new String[] {"*/*"},
1431+
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
1432+
} catch (ApiException ex) {
1433+
CompletableFuture<ApiResponse<Void>> result = new CompletableFuture<>();
1434+
result.completeExceptionally(ex);
1435+
return result;
1436+
}
1437+
return apiClient.invokeAPIAsync(
1438+
"POST",
1439+
builder,
1440+
localVarHeaderParams,
1441+
new String[] {"application/json"},
1442+
localVarPostBody,
1443+
new HashMap<String, Object>(),
1444+
false,
1445+
null);
1446+
}
1447+
12981448
/**
12991449
* Update an existing rule.
13001450
*

0 commit comments

Comments
 (0)