Repositories

Add repository by URL

Add a publicly-accessible repository by its git URL (e.g. a public GitHub repo). No VCS credentials or app installation are required — ZeroPath clones the repository over HTTPS. After adding, use scans.start with the returned repository ID to trigger a security scan. Supports GitHub, GitLab, Bitbucket, and any publicly accessible git repository.

post/api/v2/repositories/addByUrl

Request

  • Base URL
    https://zeropath.com
  • Auth
    API key in header X-ZeroPath-API-Token-Id and API key in header X-ZeroPath-API-Token-Secret

Request body

organizationIdstring

Organization to add the repository to.

repositoryUrlstring required

Git URL of the repository (e.g. "https://github.com/owner/repo", "github.com/owner/repo", "git@github.com:owner/repo.git"). HTTP(S), SSH, and shorthand formats are all accepted.

defaultScanTargetBranchstring

Default branch to scan (e.g. "main", "master"). If omitted, ZeroPath will auto-detect.

Response

Successfully added repository

idstring required

ID of the newly created repository. Use this with scans.start to trigger a scan.

Changes

No recorded changes to this operation across all 1 revision of this API.