---
title: "POST /v1alpha/{+parent}/scans:generate"
method: POST
path: "/v1alpha/{+parent}/scans:generate"
tags: ["accounts"]
---

# POST /v1alpha/{+parent}/scans:generate

`POST /v1alpha/{+parent}/scans:generate`

Uploads the results of local Code Compliance analysis and generates a scan of privacy issues. Returns a google.longrunning.Operation containing analysis and findings.

## Path parameters

- `parent` string, required

## Request body

- GoogleChecksRepoScanV1alphaGenerateScanRequest — The request message for RepoScanService.GenerateScan.
  - `localScanPath` string — Required. Local scan path.
  - `cliVersion` string — Required. CLI version.
  - `scmMetadata` GoogleChecksRepoScanV1alphaScmMetadata — SCM metadata.
    - `revisionId` string — Required. Revision ID, e.g. Git commit hash.
    - `branch` string — Required. Branch name.
    - `remoteUri` string — Required. Git remote URL.
    - `pullRequest` GoogleChecksRepoScanV1alphaPullRequest — Pull request info.
      - `prNumber` string — Required. This can be supplied by the user or parsed automatically from predefined CI environment variables.
      - `baseBranch` string — Required. For PR analysis, we compare against the most recent scan of the base branch to highlight new issues.
  - `cliAnalysis` GoogleChecksRepoScanV1alphaCliAnalysis — The results of a Code Compliance CLI analysis.
    - `sources` GoogleChecksRepoScanV1alphaSource[] — Optional. Data sources detected in the scan.
      - `codeAttribution` GoogleChecksRepoScanV1alphaCodeAttribution — Source code attribution.
        - `path` string — Required. Path of the file.
        - `codeExcerpt` string — Optional. Code excerpt where the source was detected along with surrounding code.
        - `lineNumber` integer — Required. Line number (1-based).
        - `startLineNumber` integer — Optional. Start line number of the code excerpt (1-based).
      - `dataType` 'DATA_TYPE_UNSPECIFIED' | 'DATA_TYPE_APPROXIMATE_LOCATION' | 'DATA_TYPE_PRECISE_LOCATION' | 'DATA_TYPE_PERSONAL_NAME' | 'DATA_TYPE_EMAIL_ADDRESS' | 'DATA_TYPE_USER_IDS' | 'DATA_TYPE_PHYSICAL_ADDRESS' | 'DATA_TYPE_PHONE_NUMBER' | 'DATA_TYPE_RACE_AND_ETHNICITY' | 'DATA_TYPE_POLITICAL_OR_RELIGIOUS_BELIEFS' | 'DATA_TYPE_SEXUAL_ORIENTATION' | 'DATA_TYPE_OTHER_PERSONAL_INFO' | 'DATA_TYPE_PAYMENT_INFO' | 'DATA_TYPE_PURCHASE_HISTORY' | 'DATA_TYPE_CREDIT_SCORE' | 'DATA_TYPE_OTHER_FINANCIAL_INFO' | 'DATA_TYPE_HEALTH_INFO' | 'DATA_TYPE_FITNESS_INFO' | 'DATA_TYPE_EMAILS' | 'DATA_TYPE_TEXT_MESSAGES' | 'DATA_TYPE_OTHER_IN_APP_MESSAGES' | 'DATA_TYPE_PHOTOS' | 'DATA_TYPE_VIDEOS' | 'DATA_TYPE_VOICE_OR_SOUND_RECORDINGS' | 'DATA_TYPE_MUSIC_FILES' | 'DATA_TYPE_OTHER_AUDIO_FILES' | 'DATA_TYPE_FILES_AND_DOCS' | 'DATA_TYPE_CALENDAR_EVENTS' | 'DATA_TYPE_CONTACTS' | 'DATA_TYPE_APP_INTERACTIONS' | 'DATA_TYPE_IN_APP_SEARCH_HISTORY' | 'DATA_TYPE_INSTALLED_APPS' | 'DATA_TYPE_OTHER_USER_GENERATED_CONTENT' | 'DATA_TYPE_OTHER_ACTIONS' | 'DATA_TYPE_WEB_BROWSING_HISTORY' | 'DATA_TYPE_CRASH_LOGS' | 'DATA_TYPE_PERFORMANCE_DIAGNOSTICS' | 'DATA_TYPE_OTHER_APP_PERFORMANCE_DATA' | 'DATA_TYPE_DEVICE_OR_OTHER_IDS' — Required. Data type.
      - `falsePositive` boolean — Optional. Whether the finding was marked as a false positive.
    - `codeScans` GoogleChecksRepoScanV1alphaCodeScan[] — Optional. Requested code scans resulting from preliminary CLI analysis.
      - `sourceCode` GoogleChecksRepoScanV1alphaSourceCode — Contains source code from a repo.
        - `code` string — Required. Source code.
        - `path` string — Required. Path of the file.
        - `endLine` integer — Required. End line number (1-based).
        - `startLine` integer — Required. Start line number (1-based).
      - `dataTypeClassifications` GoogleChecksRepoScanV1alphaCodeScanDataTypeClassification[] — Optional. Data type classification requests.
        - `dataType` 'DATA_TYPE_UNSPECIFIED' | 'DATA_TYPE_APPROXIMATE_LOCATION' | 'DATA_TYPE_PRECISE_LOCATION' | 'DATA_TYPE_PERSONAL_NAME' | 'DATA_TYPE_EMAIL_ADDRESS' | 'DATA_TYPE_USER_IDS' | 'DATA_TYPE_PHYSICAL_ADDRESS' | 'DATA_TYPE_PHONE_NUMBER' | 'DATA_TYPE_RACE_AND_ETHNICITY' | 'DATA_TYPE_POLITICAL_OR_RELIGIOUS_BELIEFS' | 'DATA_TYPE_SEXUAL_ORIENTATION' | 'DATA_TYPE_OTHER_PERSONAL_INFO' | 'DATA_TYPE_PAYMENT_INFO' | 'DATA_TYPE_PURCHASE_HISTORY' | 'DATA_TYPE_CREDIT_SCORE' | 'DATA_TYPE_OTHER_FINANCIAL_INFO' | 'DATA_TYPE_HEALTH_INFO' | 'DATA_TYPE_FITNESS_INFO' | 'DATA_TYPE_EMAILS' | 'DATA_TYPE_TEXT_MESSAGES' | 'DATA_TYPE_OTHER_IN_APP_MESSAGES' | 'DATA_TYPE_PHOTOS' | 'DATA_TYPE_VIDEOS' | 'DATA_TYPE_VOICE_OR_SOUND_RECORDINGS' | 'DATA_TYPE_MUSIC_FILES' | 'DATA_TYPE_OTHER_AUDIO_FILES' | 'DATA_TYPE_FILES_AND_DOCS' | 'DATA_TYPE_CALENDAR_EVENTS' | 'DATA_TYPE_CONTACTS' | 'DATA_TYPE_APP_INTERACTIONS' | 'DATA_TYPE_IN_APP_SEARCH_HISTORY' | 'DATA_TYPE_INSTALLED_APPS' | 'DATA_TYPE_OTHER_USER_GENERATED_CONTENT' | 'DATA_TYPE_OTHER_ACTIONS' | 'DATA_TYPE_WEB_BROWSING_HISTORY' | 'DATA_TYPE_CRASH_LOGS' | 'DATA_TYPE_PERFORMANCE_DIAGNOSTICS' | 'DATA_TYPE_OTHER_APP_PERFORMANCE_DATA' | 'DATA_TYPE_DEVICE_OR_OTHER_IDS' — Required. Candidate data type.
        - `lineNumber` integer — Required. Line number (1-based).

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/checks.md) · [All operations](https://skmtc.net/google/apis/checks/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/checks/versions/08c0fbb26a65/schema)
