Skip to content

Commit ac783e4

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 8e00dc3 of spec repo
1 parent d03b10c commit ac783e4

16 files changed

Lines changed: 1475 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 267 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41369,6 +41369,39 @@ components:
4136941369
example: "/api/v2/scorecard/rules?page%5Blimit%5D=2&page%5Boffset%5D=2&page%5Bsize%5D=2"
4137041370
type: string
4137141371
type: object
41372+
ListScorecardScoresMeta:
41373+
description: Pagination metadata for scores.
41374+
properties:
41375+
count:
41376+
description: The number of results returned in this page.
41377+
format: int64
41378+
type: integer
41379+
limit:
41380+
description: The page limit.
41381+
format: int64
41382+
type: integer
41383+
offset:
41384+
description: The page offset.
41385+
format: int64
41386+
type: integer
41387+
total:
41388+
description: The total number of results.
41389+
format: int64
41390+
type: integer
41391+
type: object
41392+
ListScorecardScoresResponse:
41393+
description: A list of scorecard scores for a given aggregation type.
41394+
properties:
41395+
data:
41396+
description: Array of score objects.
41397+
items:
41398+
$ref: "#/components/schemas/ScorecardScoreData"
41399+
type: array
41400+
links:
41401+
$ref: "#/components/schemas/ListRulesResponseLinks"
41402+
meta:
41403+
$ref: "#/components/schemas/ListScorecardScoresMeta"
41404+
type: object
4137241405
ListScorecardsResponse:
4137341406
description: Response containing a list of scorecards.
4137441407
properties:
@@ -62487,6 +62520,119 @@ components:
6248762520
type: string
6248862521
x-enum-varnames:
6248962522
- SCORECARD
62523+
ScorecardScoreAttributes:
62524+
description: Attributes of a scorecard score.
62525+
properties:
62526+
aggregation:
62527+
$ref: "#/components/schemas/ScorecardScoresAggregation"
62528+
denominator:
62529+
description: The denominator used to compute the score ratio.
62530+
format: int64
62531+
type: integer
62532+
level:
62533+
description: The maturity level of the associated rule.
62534+
format: int64
62535+
type: integer
62536+
numerator:
62537+
description: The numerator used to compute the score ratio.
62538+
format: int64
62539+
type: integer
62540+
score:
62541+
description: The computed score ratio (numerator/denominator), from 0 to 1.
62542+
format: double
62543+
type: number
62544+
total_entities:
62545+
description: The total number of entities evaluated.
62546+
format: int64
62547+
type: integer
62548+
total_fail:
62549+
description: The number of rules that failed.
62550+
format: int64
62551+
type: integer
62552+
total_no_data:
62553+
description: The number of rules with no data.
62554+
format: int64
62555+
type: integer
62556+
total_pass:
62557+
description: The number of rules that passed.
62558+
format: int64
62559+
type: integer
62560+
total_skip:
62561+
description: The number of rules that were skipped.
62562+
format: int64
62563+
type: integer
62564+
type: object
62565+
ScorecardScoreData:
62566+
description: A scorecard score object for a single entity, rule, scorecard, service, or team.
62567+
properties:
62568+
attributes:
62569+
$ref: "#/components/schemas/ScorecardScoreAttributes"
62570+
id:
62571+
description: The ID of the entity or resource being scored.
62572+
example: ""
62573+
type: string
62574+
relationships:
62575+
$ref: "#/components/schemas/ScorecardScoreRelationships"
62576+
type:
62577+
$ref: "#/components/schemas/ScorecardScoreDataType"
62578+
required:
62579+
- id
62580+
- type
62581+
type: object
62582+
ScorecardScoreDataType:
62583+
default: score
62584+
description: The JSON:API resource type.
62585+
enum: [score]
62586+
example: score
62587+
type: string
62588+
x-enum-varnames:
62589+
- SCORE
62590+
ScorecardScoreRelationshipData:
62591+
description: A relationship data object for a score.
62592+
properties:
62593+
id:
62594+
description: The ID of the related resource.
62595+
example: ""
62596+
type: string
62597+
type:
62598+
description: The type of the related resource.
62599+
example: ""
62600+
type: string
62601+
required:
62602+
- id
62603+
- type
62604+
type: object
62605+
ScorecardScoreRelationshipItem:
62606+
description: A relationship item for a score.
62607+
properties:
62608+
data:
62609+
$ref: "#/components/schemas/ScorecardScoreRelationshipData"
62610+
type: object
62611+
ScorecardScoreRelationships:
62612+
description: Relationships for a scorecard score, depending on the aggregation type.
62613+
properties:
62614+
entity:
62615+
$ref: "#/components/schemas/ScorecardScoreRelationshipItem"
62616+
rule:
62617+
$ref: "#/components/schemas/ScorecardScoreRelationshipItem"
62618+
scorecard:
62619+
$ref: "#/components/schemas/ScorecardScoreRelationshipItem"
62620+
service:
62621+
$ref: "#/components/schemas/ScorecardScoreRelationshipItem"
62622+
team:
62623+
$ref: "#/components/schemas/ScorecardScoreRelationshipItem"
62624+
type: object
62625+
ScorecardScoresAggregation:
62626+
description: Dimension to group scores by.
62627+
enum: [by-entity, by-rule, by-scorecard, by-team, by-kind]
62628+
example: by-entity
62629+
type: string
62630+
x-enum-varnames:
62631+
- BY_ENTITY
62632+
- BY_RULE
62633+
- BY_SCORECARD
62634+
- BY_TEAM
62635+
- BY_KIND
6249062636
ScorecardType:
6249162637
default: scorecard
6249262638
description: The JSON:API type for scorecard.
@@ -128027,6 +128173,127 @@ paths:
128027128173
summary: List all scorecards
128028128174
tags:
128029128175
- Scorecards
128176+
/api/v2/scorecard/scores/{aggregation}:
128177+
get:
128178+
description: Returns a list of scorecard scores for each aggregation type, with score breakdowns.
128179+
operationId: ListScorecardScores
128180+
parameters:
128181+
- description: The type of scores being requested.
128182+
in: path
128183+
name: aggregation
128184+
required: true
128185+
schema:
128186+
$ref: "#/components/schemas/ScorecardScoresAggregation"
128187+
- description: Filter scores by an entity query string.
128188+
in: query
128189+
name: filter[entity][query]
128190+
required: false
128191+
schema:
128192+
type: string
128193+
- description: Filter scores by rule ID(s), comma-separated.
128194+
in: query
128195+
name: filter[rule][id]
128196+
required: false
128197+
schema:
128198+
type: string
128199+
- description: Filter scores by rule name.
128200+
in: query
128201+
name: filter[rule][name]
128202+
required: false
128203+
schema:
128204+
type: string
128205+
- description: Filter scores by rule level(s), comma-separated.
128206+
in: query
128207+
name: filter[rule][level]
128208+
required: false
128209+
schema:
128210+
type: string
128211+
- description: Filter scores by scorecard ID(s), comma-separated.
128212+
in: query
128213+
name: filter[rule][scorecard_id]
128214+
required: false
128215+
schema:
128216+
type: string
128217+
- description: Filter scores to show only custom rules.
128218+
in: query
128219+
name: filter[rule][is_custom]
128220+
required: false
128221+
schema:
128222+
type: boolean
128223+
- description: Filter scores to show only enabled rules.
128224+
in: query
128225+
name: filter[rule][is_enabled]
128226+
required: false
128227+
schema:
128228+
type: boolean
128229+
- description: "Sort scores by field. Use a hyphen prefix for descending order. Options: score, numerator, denominator, total_pass, total_fail, total_skip, total_no_data."
128230+
in: query
128231+
name: sort
128232+
required: false
128233+
schema:
128234+
type: string
128235+
- description: Offset for pagination.
128236+
in: query
128237+
name: page[offset]
128238+
required: false
128239+
schema:
128240+
default: 0
128241+
type: integer
128242+
- description: Number of scores to return. Max is 1000.
128243+
in: query
128244+
name: page[limit]
128245+
required: false
128246+
schema:
128247+
default: 100
128248+
type: integer
128249+
responses:
128250+
"200":
128251+
content:
128252+
application/json:
128253+
examples:
128254+
default:
128255+
value:
128256+
data:
128257+
- attributes:
128258+
aggregation: by-entity
128259+
denominator: 4
128260+
numerator: 3
128261+
score: 0.75
128262+
total_fail: 1
128263+
total_no_data: 0
128264+
total_pass: 3
128265+
total_skip: 0
128266+
id: service:my-service
128267+
relationships:
128268+
entity:
128269+
data:
128270+
id: service:my-service
128271+
type: entity
128272+
type: score
128273+
links:
128274+
next: /api/v2/scorecard/scores/by-entity?page[offset]=100&page[limit]=100
128275+
meta:
128276+
count: 1
128277+
limit: 100
128278+
offset: 0
128279+
total: 42
128280+
schema:
128281+
$ref: "#/components/schemas/ListScorecardScoresResponse"
128282+
description: OK
128283+
"400":
128284+
$ref: "#/components/responses/BadRequestResponse"
128285+
"403":
128286+
$ref: "#/components/responses/ForbiddenResponse"
128287+
"429":
128288+
$ref: "#/components/responses/TooManyRequestsResponse"
128289+
security:
128290+
- apiKeyAuth: []
128291+
appKeyAuth: []
128292+
- AuthZ:
128293+
- apm_service_catalog_read
128294+
summary: List all scores
128295+
tags:
128296+
- Scorecards
128030128297
/api/v2/seats/users:
128031128298
delete:
128032128299
description: |-
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# List all scores returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::ScorecardsAPI.new
5+
p api_instance.list_scorecard_scores(ScorecardScoresAggregation::BY_ENTITY)

features/scenarios_model_mapping.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3998,6 +3998,19 @@
39983998
"filter_scorecard_name" => "String",
39993999
"filter_scorecard_description" => "String",
40004000
},
4001+
"v2.ListScorecardScores" => {
4002+
"aggregation" => "ScorecardScoresAggregation",
4003+
"filter_entity_query" => "String",
4004+
"filter_rule_id" => "String",
4005+
"filter_rule_name" => "String",
4006+
"filter_rule_level" => "String",
4007+
"filter_rule_scorecard_id" => "String",
4008+
"filter_rule_is_custom" => "Boolean",
4009+
"filter_rule_is_enabled" => "Boolean",
4010+
"sort" => "String",
4011+
"page_offset" => "Integer",
4012+
"page_limit" => "Integer",
4013+
},
40014014
"v2.UnassignSeatsUser" => {
40024015
"body" => "UnassignSeatsUserRequest",
40034016
},

features/v2/scorecards.feature

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,20 @@ Feature: Scorecards
183183
When the request is sent
184184
Then the response status is 200 OK
185185

186+
@generated @skip @team:DataDog/service-catalog
187+
Scenario: List all scores returns "Bad Request" response
188+
Given new "ListScorecardScores" request
189+
And request contains "aggregation" parameter from "REPLACE.ME"
190+
When the request is sent
191+
Then the response status is 400 Bad Request
192+
193+
@generated @skip @team:DataDog/service-catalog
194+
Scenario: List all scores returns "OK" response
195+
Given new "ListScorecardScores" request
196+
And request contains "aggregation" parameter from "REPLACE.ME"
197+
When the request is sent
198+
Then the response status is 200 OK
199+
186200
@team:DataDog/service-catalog
187201
Scenario: Update Scorecard outcomes asynchronously returns "Accepted" response
188202
Given there is a valid "create_scorecard_rule" in the system

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5270,6 +5270,12 @@
52705270
"type": "safe"
52715271
}
52725272
},
5273+
"ListScorecardScores": {
5274+
"tag": "Scorecards",
5275+
"undo": {
5276+
"type": "safe"
5277+
}
5278+
},
52735279
"UnassignSeatsUser": {
52745280
"tag": "Seats",
52755281
"undo": {

lib/datadog_api_client/inflector.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3482,6 +3482,8 @@ def overrides
34823482
"v2.list_rules_response" => "ListRulesResponse",
34833483
"v2.list_rules_response_data_item" => "ListRulesResponseDataItem",
34843484
"v2.list_rules_response_links" => "ListRulesResponseLinks",
3485+
"v2.list_scorecard_scores_meta" => "ListScorecardScoresMeta",
3486+
"v2.list_scorecard_scores_response" => "ListScorecardScoresResponse",
34853487
"v2.list_scorecards_response" => "ListScorecardsResponse",
34863488
"v2.list_security_findings_response" => "ListSecurityFindingsResponse",
34873489
"v2.list_tags_response" => "ListTagsResponse",
@@ -5052,6 +5054,13 @@ def overrides
50525054
"v2.scorecard_list_response_attributes" => "ScorecardListResponseAttributes",
50535055
"v2.scorecard_list_response_data" => "ScorecardListResponseData",
50545056
"v2.scorecard_list_type" => "ScorecardListType",
5057+
"v2.scorecard_score_attributes" => "ScorecardScoreAttributes",
5058+
"v2.scorecard_score_data" => "ScorecardScoreData",
5059+
"v2.scorecard_score_data_type" => "ScorecardScoreDataType",
5060+
"v2.scorecard_score_relationship_data" => "ScorecardScoreRelationshipData",
5061+
"v2.scorecard_score_relationship_item" => "ScorecardScoreRelationshipItem",
5062+
"v2.scorecard_score_relationships" => "ScorecardScoreRelationships",
5063+
"v2.scorecard_scores_aggregation" => "ScorecardScoresAggregation",
50555064
"v2.scorecard_type" => "ScorecardType",
50565065
"v2.search_issues_include_query_parameter_item" => "SearchIssuesIncludeQueryParameterItem",
50575066
"v2.seat_assignments_data_type" => "SeatAssignmentsDataType",

0 commit comments

Comments
 (0)