Skip to main content

Get Code Repository Settings



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


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 \



CodeRepoSettings is the settings for scanning remote code repositories

    specifications object[]

    Repository specifications used for scanning.

  • Array [
  • credentialID string

    ID of the credentials in the credentials store to use for authenticating with the code repo service provider.

    excludedManifestPaths string[]

    Paths in the repository the scanner ignores when looking for manifest files to evaluate.

    explicitManifestNames string[]

    Additional manifest files for the scanner to evaluate. Explicitly specify manifest filenames when you use non-standard naming schemes. (e.g., prod-requirements.txt).

    publicOnly boolean

    Indicates whether this specification is meant for (unauthenticated) public-only scanning (true) or private as well (false).

    repositories string[]

    Repository names to scan. The format is /<repo_name>.

    targetPythonVersion string

    Python version to consider when resolving Python dependencies. The default value is the latest version.

    type shared.CodeRepoProviderType

    Possible values: [github,CI]

    CodeRepoProviderType is the type of provider for the code repository, e.g., GitHub, GitLab etc

  • ]
  • webhookUrlSuffix string

    Random URL suffix generated for the webhook API.