Scan Result - Run Scan

Runs the scan

POST {endpoint}/scan/datasources/{dataSourceName}/scans/{scanName}:run?runId={runId}&api-version=2023-09-01
POST {endpoint}/scan/datasources/{dataSourceName}/scans/{scanName}:run?runId={runId}&scanLevel={scanLevel}&api-version=2023-09-01

URI Parameters

Name In Required Type Description
dataSourceName
path True

string

The dataSource name.

Regex pattern: ^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$

endpoint
path True

string

url

The scanning endpoint of your purview account. Example: https://{accountName}.purview.azure.com.

scanName
path True

string

The scan name.

Regex pattern: ^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$

api-version
query True

string

The api version to use.

runId
query True

string

The scan run id.

Regex pattern: ^[{]?[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$

scanLevel
query

ScanLevelType

The scan level.

Responses

Name Type Description
202 Accepted

ScanResultWithIngestion

Success

Headers

Operation-Location: string

Other Status Codes

ErrorResponseModel

An error response received from the Scanning Service

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

ScanResult_RunScan

Sample Request

POST {endpoint}/scan/datasources/testDataSourceName/scans/scan1:run?runId=138301e4-f4f9-4ab5-b734-bac446b236e7&scanLevel=Full&api-version=2023-09-01

Sample Response

x-ms-request-id: 00000000-0000-0000-0000-00000000000
Operation-Location: https://exampleaccountname.purview.azure.com/scan/datasources/myDataSource/scans/myScanName/runs/138301e4-f4f9-4ab5-b734-bac446b236e7
{
  "parentId": null,
  "id": "7bcde71f-4a4e-4e01-9226-c99d15fa0f30",
  "ingestionJobId": "7bcde71f-4a4e-4e01-9226-c99d15fa0f30",
  "resourceId": "/subscriptions/4ec8b4ae-b823-43c5-90d9-7ec52a84c0c5/resourceGroups/yongyu_scan_test/providers/Microsoft.Sql/servers/yongyu-sqlservers-0724",
  "status": "Accepted",
  "diagnostics": {
    "notifications": [],
    "exceptionCountMap": {}
  },
  "startTime": "2023-07-31T01:40:22.6764952Z",
  "endTime": "2023-07-31T01:41:48.6834379Z",
  "scanRulesetVersion": 4,
  "scanRulesetType": "System",
  "scanLevelType": "Incremental",
  "errorMessage": null,
  "error": null,
  "runType": "Manual",
  "dataSourceType": "AzureSqlDatabase",
  "discoveryExecutionDetails": {
    "discoveryStartTime": "2023-07-31T01:41:14Z",
    "discoveryEndTime": "2023-07-31T01:41:14Z",
    "status": "Succeeded",
    "statistics": {
      "assets": {
        "discovered": 3,
        "classified": 0,
        "failed": 0
      }
    },
    "isErrorLogAvailable": false
  },
  "ingestionExecutionDetails": {
    "ingestionStartTime": "2023-07-31T01:41:10.8601338Z",
    "ingestionEndTime": "2023-07-31T01:41:48.6834379Z",
    "status": "Succeeded",
    "statistics": {
      "assets": {
        "succeeded": 2,
        "failed": 0,
        "processing": 0
      },
      "relationships": {
        "succeeded": 0,
        "failed": 0,
        "processing": 0
      }
    },
    "estimatedTimeRemainingInSeconds": 12,
    "isErrorLogAvailable": false
  }
}

Definitions

Name Description
DataSourceType

The data source type.

DiscoveryExecutionDetails

The discovery execution details.

ErrorModel

The error model.

ErrorResponseModel

The error response model.

IngestionExecutionDetails

The ingestion execution details.

IngestionPhaseStatus

The ingestion status.

Notification

The notification model.

ScanDiagnostics

The scan diagnostics.

ScanLevelType

Scan level type.

ScanResultWithIngestion

The scan result with ingestion.

ScanRulesetType

The scan ruleset type.

ScanRunStatus

The scan result status.

ScanStatus

The discovery status.

DataSourceType

The data source type.

Name Type Description
AdlsGen1

string

AdlsGen2

string

AmazonAccount

string

AmazonPostgreSql

string

AmazonRedShift

string

AmazonS3

string

AmazonSql

string

ArcEnabledSqlServer

string

AzureCosmosDb

string

AzureDataExplorer

string

AzureFileService

string

AzureMySql

string

AzurePostgreSql

string

AzureResourceGroup

string

AzureSqlDataWarehouse

string

AzureSqlDatabase

string

AzureSqlDatabaseManagedInstance

string

AzureStorage

string

AzureSubscription

string

AzureSynapse

string

AzureSynapseWorkspace

string

Databricks

string

DatabricksHms

string

DatabricksUnityCatalog

string

Dataverse

string

Fabric

string

Hdfs

string

None

string

Oracle

string

PostgreSql

string

PowerBI

string

SapEcc

string

SapS4Hana

string

Snowflake

string

SqlServerDatabase

string

TableauServer

string

Teradata

string

Trident

string

DiscoveryExecutionDetails

The discovery execution details.

Name Type Description
discoveryEndTime

string

The discovery end time.

discoveryStartTime

string

The discovery start time.

isErrorLogAvailable

boolean

Indicates whether the error log is available.

statistics

The discovery statistics.

status

ScanStatus

The discovery status.

ErrorModel

The error model.

Name Type Description
code

string

A unique error code that identifies the specific error.

details

ErrorModel[]

An array of nested ErrorModel objects that provides additional error details.

message

string

A human-readable error message that provides more details about the error.

target

string

The specific component that the error is associated with.

ErrorResponseModel

The error response model.

Name Type Description
error

ErrorModel

The error model.

IngestionExecutionDetails

The ingestion execution details.

Name Type Description
estimatedTimeRemainingInSeconds

integer

The estimated time remaining in seconds.

ingestionEndTime

string

The ingestion end time.

ingestionStartTime

string

The ingestion start time.

isErrorLogAvailable

boolean

Indicates whether the error log is available.

lastUpdatedAt

string

The last updated time.

statistics

The ingestion statistics.

status

IngestionPhaseStatus

The ingestion status.

IngestionPhaseStatus

The ingestion status.

Name Type Description
Canceled

string

Canceling

string

Failed

string

InProgress

string

None

string

PartialSucceeded

string

Queued

string

SourceUnknown

string

Succeeded

string

Notification

The notification model.

Name Type Description
code

integer

Notification code.

message

string

Notification message.

ScanDiagnostics

The scan diagnostics.

Name Type Description
exceptionCountMap

object

Exception count map.

notifications

Notification[]

Notifications.

ScanLevelType

Scan level type.

Name Type Description
Full

string

the scan is full scan

Incremental

string

the scan is incremental scan

ScanResultWithIngestion

The scan result with ingestion.

Name Type Description
dataSourceType

DataSourceType

The data source type.

diagnostics

ScanDiagnostics

The scan diagnostics.

discoveryExecutionDetails

DiscoveryExecutionDetails

The discovery execution details.

endTime

string

The scan end time.

error

ErrorModel

The error.

errorMessage

string

The error message.

id

string

The scan result identifier.

ingestionExecutionDetails

IngestionExecutionDetails

The ingestion execution details.

ingestionJobId

string

The ingestion job identifier.

parentId

string

The parent scan result identifier.

resourceId

string

The resource identifier.

runType

string

The run type.

scanLevelType

ScanLevelType

Scan level type.

scanRulesetType

ScanRulesetType

The scan ruleset type.

scanRulesetVersion

integer

The scan ruleset version.

startTime

string

The scan start time.

status

ScanRunStatus

The scan result status.

ScanRulesetType

The scan ruleset type.

Name Type Description
Custom

string

the scan ruleset type is custom

System

string

the scan ruleset type is system default

ScanRunStatus

The scan result status.

Name Type Description
Accepted

string

the scan is accepted

Canceled

string

the scan is canceled

Failed

string

the scan is failed

InProgress

string

the scan is InProgress

Succeeded

string

the scan is succeeded

TransientFailure

string

the scan is in transient failure

ScanStatus

The discovery status.

Name Type Description
Cancelled

string

CompleteWithWarning

string

CompletedWithExceptions

string

Delayed

string

Failed

string

Queued

string

Running

string

Succeeded

string

Throttled

string