Skip to main content

Get Integrated VCS Repositories Metadata

GET 

/code/api/v1/development-pipeline/projects/prs/data

Prisma Cloud Application Security’s Projects table enables you to view your integrated VCS repository snapshots. With Projects, you can analyze your repository usage rate according to various parameters, such as weekly commits and Git users who have merged their commits into the default branch in a set period of time. This data can help you understand which of your repositories are used most, and which have the highest risk of deploying a misconfigured or vulnerable code.

The response includes the following data for each VCS repository:

  • Repository: the Git repository to which the scanned item belongs
  • Organization: the Git organization to which the repository belongs and its VCS type
  • SourceType: Which VCS the Git repository is hosted on
  • currentWeekCommits: the total number of commits from the latest week that were merged into the default branch. If no records are available from the past week, the currentWeekCommits value will be -1.
  • prevWeekCommits: the total number of commits from previous week that were merged into the default branch. If no records are available from the past week, the prevWeekCommits value will be -1.
  • gitUsers: how many Git users have merged their commits into the default branch over the past 90 days. If no records are available from the past week, the gitUsers value will be 1.
  • failedPrs: the number of failed open PRs out of all open PRs based on Prisma Cloud Application Security's findings and Enforcement settings. For more information, see Enforcement. If no records are available from the past week, the failedPrs value will be 1.
  • totalPrs: the number of open PRs evaluated by Prisma Cloud Application Security’s VCS app. If no records are available from the past week, the totalPrs value will be 1.
  • pendingFixPrs: the number of open PRs created by Prisma Cloud Application Security/Prisma Cloud after being submitted by users within the platform. These are yet to be merged into the default branch. If no records are available from the past week, the pendingFixPrs value will be 1.
  • latestPR: { title: PR name number: PR id lastScanDate: time and date of the latest PR scan }

Request

Query Parameters

    page doublerequired
    • (the index of the results page) Type: number Default value: 0
    sortBy string

    Possible values: [weeklyCommits, usersCount, failedPrs, pendingFixPrs, scanTime, repository, organization]

    • (The column name by which to sort the results) Type: ['weeklyCommits' | 'usersCount' | 'failedPrs' | 'pendingFixPrs' | 'scanTime'| 'repository' | 'organization'] Default value - null (the results will be sorted by ‘usersCount’ by default)
    sortDir string

    Possible values: [ASC, DESC]

    search string
    • (search for code reviews of specific repositories) Type: string Default value - null
    pageSize double
    • (results number to get) Type: number Default value: 1000
    withTotal boolean
    • (get the number of the total results or not) Type: boolean Default value: false

Responses

Get projects PRs data for customer

Schema
    data object[]required
  • Array [
  • currentWeekCommits doublerequired
    failedPrs doublerequired
    gitUsers doublerequired
    latestPR objectrequired
    enforcementRule object
    IAC objectrequired
    commentsBotThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    hardFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    softFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    IMAGES objectrequired
    commentsBotThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    hardFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    softFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    OPEN_SOURCE objectrequired
    commentsBotThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    hardFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    softFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    SECRETS objectrequired
    commentsBotThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    hardFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    softFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    SUPPLY_CHAIN objectrequired
    commentsBotThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    hardFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    softFailThreshold RuleThreshold (string)required

    Possible values: [OFF, INFO, LOW, MEDIUM, HIGH, CRITICAL]

    fromBranch string
    intoBranch string
    lastScanDate date-time
    prNumber stringrequired
    title stringrequired
    organization stringrequired
    pendingFixPrs doublerequired
    prevWeekCommits doublerequired
    repository stringrequired
    runId doublerequired
    sourceType SourceType (string)required

    Possible values: [Github, Bitbucket, Gitlab, AzureRepos, cli, AWS, Azure, GCP, Docker, githubEnterprise, gitlabEnterprise, bitbucketEnterprise, terraformCloud, githubActions, circleci, codebuild, jenkins, tfcRunTasks, admissionController, terraformEnterprise]

    totalPrs doublerequired
  • ]
  • hasNext booleanrequired
Loading...