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: Example: `` |
Query parameters
|
Name |
Description |
|
engine |
Type: string Exact engine name. Omit to include all engines. Default: `` Example: |
|
pageSize |
Type: integer Page size, from 1 to 250. Default: 50. Default: Min value: Max value: |
|
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: Example: `` |
|
sortOrder |
Type: string ASC or DESC (default). Repository ID breaks ties. Default: 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
|
|
nextPageToken |
Type: string Example: |
|
totalSize |
Type: integer |
|
listRevision |
Type: string | null Example: |
RepositoryDefectStats
|
Name |
Description |
||
|
engineName |
Type: string Example: |
||
|
engineType |
Type: string Example: |
||
|
gitRepo |
Type: string Example: |
||
|
lastScanTime |
Type: integer |
||
|
severities |
Type: object
Example
|
||
|
statuses |
Type: object
Example
|
Example
{
"gitRepo": "example",
"engineType": "example",
"engineName": "example",
"lastScanTime": 0,
"severities": {},
"statuses": {}
}