---
title: "POST /datasources/{dataSourceName}/scans/{scanName}:run"
method: POST
path: "/datasources/{dataSourceName}/scans/{scanName}:run"
tags: ["ScanResult"]
---

# POST /datasources/{dataSourceName}/scans/{scanName}:run

`POST /datasources/{dataSourceName}/scans/{scanName}:run`

Runs the scan

## Path parameters

- `dataSourceName` string, required
- `scanName` string, required

## Query parameters

- `runId` string, required
- `scanLevel` 'Full' | 'Incremental'
- `api-version` string, required

## Response `202`

Success

- ScanResultWithIngestion — The scan result with ingestion.
  - `discoveryExecutionDetails` DiscoveryExecutionDetails — The discovery execution details.
    - `discoveryStartTime` string, date-time — The discovery start time.
    - `discoveryEndTime` string, date-time — The discovery end time.
    - `status` 'Queued' | 'Running' | 'Succeeded' | 'Failed' | 'Cancelled' | 'Delayed' | 'Throttled' | 'CompletedWithExceptions' | 'CompleteWithWarning' — The discovery status.
    - `statistics` object — The discovery statistics.
    - `isErrorLogAvailable` boolean — Indicates whether the error log is available.
  - `ingestionExecutionDetails` IngestionExecutionDetails — The ingestion execution details.
    - `ingestionStartTime` string, date-time — The ingestion start time.
    - `ingestionEndTime` string, date-time — The ingestion end time.
    - `status` 'None' | 'Succeeded' | 'Queued' | 'InProgress' | 'SourceUnknown' | 'PartialSucceeded' | 'Failed' | 'Canceled' | 'Canceling' — The ingestion status.
    - `statistics` object — The ingestion statistics.
    - `estimatedTimeRemainingInSeconds` integer — The estimated time remaining in seconds.
    - `isErrorLogAvailable` boolean — Indicates whether the error log is available.
    - `lastUpdatedAt` string, date-time — The last updated time.
  - `parentId` string — The parent scan result identifier.
  - `id` string — The scan result identifier.
  - `ingestionJobId` string — The ingestion job identifier.
  - `resourceId` string — The resource identifier.
  - `status` 'Accepted' | 'InProgress' | 'TransientFailure' | 'Succeeded' | 'Failed' | 'Canceled' — The scan result status.
  - `diagnostics` ScanDiagnostics — The scan diagnostics.
    - `notifications` Notification[] — Notifications.
      - `message` string — Notification message.
      - `code` integer — Notification code.
    - `exceptionCountMap` object — Exception count map.
  - `startTime` string, date-time — The scan start time.
  - `endTime` string, date-time — The scan end time.
  - `scanRulesetVersion` integer — The scan ruleset version.
  - `scanRulesetType` 'Custom' | 'System' — The scan ruleset type.
  - `scanLevelType` 'Full' | 'Incremental' — Scan level type.
  - `errorMessage` string — The error message.
  - `error` ErrorModel — The error model.
    - `code` string, required — A unique error code that identifies the specific error.
    - `message` string, required — A human-readable error message that provides more details about the error.
    - `target` string — The specific component that the error is associated with.
    - `details` ErrorModel[] — An array of nested ErrorModel objects that provides additional error details.
  - `runType` string — The run type.
  - `dataSourceType` 'None' | 'Fabric' | 'AzureSubscription' | 'AzureResourceGroup' | 'AzureSynapseWorkspace' | 'AzureSynapse' | 'AdlsGen1' | 'AdlsGen2' | 'AmazonAccount' | 'AmazonS3' | 'AmazonSql' | 'AzureCosmosDb' | 'AzureDataExplorer' | 'AzureFileService' | 'AzureSqlDatabase' | 'ArcEnabledSqlServer' | 'AmazonPostgreSql' | 'AzurePostgreSql' | 'Databricks' | 'SqlServerDatabase' | 'AzureSqlDatabaseManagedInstance' | 'AzureSqlDataWarehouse' | 'AzureMySql' | 'Hdfs' | 'TableauServer' | 'AzureStorage' | 'Teradata' | 'Oracle' | 'PostgreSql' | 'AmazonRedShift' | 'DatabricksHms' | 'SapS4Hana' | 'SapEcc' | 'Snowflake' | 'PowerBI' | 'Trident' | 'Dataverse' | 'DatabricksUnityCatalog' — The data source type.

## Other responses

- `default` — An error response received from the Scanning Service

## Changes

- **2026-07-13** (2018-12-01-preview) `1dc732ab31fc` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/azure/apis/purview-scanning/changes/datasources/:dataSourceName/scans/:scanName:run/post.md)

---

[API](https://skmtc.dev/azure/apis/purview-scanning.md) · [All operations](https://skmtc.dev/azure/apis/purview-scanning/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/purview-scanning/revisions/1dc732ab31fc/schema)
