Skip to content

Commit 7c4f924

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3b6be1e of spec repo
1 parent 7b859dc commit 7c4f924

16 files changed

Lines changed: 1103 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 268 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,120 @@ 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: The type of aggregation used for scorecard scores.
62627+
enum: [by-entity, by-rule, by-scorecard, by-service, 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_SERVICE
62635+
- BY_TEAM
62636+
- BY_KIND
6249062637
ScorecardType:
6249162638
default: scorecard
6249262639
description: The JSON:API type for scorecard.
@@ -128027,6 +128174,127 @@ paths:
128027128174
summary: List all scorecards
128028128175
tags:
128029128176
- Scorecards
128177+
/api/v2/scorecard/scores/{aggregation}:
128178+
get:
128179+
description: Returns a list of scorecard scores for each aggregation type, with score breakdowns.
128180+
operationId: ListScorecardScores
128181+
parameters:
128182+
- description: The type of scores being requested.
128183+
in: path
128184+
name: aggregation
128185+
required: true
128186+
schema:
128187+
$ref: "#/components/schemas/ScorecardScoresAggregation"
128188+
- description: Filter scores by an entity query string.
128189+
in: query
128190+
name: filter[entity][query]
128191+
required: false
128192+
schema:
128193+
type: string
128194+
- description: Filter scores by rule ID(s), comma-separated.
128195+
in: query
128196+
name: filter[rule][id]
128197+
required: false
128198+
schema:
128199+
type: string
128200+
- description: Filter scores by rule name.
128201+
in: query
128202+
name: filter[rule][name]
128203+
required: false
128204+
schema:
128205+
type: string
128206+
- description: Filter scores by rule level(s), comma-separated.
128207+
in: query
128208+
name: filter[rule][level]
128209+
required: false
128210+
schema:
128211+
type: string
128212+
- description: Filter scores by scorecard ID(s), comma-separated.
128213+
in: query
128214+
name: filter[rule][scorecard_id]
128215+
required: false
128216+
schema:
128217+
type: string
128218+
- description: Filter scores to show only custom rules.
128219+
in: query
128220+
name: filter[rule][is_custom]
128221+
required: false
128222+
schema:
128223+
type: boolean
128224+
- description: Filter scores to show only enabled rules.
128225+
in: query
128226+
name: filter[rule][is_enabled]
128227+
required: false
128228+
schema:
128229+
type: boolean
128230+
- 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."
128231+
in: query
128232+
name: sort
128233+
required: false
128234+
schema:
128235+
type: string
128236+
- description: Offset for pagination.
128237+
in: query
128238+
name: page[offset]
128239+
required: false
128240+
schema:
128241+
default: 0
128242+
type: integer
128243+
- description: Number of scores to return. Max is 1000.
128244+
in: query
128245+
name: page[limit]
128246+
required: false
128247+
schema:
128248+
default: 100
128249+
type: integer
128250+
responses:
128251+
"200":
128252+
content:
128253+
application/json:
128254+
examples:
128255+
default:
128256+
value:
128257+
data:
128258+
- attributes:
128259+
aggregation: by-entity
128260+
denominator: 4
128261+
numerator: 3
128262+
score: 0.75
128263+
total_fail: 1
128264+
total_no_data: 0
128265+
total_pass: 3
128266+
total_skip: 0
128267+
id: service:my-service
128268+
relationships:
128269+
entity:
128270+
data:
128271+
id: service:my-service
128272+
type: entity
128273+
type: score
128274+
links:
128275+
next: /api/v2/scorecard/scores/by-entity?page[offset]=100&page[limit]=100
128276+
meta:
128277+
count: 1
128278+
limit: 100
128279+
offset: 0
128280+
total: 42
128281+
schema:
128282+
$ref: "#/components/schemas/ListScorecardScoresResponse"
128283+
description: OK
128284+
"400":
128285+
$ref: "#/components/responses/BadRequestResponse"
128286+
"403":
128287+
$ref: "#/components/responses/ForbiddenResponse"
128288+
"429":
128289+
$ref: "#/components/responses/TooManyRequestsResponse"
128290+
security:
128291+
- apiKeyAuth: []
128292+
appKeyAuth: []
128293+
- AuthZ:
128294+
- apm_service_catalog_read
128295+
summary: List all scores
128296+
tags:
128297+
- Scorecards
128030128298
/api/v2/seats/users:
128031128299
delete:
128032128300
description: |-

docs/datadog_api_client.v2.model.rst

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16734,6 +16734,20 @@ datadog\_api\_client.v2.model.list\_rules\_response\_links module
1673416734
:members:
1673516735
:show-inheritance:
1673616736

16737+
datadog\_api\_client.v2.model.list\_scorecard\_scores\_meta module
16738+
------------------------------------------------------------------
16739+
16740+
.. automodule:: datadog_api_client.v2.model.list_scorecard_scores_meta
16741+
:members:
16742+
:show-inheritance:
16743+
16744+
datadog\_api\_client.v2.model.list\_scorecard\_scores\_response module
16745+
----------------------------------------------------------------------
16746+
16747+
.. automodule:: datadog_api_client.v2.model.list_scorecard_scores_response
16748+
:members:
16749+
:show-inheritance:
16750+
1673716751
datadog\_api\_client.v2.model.list\_scorecards\_response module
1673816752
---------------------------------------------------------------
1673916753

@@ -27773,6 +27787,55 @@ datadog\_api\_client.v2.model.scorecard\_list\_type module
2777327787
:members:
2777427788
:show-inheritance:
2777527789

27790+
datadog\_api\_client.v2.model.scorecard\_score\_attributes module
27791+
-----------------------------------------------------------------
27792+
27793+
.. automodule:: datadog_api_client.v2.model.scorecard_score_attributes
27794+
:members:
27795+
:show-inheritance:
27796+
27797+
datadog\_api\_client.v2.model.scorecard\_score\_data module
27798+
-----------------------------------------------------------
27799+
27800+
.. automodule:: datadog_api_client.v2.model.scorecard_score_data
27801+
:members:
27802+
:show-inheritance:
27803+
27804+
datadog\_api\_client.v2.model.scorecard\_score\_data\_type module
27805+
-----------------------------------------------------------------
27806+
27807+
.. automodule:: datadog_api_client.v2.model.scorecard_score_data_type
27808+
:members:
27809+
:show-inheritance:
27810+
27811+
datadog\_api\_client.v2.model.scorecard\_score\_relationship\_data module
27812+
-------------------------------------------------------------------------
27813+
27814+
.. automodule:: datadog_api_client.v2.model.scorecard_score_relationship_data
27815+
:members:
27816+
:show-inheritance:
27817+
27818+
datadog\_api\_client.v2.model.scorecard\_score\_relationship\_item module
27819+
-------------------------------------------------------------------------
27820+
27821+
.. automodule:: datadog_api_client.v2.model.scorecard_score_relationship_item
27822+
:members:
27823+
:show-inheritance:
27824+
27825+
datadog\_api\_client.v2.model.scorecard\_score\_relationships module
27826+
--------------------------------------------------------------------
27827+
27828+
.. automodule:: datadog_api_client.v2.model.scorecard_score_relationships
27829+
:members:
27830+
:show-inheritance:
27831+
27832+
datadog\_api\_client.v2.model.scorecard\_scores\_aggregation module
27833+
-------------------------------------------------------------------
27834+
27835+
.. automodule:: datadog_api_client.v2.model.scorecard_scores_aggregation
27836+
:members:
27837+
:show-inheritance:
27838+
2777627839
datadog\_api\_client.v2.model.scorecard\_type module
2777727840
----------------------------------------------------
2777827841

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
List all scores returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.scorecards_api import ScorecardsApi
7+
from datadog_api_client.v2.model.scorecard_scores_aggregation import ScorecardScoresAggregation
8+
9+
configuration = Configuration()
10+
with ApiClient(configuration) as api_client:
11+
api_instance = ScorecardsApi(api_client)
12+
response = api_instance.list_scorecard_scores(
13+
aggregation=ScorecardScoresAggregation.BY_ENTITY,
14+
)
15+
16+
print(response)

0 commit comments

Comments
 (0)