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
- (the index of the results page) Type: number Default value: 0
- (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)
- (search for code reviews of specific repositories) Type: string Default value - null
- (results number to get) Type: number Default value: 1000
- (get the number of the total results or not) Type: boolean Default value: false
Possible values: [weeklyCommits
, usersCount
, failedPrs
, pendingFixPrs
, scanTime
, repository
, organization
]
Possible values: [ASC
, DESC
]
Responses
- 200
- 422
Get projects PRs data for customer
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
- Array [
- ]
data object[]required
latestPR objectrequired
enforcementRule object
IAC objectrequired
Possible values: [OFF
, INFO
, LOW
, MEDIUM
, HIGH
, CRITICAL
]
Possible values: [OFF
, INFO
, LOW
, MEDIUM
, HIGH
, CRITICAL
]
Possible values: [OFF
, INFO
, LOW
, MEDIUM
, HIGH
, CRITICAL
]
IMAGES objectrequired
Possible values: [OFF
, INFO
, LOW
, MEDIUM
, HIGH
, CRITICAL
]
Possible values: [OFF
, INFO
, LOW
, MEDIUM
, HIGH
, CRITICAL
]
Possible values: [OFF
, INFO
, LOW
, MEDIUM
, HIGH
, CRITICAL
]
OPEN_SOURCE objectrequired
Possible values: [OFF
, INFO
, LOW
, MEDIUM
, HIGH
, CRITICAL
]
Possible values: [OFF
, INFO
, LOW
, MEDIUM
, HIGH
, CRITICAL
]
Possible values: [OFF
, INFO
, LOW
, MEDIUM
, HIGH
, CRITICAL
]
SECRETS objectrequired
Possible values: [OFF
, INFO
, LOW
, MEDIUM
, HIGH
, CRITICAL
]
Possible values: [OFF
, INFO
, LOW
, MEDIUM
, HIGH
, CRITICAL
]
Possible values: [OFF
, INFO
, LOW
, MEDIUM
, HIGH
, CRITICAL
]
SUPPLY_CHAIN objectrequired
Possible values: [OFF
, INFO
, LOW
, MEDIUM
, HIGH
, CRITICAL
]
Possible values: [OFF
, INFO
, LOW
, MEDIUM
, HIGH
, CRITICAL
]
Possible values: [OFF
, INFO
, LOW
, MEDIUM
, HIGH
, CRITICAL
]
Possible values: [Github
, Bitbucket
, Gitlab
, AzureRepos
, cli
, AWS
, Azure
, GCP
, Docker
, githubEnterprise
, gitlabEnterprise
, bitbucketEnterprise
, terraformCloud
, githubActions
, circleci
, codebuild
, jenkins
, tfcRunTasks
, admissionController
, terraformEnterprise
]
{
"data": [
{
"currentWeekCommits": 0,
"failedPrs": 0,
"gitUsers": 0,
"latestPR": {
"enforcementRule": {
"IAC": {
"commentsBotThreshold": "OFF",
"hardFailThreshold": "OFF",
"softFailThreshold": "OFF"
},
"IMAGES": {
"commentsBotThreshold": "OFF",
"hardFailThreshold": "OFF",
"softFailThreshold": "OFF"
},
"OPEN_SOURCE": {
"commentsBotThreshold": "OFF",
"hardFailThreshold": "OFF",
"softFailThreshold": "OFF"
},
"SECRETS": {
"commentsBotThreshold": "OFF",
"hardFailThreshold": "OFF",
"softFailThreshold": "OFF"
},
"SUPPLY_CHAIN": {
"commentsBotThreshold": "OFF",
"hardFailThreshold": "OFF",
"softFailThreshold": "OFF"
}
},
"fromBranch": "string",
"intoBranch": "string",
"lastScanDate": "2024-07-29T15:51:28.071Z",
"prNumber": "string",
"title": "string"
},
"organization": "string",
"pendingFixPrs": 0,
"prevWeekCommits": 0,
"repository": "string",
"runId": 0,
"sourceType": "Github",
"totalPrs": 0
}
],
"hasNext": true
}
{
"data": [
{
"currentWeekCommits": 0,
"failedPrs": 0,
"gitUsers": 1,
"latestPR": {
"lastScanDate": "2022-09-18T15:37:25.727Z",
"prNumber": "200",
"title": "AI-1132 add user similar service"
},
"prevWeekCommits": 0,
"repository": "terragoat",
"runId": 627107,
"sourceType": "Github",
"totalPrs": 2
}
],
"hasNext": true
}
Request arguments validation error