Scans

Create or Update Scan Schedule

Create or update an automated full scan schedule. Schedules run recurring full scans on the specified repositories at the given cron interval. Pass an existing schedule ID to update, or omit to create new.

post/api/v2/scans/upsertSchedule

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 ID that owns the repositories. If omitted, resolved from the authenticated user.

crontabstring required

Cron expression defining when scans run (e.g. "0 0 * * 1" for every Monday at midnight UTC). Minimum interval is weekly.

timezonestring

IANA timezone for the cron expression (e.g. "America/New_York"). Defaults to UTC. Note: timezone is accepted for compatibility but the underlying scheduler uses UTC.

repositoryIdsstring[] required

IDs of the repositories to create or update scan schedules for.

idstring

Existing schedule ID to update. If omitted, a new schedule is created for each repository.

scanBranchstring nullable

Branch to scan. When set, creates a branch-specific schedule. A repository can have multiple schedules targeting different branches. If omitted or null, the schedule targets the repository default branch.

Response

Schedule created or updated successfully

okboolean required

Whether the operation succeeded

Changes

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