List organization repositories with their latest successful default-branch scan

Request

GET

https://appsec.sourcecraft.tech/v1/repositories

Query parameters

Name

Description

orgId

Type: string

Organization ID. Lists repositories known to AppSec and readable by the caller.

Pattern: \S

Example: ``

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

Sort field: timeFinished (default), name or gitRepo. Missing scan times sort last.

Default: timeFinished

Example: ``

sortOrder

Type: string

Sort direction: ASC or DESC (default). Repository ID breaks ties.

Default: DESC

Example: ``

Responses

200 OK

OK

Body

application/json
{
  "data": [
    {
      "gitRepo": "example",
      "name": "example",
      "latestScan": {
        "id": 0,
        "uuid": "example",
        "status": 0,
        "commitHash": "example",
        "timeStarted": 0,
        "timeFinished": 0,
        "isLatest": true,
        "gitReferenceName": "example",
        "pullRequestId": "example",
        "newDelta": 0,
        "closedDelta": 0,
        "totalDefectGroups": 0,
        "foundDefectGroups": 0,
        "openDefectGroups": 0,
        "scanType": "example",
        "expectedReportCount": 0,
        "receivedReportCount": 0,
        "origin": "example"
      }
    }
  ],
  "nextPageToken": "example",
  "totalSize": 0,
  "listRevision": "example"
}

Name

Description

data

Type: RepositoryScanDto[]

Example
[
  {
    "gitRepo": "example",
    "name": "example",
    "latestScan": {
      "id": 0,
      "uuid": "example",
      "status": 0,
      "commitHash": "example",
      "timeStarted": 0,
      "timeFinished": 0,
      "isLatest": true,
      "gitReferenceName": "example",
      "pullRequestId": "example",
      "newDelta": 0,
      "closedDelta": 0,
      "totalDefectGroups": 0,
      "foundDefectGroups": 0,
      "openDefectGroups": 0,
      "scanType": "example",
      "expectedReportCount": 0,
      "receivedReportCount": 0,
      "origin": "example"
    }
  }
]

nextPageToken

Type: string

Example: example

totalSize

Type: integer

listRevision

Type: string | null

Example: example

ScanSummaryDto

Name

Description

commitHash

Type: string

Example: example

expectedReportCount

Type: integer

gitReferenceName

Type: string | null

Example: example

id

Type: integer

isLatest

Type: boolean

origin

Type: string

Example: example

pullRequestId

Type: string | null

Example: example

receivedReportCount

Type: integer

scanType

Type: string

Example: example

status

Type: integer

timeFinished

Type: integer | null

timeStarted

Type: integer | null

uuid

Type: string

Example: example

closedDelta

Type: integer | null

foundDefectGroups

Type: integer | null

newDelta

Type: integer | null

openDefectGroups

Type: integer | null

totalDefectGroups

Type: integer | null

Example
{
  "id": 0,
  "uuid": "example",
  "status": 0,
  "commitHash": "example",
  "timeStarted": 0,
  "timeFinished": 0,
  "isLatest": true,
  "gitReferenceName": "example",
  "pullRequestId": "example",
  "newDelta": 0,
  "closedDelta": 0,
  "totalDefectGroups": 0,
  "foundDefectGroups": 0,
  "openDefectGroups": 0,
  "scanType": "example",
  "expectedReportCount": 0,
  "receivedReportCount": 0,
  "origin": "example"
}

RepositoryScanDto

Name

Description

gitRepo

Type: string

Example: example

latestScan

Any of 2 types
  • Type: ScanSummaryDto

    Example
    {
      "id": 0,
      "uuid": "example",
      "status": 0,
      "commitHash": "example",
      "timeStarted": 0,
      "timeFinished": 0,
      "isLatest": true,
      "gitReferenceName": "example",
      "pullRequestId": "example",
      "newDelta": 0,
      "closedDelta": 0,
      "totalDefectGroups": 0,
      "foundDefectGroups": 0,
      "openDefectGroups": 0,
      "scanType": "example",
      "expectedReportCount": 0,
      "receivedReportCount": 0,
      "origin": "example"
    }
    
  • Type: null

    Example: null

Example
{
  "id": 0,
  "uuid": "example",
  "status": 0,
  "commitHash": "example",
  "timeStarted": 0,
  "timeFinished": 0,
  "isLatest": true,
  "gitReferenceName": "example",
  "pullRequestId": "example",
  "newDelta": 0,
  "closedDelta": 0,
  "totalDefectGroups": 0,
  "foundDefectGroups": 0,
  "openDefectGroups": 0,
  "scanType": "example",
  "expectedReportCount": 0,
  "receivedReportCount": 0,
  "origin": "example"
}

name

Type: string

Example: example

Example
{
  "gitRepo": "example",
  "name": "example",
  "latestScan": {
    "id": 0,
    "uuid": "example",
    "status": 0,
    "commitHash": "example",
    "timeStarted": 0,
    "timeFinished": 0,
    "isLatest": true,
    "gitReferenceName": "example",
    "pullRequestId": "example",
    "newDelta": 0,
    "closedDelta": 0,
    "totalDefectGroups": 0,
    "foundDefectGroups": 0,
    "openDefectGroups": 0,
    "scanType": "example",
    "expectedReportCount": 0,
    "receivedReportCount": 0,
    "origin": "example"
  }
}
Предыдущая
Следующая