Scorecards
Update Scorecard
Updates a scorecard.
put/v1/scorecards/{id}
Request body
Example request
{
"name": "Incident Response",
"description": "Governs key metrics pertaining to teams' incident response practices.",
"entity_selector": {
"selector_parameters": {
"resource_type": "gateway_svc",
"integration": "gateway-manager"
}
},
"criteria": [
{
"id": "5c1121f9-3f3a-47c7-9bb6-c81a51128714",
"name": "Median time to merge opened PRs is less than 6 hours over the last 3 months.",
"enabled": true,
"template_name": "time_to_merge",
"template_parameters": {
"measure": "median",
"threshold": {
"unit": "hours",
"value": 6
},
"window": {
"unit": "months",
"value": 3
}
},
"section_name": "Source Code Management"
}
],
"scorecard_template": "kong_best_practices"
}Response
A response containing a single scorecard.
Example response
{
"id": "f3704e4c-104d-4f21-998a-20d4364c893f",
"name": "Incident Response",
"description": "Governs key metrics pertaining to teams' incident response practices.",
"score": {
"value": "88%",
"raw_value": 87.5
},
"entity_selector": {
"selector_parameters": {
"resource_type": "gateway_svc",
"integration": "gateway-manager"
}
},
"scorecard_template": "kong_best_practices",
"created_at": "2022-11-04T20:10:06.927Z",
"updated_at": "2022-11-04T20:10:06.927Z",
"criteria": [
{
"id": "5c1121f9-3f3a-47c7-9bb6-c81a51128714",
"name": "Time to restore service is less than 6 hours over the last 3 months.",
"scorecard_id": "f3704e4c-104d-4f21-998a-20d4364c893f",
"enabled": true,
"template_name": "time_to_merge",
"template_parameters": {
"measure": "median",
"threshold": {
"unit": "hours",
"value": 6
},
"window": {
"unit": "months",
"value": 3
}
},
"section_name": "Documentation",
"created_at": "2022-11-04T20:10:06.927Z",
"updated_at": "2022-11-04T20:10:06.927Z"
}
]
}