Scorecards

Update Scorecard

Changed on

Updates a scorecard.

put/v1/scorecards/{id}

Request

  • Base URL
    https://global.api.konghq.com
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Path parameters

id, string uuid required
Example:f3704e4c-104d-4f21-998a-20d4364c893f

The id of the scorecard.

Request body

UpdateScorecard required
name, string required

The human-readable name of the scorecard.

description, string nullable required
entity_selector, ScorecardEntitySelector nullable required

Selector used to dynamically target catalog entities that will be included in the given scorecard's evaluated score.

criteria, union[] required
scorecard_template, 'kong_best_practices' | 'service_documentation' | 'service_maturity' | 'security_and_compliance' nullable required

The name of the scorecard template used to create the scorecard. Otherwise, null.

Example request

{
  "name": "Incident Response",
  "description": "Governs key metrics pertaining to teams' incident response practices.",
  "entity_selector": {
    "selector": "label",
    "selector_parameters": {
      "label_key": "product_area",
      "operator": "eq",
      "value": "cloud_platform"
    }
  },
  "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.

ScorecardWithCriteria required

Representation of a scorecard.

id, string uuid required
name, string required

The human-readable name of the scorecard.

description, string nullable required
score, ScorecardScore nullable required

The current score for the given Scorecard. A null value indicates the scorecard has not yet been evaluated and therefore no score has been computed.

entity_selector, ScorecardEntitySelector nullable required

Selector used to dynamically target catalog entities that will be included in the given scorecard's evaluated score.

scorecard_template, 'kong_best_practices' | 'service_documentation' | 'service_maturity' | 'security_and_compliance' nullable required

The name of the scorecard template used to create the scorecard. Otherwise, null.

created_at, string date-time required

An ISO-8601 timestamp representation of entity creation date.

updated_at, string date-time required

An ISO-8601 timestamp representation of entity update date.

criteria, ScorecardCriteria[] required

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": "label",
    "selector_parameters": {
      "label_key": "product_area",
      "operator": "eq",
      "value": "cloud_platform"
    }
  },
  "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"
    }
  ]
}

Changes

    • breaking

      added to the invalid_parameters/items response property oneOf list for the response status

    • warning

      added the new key_invalid enum value to the invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule response property for the response status

    • warning

      added the new unique enum value to the invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule response property for the response status