@@ -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: |-
0 commit comments