Skip to content

Commit 87b7191

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit c2f766b of spec repo
1 parent f419b98 commit 87b7191

14 files changed

Lines changed: 2420 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 267 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41461,6 +41461,39 @@ components:
4146141461
example: "/api/v2/scorecard/rules?page%5Blimit%5D=2&page%5Boffset%5D=2&page%5Bsize%5D=2"
4146241462
type: string
4146341463
type: object
41464+
ListScorecardScoresMeta:
41465+
description: Pagination metadata for scores.
41466+
properties:
41467+
count:
41468+
description: The number of results returned in this page.
41469+
format: int64
41470+
type: integer
41471+
limit:
41472+
description: The page limit.
41473+
format: int64
41474+
type: integer
41475+
offset:
41476+
description: The page offset.
41477+
format: int64
41478+
type: integer
41479+
total:
41480+
description: The total number of results.
41481+
format: int64
41482+
type: integer
41483+
type: object
41484+
ListScorecardScoresResponse:
41485+
description: A list of scorecard scores for a given aggregation type.
41486+
properties:
41487+
data:
41488+
description: Array of score objects.
41489+
items:
41490+
$ref: "#/components/schemas/ScorecardScoreData"
41491+
type: array
41492+
links:
41493+
$ref: "#/components/schemas/ListRulesResponseLinks"
41494+
meta:
41495+
$ref: "#/components/schemas/ListScorecardScoresMeta"
41496+
type: object
4146441497
ListScorecardsResponse:
4146541498
description: Response containing a list of scorecards.
4146641499
properties:
@@ -62579,6 +62612,119 @@ components:
6257962612
type: string
6258062613
x-enum-varnames:
6258162614
- SCORECARD
62615+
ScorecardScoreAttributes:
62616+
description: Attributes of a scorecard score.
62617+
properties:
62618+
aggregation:
62619+
$ref: "#/components/schemas/ScorecardScoresAggregation"
62620+
denominator:
62621+
description: The denominator used to compute the score ratio.
62622+
format: int64
62623+
type: integer
62624+
level:
62625+
description: The maturity level of the associated rule.
62626+
format: int64
62627+
type: integer
62628+
numerator:
62629+
description: The numerator used to compute the score ratio.
62630+
format: int64
62631+
type: integer
62632+
score:
62633+
description: The computed score ratio (numerator/denominator), from 0 to 1.
62634+
format: double
62635+
type: number
62636+
total_entities:
62637+
description: The total number of entities evaluated.
62638+
format: int64
62639+
type: integer
62640+
total_fail:
62641+
description: The number of rules that failed.
62642+
format: int64
62643+
type: integer
62644+
total_no_data:
62645+
description: The number of rules with no data.
62646+
format: int64
62647+
type: integer
62648+
total_pass:
62649+
description: The number of rules that passed.
62650+
format: int64
62651+
type: integer
62652+
total_skip:
62653+
description: The number of rules that were skipped.
62654+
format: int64
62655+
type: integer
62656+
type: object
62657+
ScorecardScoreData:
62658+
description: A scorecard score object for a single entity, rule, scorecard, service, or team.
62659+
properties:
62660+
attributes:
62661+
$ref: "#/components/schemas/ScorecardScoreAttributes"
62662+
id:
62663+
description: The ID of the entity or resource being scored.
62664+
example: ""
62665+
type: string
62666+
relationships:
62667+
$ref: "#/components/schemas/ScorecardScoreRelationships"
62668+
type:
62669+
$ref: "#/components/schemas/ScorecardScoreDataType"
62670+
required:
62671+
- id
62672+
- type
62673+
type: object
62674+
ScorecardScoreDataType:
62675+
default: score
62676+
description: The JSON:API resource type.
62677+
enum: [score]
62678+
example: score
62679+
type: string
62680+
x-enum-varnames:
62681+
- SCORE
62682+
ScorecardScoreRelationshipData:
62683+
description: A relationship data object for a score.
62684+
properties:
62685+
id:
62686+
description: The ID of the related resource.
62687+
example: ""
62688+
type: string
62689+
type:
62690+
description: The type of the related resource.
62691+
example: ""
62692+
type: string
62693+
required:
62694+
- id
62695+
- type
62696+
type: object
62697+
ScorecardScoreRelationshipItem:
62698+
description: A relationship item for a score.
62699+
properties:
62700+
data:
62701+
$ref: "#/components/schemas/ScorecardScoreRelationshipData"
62702+
type: object
62703+
ScorecardScoreRelationships:
62704+
description: Relationships for a scorecard score, depending on the aggregation type.
62705+
properties:
62706+
entity:
62707+
$ref: "#/components/schemas/ScorecardScoreRelationshipItem"
62708+
rule:
62709+
$ref: "#/components/schemas/ScorecardScoreRelationshipItem"
62710+
scorecard:
62711+
$ref: "#/components/schemas/ScorecardScoreRelationshipItem"
62712+
service:
62713+
$ref: "#/components/schemas/ScorecardScoreRelationshipItem"
62714+
team:
62715+
$ref: "#/components/schemas/ScorecardScoreRelationshipItem"
62716+
type: object
62717+
ScorecardScoresAggregation:
62718+
description: Dimension to group scores by.
62719+
enum: [by-entity, by-rule, by-scorecard, by-team, by-kind]
62720+
example: by-entity
62721+
type: string
62722+
x-enum-varnames:
62723+
- BY_ENTITY
62724+
- BY_RULE
62725+
- BY_SCORECARD
62726+
- BY_TEAM
62727+
- BY_KIND
6258262728
ScorecardType:
6258362729
default: scorecard
6258462730
description: The JSON:API type for scorecard.
@@ -128170,6 +128316,127 @@ paths:
128170128316
summary: List all scorecards
128171128317
tags:
128172128318
- Scorecards
128319+
/api/v2/scorecard/scores/{aggregation}:
128320+
get:
128321+
description: Returns a list of scorecard scores for each aggregation type, with score breakdowns.
128322+
operationId: ListScorecardScores
128323+
parameters:
128324+
- description: The type of scores being requested.
128325+
in: path
128326+
name: aggregation
128327+
required: true
128328+
schema:
128329+
$ref: "#/components/schemas/ScorecardScoresAggregation"
128330+
- description: Filter scores by an entity query string.
128331+
in: query
128332+
name: filter[entity][query]
128333+
required: false
128334+
schema:
128335+
type: string
128336+
- description: Filter scores by rule ID(s), comma-separated.
128337+
in: query
128338+
name: filter[rule][id]
128339+
required: false
128340+
schema:
128341+
type: string
128342+
- description: Filter scores by rule name.
128343+
in: query
128344+
name: filter[rule][name]
128345+
required: false
128346+
schema:
128347+
type: string
128348+
- description: Filter scores by rule level(s), comma-separated.
128349+
in: query
128350+
name: filter[rule][level]
128351+
required: false
128352+
schema:
128353+
type: string
128354+
- description: Filter scores by scorecard ID(s), comma-separated.
128355+
in: query
128356+
name: filter[rule][scorecard_id]
128357+
required: false
128358+
schema:
128359+
type: string
128360+
- description: Filter scores to show only custom rules.
128361+
in: query
128362+
name: filter[rule][is_custom]
128363+
required: false
128364+
schema:
128365+
type: boolean
128366+
- description: Filter scores to show only enabled rules.
128367+
in: query
128368+
name: filter[rule][is_enabled]
128369+
required: false
128370+
schema:
128371+
type: boolean
128372+
- 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."
128373+
in: query
128374+
name: sort
128375+
required: false
128376+
schema:
128377+
type: string
128378+
- description: Offset for pagination.
128379+
in: query
128380+
name: page[offset]
128381+
required: false
128382+
schema:
128383+
default: 0
128384+
type: integer
128385+
- description: Number of scores to return. Max is 1000.
128386+
in: query
128387+
name: page[limit]
128388+
required: false
128389+
schema:
128390+
default: 100
128391+
type: integer
128392+
responses:
128393+
"200":
128394+
content:
128395+
application/json:
128396+
examples:
128397+
default:
128398+
value:
128399+
data:
128400+
- attributes:
128401+
aggregation: by-entity
128402+
denominator: 4
128403+
numerator: 3
128404+
score: 0.75
128405+
total_fail: 1
128406+
total_no_data: 0
128407+
total_pass: 3
128408+
total_skip: 0
128409+
id: service:my-service
128410+
relationships:
128411+
entity:
128412+
data:
128413+
id: service:my-service
128414+
type: entity
128415+
type: score
128416+
links:
128417+
next: /api/v2/scorecard/scores/by-entity?page[offset]=100&page[limit]=100
128418+
meta:
128419+
count: 1
128420+
limit: 100
128421+
offset: 0
128422+
total: 42
128423+
schema:
128424+
$ref: "#/components/schemas/ListScorecardScoresResponse"
128425+
description: OK
128426+
"400":
128427+
$ref: "#/components/responses/BadRequestResponse"
128428+
"403":
128429+
$ref: "#/components/responses/ForbiddenResponse"
128430+
"429":
128431+
$ref: "#/components/responses/TooManyRequestsResponse"
128432+
security:
128433+
- apiKeyAuth: []
128434+
appKeyAuth: []
128435+
- AuthZ:
128436+
- apm_service_catalog_read
128437+
summary: List all scores
128438+
tags:
128439+
- Scorecards
128173128440
/api/v2/seats/users:
128174128441
delete:
128175128442
description: |-
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// List all scores returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.ScorecardsApi;
6+
import com.datadog.api.client.v2.model.ListScorecardScoresResponse;
7+
import com.datadog.api.client.v2.model.ScorecardScoresAggregation;
8+
9+
public class Example {
10+
public static void main(String[] args) {
11+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
12+
ScorecardsApi apiInstance = new ScorecardsApi(defaultClient);
13+
14+
try {
15+
ListScorecardScoresResponse result =
16+
apiInstance.listScorecardScores(ScorecardScoresAggregation.BY_ENTITY);
17+
System.out.println(result);
18+
} catch (ApiException e) {
19+
System.err.println("Exception when calling ScorecardsApi#listScorecardScores");
20+
System.err.println("Status code: " + e.getCode());
21+
System.err.println("Reason: " + e.getResponseBody());
22+
System.err.println("Response headers: " + e.getResponseHeaders());
23+
e.printStackTrace();
24+
}
25+
}
26+
}

0 commit comments

Comments
 (0)