v1

latestOpenAPI 3.0.02026-07-141,4077,1665.2 MB
Scorecards

List all rules

Fetch all rules.

get/api/v2/scorecard/rules

Query parameters

page[size]integer
Example:10

Size for a given page. The maximum allowed value is 100.

page[offset]integer

Specific offset to use as the beginning of the returned page.

includestring
Example:scorecard

Include related scorecard details in the response.

filter[rule][id]string
Example:37d2f990-c885-4972-949b-8b798213a166

Filter the rules on a rule ID.

filter[rule][enabled]boolean
Example:true

Filter for enabled rules only.

filter[rule][custom]boolean
Example:true

Filter for custom rules only.

filter[rule][name]string
Example:Code Repos Defined

Filter rules on the rule name.

filter[rule][description]string
Example:Identifying

Filter rules on the rule description.

fields[rule]string
Example:name, description

Return only specific fields in the response for rule attributes.

fields[scorecard]string
Example:name

Return only specific fields in the included response for scorecard attributes.

Response

OK

Example response

{
  "data": [
    {
      "attributes": {
        "enabled": true,
        "level": 2,
        "name": "Team Defined",
        "scope_query": "kind:service",
        "scorecard_name": "Deployments automated via Deployment Trains"
      },
      "id": "q8MQxk8TCqrHnWkx",
      "relationships": {
        "scorecard": {
          "data": {
            "id": "q8MQxk8TCqrHnWkp",
            "type": "scorecard"
          }
        }
      },
      "type": "rule"
    }
  ],
  "links": {
    "next": "/api/v2/scorecard/rules?page%5Blimit%5D=2&page%5Boffset%5D=2&page%5Bsize%5D=2"
  }
}