Rank readable repositories with defects and return their per-engine counts

pageSize and totalSize count repositories. Each page includes all their matching engine rows.

Request

GET

https://appsec.sourcecraft.tech/v1/organizations/{orgId}/defect-groups/stats/by-repository

Path parameters

Name

Description

orgId

Type: string

Pattern: \S

Example: ``

Query parameters

Name

Description

engine

Type: string

Exact engine name. Omit to include all engines.

Default: ``

Example: Trivy

pageSize

Type: integer

Page size, from 1 to 250. Default: 50.

Default: 50

Min value: 1

Max value: 250

pageToken

Type: string

Omit for the first page. Use nextPageToken from the response for subsequent pages, keeping all other parameters unchanged. An empty nextPageToken means the last page.

Default: ``

Example: ``

sortBy

Type: string

important (HIGH plus CRITICAL), total (all groups), or opened (OPEN groups)

Default: important

Example: ``

sortOrder

Type: string

ASC or DESC (default). Repository ID breaks ties.

Default: DESC

Example: ``

type

Type: string

Engine type, e.g. SCA. Omitted, blank or UNSPECIFIED includes all types.

Default: ``

Example: ``

Responses

200 OK

OK

Body

application/json
{
  "data": [
    {
      "gitRepo": "example",
      "engineType": "example",
      "engineName": "example",
      "lastScanTime": 0,
      "severities": {},
      "statuses": {}
    }
  ],
  "nextPageToken": "example",
  "totalSize": 0,
  "listRevision": "example"
}

Name

Description

data

Type: RepositoryDefectStats[]

Example
[
  {
    "gitRepo": "example",
    "engineType": "example",
    "engineName": "example",
    "lastScanTime": 0,
    "severities": {},
    "statuses": {}
  }
]

nextPageToken

Type: string

Example: example

totalSize

Type: integer

listRevision

Type: string | null

Example: example

RepositoryDefectStats

Name

Description

engineName

Type: string

Example: example

engineType

Type: string

Example: example

gitRepo

Type: string

Example: example

lastScanTime

Type: integer

severities

Type: object

[additional]

Type: integer

Example
{}

statuses

Type: object

[additional]

Type: integer

Example
{}
Example
{
  "gitRepo": "example",
  "engineType": "example",
  "engineName": "example",
  "lastScanTime": 0,
  "severities": {},
  "statuses": {}
}