Get Code Repository Settings
GET/api/v30.00/settings/coderepos
x-prisma-cloud-target-env: {"permission":"policyCodeRepos","saas":true,"self-hosted":true}
x-public: true
Retrieves the list of code repositories Prisma Cloud is configured to scan. It also retrieves a partial webhook URL.
Note: The API rate limit for this endpoint is 30 requests per 30 seconds. You get an HTTP error response 429 if the limit exceeds.
This endpoint maps to Defend > Vulnerabilities > Code repositories in the Console UI page.
- GitHub repositories scan scope table data
- URL suffix in Webhook settings
Webhook
You can optionally configure your code repositories with a webhook to trigger Prisma Cloud to scan repositories when there are pertinent events (e.g., new code commits).
Construct the full webhook using Console's publicly accessible DNS name or IP address, plus the webhook URL suffix.
cURL Request
Refer to the following example cURL command that retrieves all code repositories to scan, as well as the webhook URL suffix:
$ curl -k \
-u <USER> \
-H 'Content-Type: application/json' \
-X GET \
'https://<CONSOLE>/api/v<VERSION>/settings/coderepos'
Request
Responses
- 200
- default
CodeRepoSettings is the settings for scanning remote code repositories
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
specifications object[]
Repository specifications used for scanning.
ID of the credentials in the credentials store to use for authenticating with the code repo service provider.
Paths in the repository the scanner ignores when looking for manifest files to evaluate.
Additional manifest files for the scanner to evaluate. Explicitly specify manifest filenames when you use non-standard naming schemes. (e.g., prod-requirements.txt).
Indicates whether this specification is meant for (unauthenticated) public-only scanning (true) or private as well (false).
Repository names to scan. The format is
Python version to consider when resolving Python dependencies. The default value is the latest version.
Possible values: [github,CI
]
CodeRepoProviderType is the type of provider for the code repository, e.g., GitHub, GitLab etc
Random URL suffix generated for the webhook API.
{
"specifications": [
{
"credentialID": "string",
"excludedManifestPaths": [
"string"
],
"explicitManifestNames": [
"string"
],
"publicOnly": true,
"repositories": [
"string"
],
"targetPythonVersion": "string",
"type": [
"github",
"CI"
]
}
],
"webhookUrlSuffix": "string"
}