Skip to content

Commit d6f8654

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 86976ef of spec repo
1 parent 4c1f6aa commit d6f8654

14 files changed

+762
-2
lines changed

.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": "1e6c346",
3-
"generated": "2025-08-25 18:45:37.801"
2+
"spec_repo_commit": "86976ef",
3+
"generated": "2025-08-26 14:48:10.714"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14485,6 +14485,10 @@ components:
1448514485
description: Entity definition in raw JSON or YAML representation.
1448614486
example: "apiVersion: v3\nkind: service\nmetadata:\n name: myservice\n"
1448714487
type: string
14488+
EntityReference:
14489+
description: The unique reference for an IDP entity.
14490+
example: service:my-service
14491+
type: string
1448814492
EntityRelationships:
1448914493
description: Entity relationships.
1449014494
properties:
@@ -43829,6 +43833,57 @@ components:
4382943833
id:
4383043834
$ref: '#/components/schemas/ApiID'
4383143835
type: object
43836+
UpdateOutcomesAsyncAttributes:
43837+
description: The JSON:API attributes for a batched set of scorecard outcomes.
43838+
properties:
43839+
results:
43840+
description: Set of scorecard outcomes to update asynchronously.
43841+
items:
43842+
$ref: '#/components/schemas/UpdateOutcomesAsyncRequestItem'
43843+
type: array
43844+
type: object
43845+
UpdateOutcomesAsyncRequest:
43846+
description: Scorecard outcomes batch request.
43847+
properties:
43848+
data:
43849+
$ref: '#/components/schemas/UpdateOutcomesAsyncRequestData'
43850+
type: object
43851+
UpdateOutcomesAsyncRequestData:
43852+
description: Scorecard outcomes batch request data.
43853+
properties:
43854+
attributes:
43855+
$ref: '#/components/schemas/UpdateOutcomesAsyncAttributes'
43856+
type:
43857+
$ref: '#/components/schemas/UpdateOutcomesAsyncType'
43858+
type: object
43859+
UpdateOutcomesAsyncRequestItem:
43860+
description: Scorecard outcome for a single entity and rule.
43861+
properties:
43862+
entity_reference:
43863+
$ref: '#/components/schemas/EntityReference'
43864+
remarks:
43865+
description: Any remarks regarding the scorecard rule's evaluation. Supports
43866+
HTML hyperlinks.
43867+
example: 'See: <a href="https://app.datadoghq.com/services">Services</a>'
43868+
type: string
43869+
rule_id:
43870+
$ref: '#/components/schemas/RuleId'
43871+
state:
43872+
$ref: '#/components/schemas/State'
43873+
required:
43874+
- rule_id
43875+
- entity_reference
43876+
- state
43877+
type: object
43878+
UpdateOutcomesAsyncType:
43879+
default: batched-outcome
43880+
description: The JSON:API type for scorecard outcomes.
43881+
enum:
43882+
- batched-outcome
43883+
example: batched-outcome
43884+
type: string
43885+
x-enum-varnames:
43886+
- BATCHED_OUTCOME
4383243887
UpdateResourceEvaluationFiltersRequest:
4383343888
description: Request object to update a resource filter.
4383443889
properties:
@@ -61874,6 +61929,39 @@ paths:
6187461929
resultsPath: data
6187561930
x-unstable: '**Note**: This endpoint is in public beta.
6187661931

61932+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
61933+
post:
61934+
description: Updates multiple scorecard rule outcomes in a single batched request.
61935+
operationId: UpdateScorecardOutcomesAsync
61936+
requestBody:
61937+
content:
61938+
application/json:
61939+
schema:
61940+
$ref: '#/components/schemas/UpdateOutcomesAsyncRequest'
61941+
description: Set of scorecard outcomes.
61942+
required: true
61943+
responses:
61944+
'202':
61945+
description: Accepted
61946+
'400':
61947+
$ref: '#/components/responses/BadRequestResponse'
61948+
'403':
61949+
$ref: '#/components/responses/ForbiddenResponse'
61950+
'409':
61951+
$ref: '#/components/responses/ConflictResponse'
61952+
'429':
61953+
$ref: '#/components/responses/TooManyRequestsResponse'
61954+
security:
61955+
- apiKeyAuth: []
61956+
appKeyAuth: []
61957+
- AuthZ:
61958+
- apm_service_catalog_write
61959+
summary: Update Scorecard outcomes asynchronously
61960+
tags:
61961+
- Service Scorecards
61962+
x-codegen-request-body-name: body
61963+
x-unstable: '**Note**: This endpoint is in public beta.
61964+
6187761965
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6187861966
/api/v2/scorecard/outcomes/batch:
6187961967
post:
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Update Scorecard outcomes asynchronously returns "Accepted" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.update_scorecard_outcomes_async".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::ServiceScorecardsAPI.new
8+
9+
# there is a valid "create_scorecard_rule" in the system
10+
CREATE_SCORECARD_RULE_DATA_ID = ENV["CREATE_SCORECARD_RULE_DATA_ID"]
11+
12+
body = DatadogAPIClient::V2::UpdateOutcomesAsyncRequest.new({
13+
data: DatadogAPIClient::V2::UpdateOutcomesAsyncRequestData.new({
14+
attributes: DatadogAPIClient::V2::UpdateOutcomesAsyncAttributes.new({
15+
results: [
16+
DatadogAPIClient::V2::UpdateOutcomesAsyncRequestItem.new({
17+
rule_id: CREATE_SCORECARD_RULE_DATA_ID,
18+
entity_reference: "service:my-service",
19+
remarks: 'See: <a href="https://app.datadoghq.com/services">Services</a>',
20+
state: DatadogAPIClient::V2::State::PASS,
21+
}),
22+
],
23+
}),
24+
type: DatadogAPIClient::V2::UpdateOutcomesAsyncType::BATCHED_OUTCOME,
25+
}),
26+
})
27+
p api_instance.update_scorecard_outcomes_async(body)

features/scenarios_model_mapping.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2511,6 +2511,9 @@
25112511
"filter_rule_id" => "String",
25122512
"filter_rule_name" => "String",
25132513
},
2514+
"v2.UpdateScorecardOutcomesAsync" => {
2515+
"body" => "UpdateOutcomesAsyncRequest",
2516+
},
25142517
"v2.CreateScorecardOutcomesBatch" => {
25152518
"body" => "OutcomesBatchRequest",
25162519
},

features/v2/service_scorecards.feature

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,35 @@ Feature: Service Scorecards
121121
Then the response status is 200 OK
122122
And the response has 4 items
123123

124+
@team:DataDog/service-catalog
125+
Scenario: Update Scorecard outcomes asynchronously returns "Accepted" response
126+
Given operation "UpdateScorecardOutcomesAsync" enabled
127+
And there is a valid "create_scorecard_rule" in the system
128+
And new "UpdateScorecardOutcomesAsync" request
129+
And body with value {"data": {"attributes": {"results": [{"rule_id": "{{create_scorecard_rule.data.id}}", "entity_reference": "service:my-service", "remarks": "See: <a href=\"https://app.datadoghq.com/services\">Services</a>", "state": "pass"}]}, "type": "batched-outcome"}}
130+
When the request is sent
131+
Then the response status is 202 Accepted
132+
133+
@team:DataDog/service-catalog
134+
Scenario: Update Scorecard outcomes asynchronously returns "Bad Request" response
135+
Given operation "UpdateScorecardOutcomesAsync" enabled
136+
And there is a valid "create_scorecard_rule" in the system
137+
And new "UpdateScorecardOutcomesAsync" request
138+
And body with value {"data": {"attributes": {"results": [{"rule_id": "{{create_scorecard_rule.data.id}}", "entity_reference": "service:my-service", "state": "INVALID"}]}, "type": "batched-outcome"}}
139+
When the request is sent
140+
Then the response status is 400 Bad Request
141+
And the response "errors" has length 1
142+
And the response "errors[0]" has field "detail"
143+
144+
@team:DataDog/service-catalog
145+
Scenario: Update Scorecard outcomes asynchronously returns "Conflict" response
146+
Given operation "UpdateScorecardOutcomesAsync" enabled
147+
And new "UpdateScorecardOutcomesAsync" request
148+
And body with value {"data": {"attributes": {"results": [{"rule_id": "INVALID.RULE_ID", "entity_reference": "service:my-service", "remarks": "See: <a href=\"https://app.datadoghq.com/services\">Services</a>", "state": "pass"}]}, "type": "batched-outcome"}}
149+
When the request is sent
150+
Then the response status is 409 Conflict
151+
And the response "errors" has length 1
152+
124153
@generated @skip @team:DataDog/service-catalog
125154
Scenario: Update an existing rule returns "Bad Request" response
126155
Given operation "UpdateScorecardRule" enabled

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2742,6 +2742,12 @@
27422742
"type": "safe"
27432743
}
27442744
},
2745+
"UpdateScorecardOutcomesAsync": {
2746+
"tag": "Service Scorecards",
2747+
"undo": {
2748+
"type": "idempotent"
2749+
}
2750+
},
27452751
"CreateScorecardOutcomesBatch": {
27462752
"tag": "Service Scorecards",
27472753
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ def initialize
265265
"v2.delete_scorecard_rule": false,
266266
"v2.list_scorecard_outcomes": false,
267267
"v2.list_scorecard_rules": false,
268+
"v2.update_scorecard_outcomes_async": false,
268269
"v2.update_scorecard_rule": false,
269270
"v2.create_incident_service": false,
270271
"v2.delete_incident_service": false,

lib/datadog_api_client/inflector.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3709,6 +3709,11 @@ def overrides
37093709
"v2.update_open_api_response" => "UpdateOpenAPIResponse",
37103710
"v2.update_open_api_response_attributes" => "UpdateOpenAPIResponseAttributes",
37113711
"v2.update_open_api_response_data" => "UpdateOpenAPIResponseData",
3712+
"v2.update_outcomes_async_attributes" => "UpdateOutcomesAsyncAttributes",
3713+
"v2.update_outcomes_async_request" => "UpdateOutcomesAsyncRequest",
3714+
"v2.update_outcomes_async_request_data" => "UpdateOutcomesAsyncRequestData",
3715+
"v2.update_outcomes_async_request_item" => "UpdateOutcomesAsyncRequestItem",
3716+
"v2.update_outcomes_async_type" => "UpdateOutcomesAsyncType",
37123717
"v2.update_resource_evaluation_filters_request" => "UpdateResourceEvaluationFiltersRequest",
37133718
"v2.update_resource_evaluation_filters_request_data" => "UpdateResourceEvaluationFiltersRequestData",
37143719
"v2.update_resource_evaluation_filters_response" => "UpdateResourceEvaluationFiltersResponse",

lib/datadog_api_client/v2/api/service_scorecards_api.rb

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,79 @@ def list_scorecard_rules_with_pagination(opts = {})
454454
end
455455
end
456456

457+
# Update Scorecard outcomes asynchronously.
458+
#
459+
# @see #update_scorecard_outcomes_async_with_http_info
460+
def update_scorecard_outcomes_async(body, opts = {})
461+
update_scorecard_outcomes_async_with_http_info(body, opts)
462+
nil
463+
end
464+
465+
# Update Scorecard outcomes asynchronously.
466+
#
467+
# Updates multiple scorecard rule outcomes in a single batched request.
468+
#
469+
# @param body [UpdateOutcomesAsyncRequest] Set of scorecard outcomes.
470+
# @param opts [Hash] the optional parameters
471+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
472+
def update_scorecard_outcomes_async_with_http_info(body, opts = {})
473+
unstable_enabled = @api_client.config.unstable_operations["v2.update_scorecard_outcomes_async".to_sym]
474+
if unstable_enabled
475+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_scorecard_outcomes_async")
476+
else
477+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_scorecard_outcomes_async"))
478+
end
479+
480+
if @api_client.config.debugging
481+
@api_client.config.logger.debug 'Calling API: ServiceScorecardsAPI.update_scorecard_outcomes_async ...'
482+
end
483+
# verify the required parameter 'body' is set
484+
if @api_client.config.client_side_validation && body.nil?
485+
fail ArgumentError, "Missing the required parameter 'body' when calling ServiceScorecardsAPI.update_scorecard_outcomes_async"
486+
end
487+
# resource path
488+
local_var_path = '/api/v2/scorecard/outcomes'
489+
490+
# query parameters
491+
query_params = opts[:query_params] || {}
492+
493+
# header parameters
494+
header_params = opts[:header_params] || {}
495+
# HTTP header 'Accept' (if needed)
496+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
497+
# HTTP header 'Content-Type'
498+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
499+
500+
# form parameters
501+
form_params = opts[:form_params] || {}
502+
503+
# http body (model)
504+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
505+
506+
# return_type
507+
return_type = opts[:debug_return_type]
508+
509+
# auth_names
510+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
511+
512+
new_options = opts.merge(
513+
:operation => :update_scorecard_outcomes_async,
514+
:header_params => header_params,
515+
:query_params => query_params,
516+
:form_params => form_params,
517+
:body => post_body,
518+
:auth_names => auth_names,
519+
:return_type => return_type,
520+
:api_version => "V2"
521+
)
522+
523+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
524+
if @api_client.config.debugging
525+
@api_client.config.logger.debug "API called: ServiceScorecardsAPI#update_scorecard_outcomes_async\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
526+
end
527+
return data, status_code, headers
528+
end
529+
457530
# Update an existing rule.
458531
#
459532
# @see #update_scorecard_rule_with_http_info

0 commit comments

Comments
 (0)