Skip to content

Commit 997f3da

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 8e00dc3 of spec repo
1 parent 7b859dc commit 997f3da

16 files changed

Lines changed: 1099 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: |-

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)