---
title: "Start a repository scan"
method: POST
path: "/workspaces/{workspaceSlug}/practices/scans"
tags: ["scan"]
---

# Start a repository scan

`POST /workspaces/{workspaceSlug}/practices/scans`

## Request

- Base URL: `/` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/workspaces/{workspaceSlug}/practices/scans`
- Auth: HTTP bearer

## Path parameters

- `workspaceSlug` string, required

## Headers

- `Idempotency-Key` string, uuid, required

## Request body

- StartScanRequest
  - `budgetUsd` string, required
  - `expectedVersion` string, nullable, required
  - `practiceSlugs` string[], nullable, required
  - `ref` string, nullable, required
  - `repositoryItemId` string, required
  - `reuse` boolean, nullable, required

## Response `202`

Accepted

- ScanSummary
  - `baselineScanId` string, uuid, nullable, required
  - `completedAt` string, date-time, nullable, required
  - `counts` ScanCounts, required
    - `couldNotDetermine` integer, required
    - `doesNotApply` integer, required
    - `files` integer, nullable, required
    - `met` integer, required
    - `notMet` integer, required
    - `notReviewed` integer, required
    - `openProblems` integer, required
    - `practiceItemPairs` integer, nullable, required
    - `problems` integer, required
    - `reused` integer, required
    - `reviewed` integer, required
    - `withheld` integer, required
  - `createdAt` string, date-time, required
  - `id` string, uuid, required
  - `itemVersion` string, required
  - `origin` 'EVENT' | 'REQUEST' | 'SCHEDULE' | 'BACKFILL', required
  - `practiceCount` integer, required
  - `ref` string, required
  - `repository` ItemRef, required
    - `container` string, nullable, required
    - `id` string, required
    - `kind` string, required
    - `label` string, required
    - `parentId` string, nullable, required
    - `path` string, nullable, required
    - `provider` 'GITHUB' | 'GITLAB' | 'SLACK' | 'OUTLINE' | 'null', nullable, required
    - `removedAt` string, date-time, nullable, required
    - `title` string, nullable, required
    - `url` string, nullable, required
  - `requestedBy` AccountRef, required
    - `avatarUrl` string, nullable, required
    - `displayName` string, nullable, required
    - `id` string, required
    - `identities` ProviderIdentityRef[], required
      - `avatarUrl` string, nullable, required
      - `displayName` string, nullable, required
      - `login` string, nullable, required
      - `provider` 'GITHUB' | 'GITLAB' | 'SLACK' | 'OUTLINE', required
    - `status` 'UNCLAIMED' | 'ACTIVE' | 'SUSPENDED' | 'DELETING' | 'DELETED', required
  - `startedAt` string, date-time, nullable, required
  - `status` 'QUEUED' | 'RUNNING' | 'COMPLETE' | 'PARTIAL' | 'FAILED' | 'CANCELLED', required
  - `stopReason` 'TIMED_OUT' | 'EXECUTION_FAILED' | 'PREPARATION_FAILED' | 'PROCESSING_FAILED' | 'PERSON_DATA_ERASED' | 'STALE_ROLLOUT_REVISION' | 'CANCELLED_BY_ADMIN' | 'REPLACED' | 'LEGACY_FAILURE' | 'EXECUTION_INCOMPLETE' | 'RESULT_WITHHELD' | 'READINESS_REFUSED' | 'SUSPECT_LISTING' | 'BUDGET' | 'USAGE_UNVERIFIABLE' | 'DEADLINE' | 'CANCELLED' | 'ENUMERATION_FAILED' | 'ENUMERATION_LIMIT' | 'NO_SCAN_PRACTICES' | 'MODEL_CHANGED' | 'MODEL_UNAVAILABLE' | 'ERROR' | 'LEGACY_SCOPE_UNKNOWN' | 'CONTRACT_CHANGED' | 'null', nullable, required

## Changes

- **2026-10-17** `4b8a89bf492c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/hephaestus-build/apis/hephaestus-api/changes/workspaces/:workspaceSlug/practices/scans/post.md)

---

[API](https://skmtc.dev/hephaestus-build/apis/hephaestus-api.md) · [All operations](https://skmtc.dev/hephaestus-build/apis/hephaestus-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hephaestus-build/apis/hephaestus-api/revisions/3592ab716973?raw)
