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 |
|---|---|---|---|---|
|
data
|
path | True |
string minLength: 3maxLength: 63 pattern: ^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$ |
The dataSource name. |
|
endpoint
|
path | True |
string (url) |
The scanning endpoint of your purview account. Example: https://{accountName}.purview.azure.com. |
|
scan
|
path | True |
string minLength: 3maxLength: 63 pattern: ^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$ |
The scan name. |
|
api-version
|
query | True |
string |
The api version to use. |
|
run
|
query | True |
string minLength: 36maxLength: 36 pattern: ^[{]?[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$ |
The scan run id. |
|
scan
|
query |
The scan level. |
Responses
| Name | Type | Description |
|---|---|---|
| 202 Accepted |
Success Headers Operation-Location: string |
|
| Other Status Codes |
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 |
|---|---|
|
Data |
The data source type. |
|
Discovery |
The discovery execution details. |
|
Error |
The error model. |
|
Error |
The error response model. |
|
Ingestion |
The ingestion execution details. |
|
Ingestion |
The ingestion status. |
| Notification |
The notification model. |
|
Scan |
The scan diagnostics. |
|
Scan |
Scan level type. |
|
Scan |
The scan result with ingestion. |
|
Scan |
The scan ruleset type. |
|
Scan |
The scan result status. |
|
Scan |
The discovery status. |
DataSourceType
The data source type.
| Value | Description |
|---|---|
| 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 |
DiscoveryExecutionDetails
The discovery execution details.
| Name | Type | Description |
|---|---|---|
| discoveryEndTime |
string (date-time) |
The discovery end time. |
| discoveryStartTime |
string (date-time) |
The discovery start time. |
| isErrorLogAvailable |
boolean |
Indicates whether the error log is available. |
| statistics |
|
The discovery statistics. |
| status |
The discovery status. |
ErrorModel
The error model.
| Name | Type | Description |
|---|---|---|
| code |
string |
A unique error code that identifies the specific error. |
| details |
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 |
The error model. |
IngestionExecutionDetails
The ingestion execution details.
| Name | Type | Description |
|---|---|---|
| estimatedTimeRemainingInSeconds |
integer (int64) |
The estimated time remaining in seconds. |
| ingestionEndTime |
string (date-time) |
The ingestion end time. |
| ingestionStartTime |
string (date-time) |
The ingestion start time. |
| isErrorLogAvailable |
boolean |
Indicates whether the error log is available. |
| lastUpdatedAt |
string (date-time) |
The last updated time. |
| statistics |
|
The ingestion statistics. |
| status |
The ingestion status. |
IngestionPhaseStatus
The ingestion status.
| Value | Description |
|---|---|
| None | |
| Succeeded | |
| Queued | |
| InProgress | |
| SourceUnknown | |
| PartialSucceeded | |
| Failed | |
| Canceled | |
| Canceling |
Notification
The notification model.
| Name | Type | Description |
|---|---|---|
| code |
integer (int32) |
Notification code. |
| message |
string |
Notification message. |
ScanDiagnostics
The scan diagnostics.
| Name | Type | Description |
|---|---|---|
| exceptionCountMap |
object |
Exception count map. |
| notifications |
Notifications. |
ScanLevelType
Scan level type.
| Value | Description |
|---|---|
| Full |
the scan is full scan |
| Incremental |
the scan is incremental scan |
ScanResultWithIngestion
The scan result with ingestion.
| Name | Type | Description |
|---|---|---|
| dataSourceType |
The data source type. |
|
| diagnostics |
The scan diagnostics. |
|
| discoveryExecutionDetails |
The discovery execution details. |
|
| endTime |
string (date-time) |
The scan end time. |
| error |
The error. |
|
| errorMessage |
string |
The error message. |
| id |
string |
The scan result identifier. |
| 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 |
Scan level type. |
|
| scanRulesetType |
The scan ruleset type. |
|
| scanRulesetVersion |
integer (int32) |
The scan ruleset version. |
| startTime |
string (date-time) |
The scan start time. |
| status |
The scan result status. |
ScanRulesetType
The scan ruleset type.
| Value | Description |
|---|---|
| Custom |
the scan ruleset type is custom |
| System |
the scan ruleset type is system default |
ScanRunStatus
The scan result status.
| Value | Description |
|---|---|
| Accepted |
the scan is accepted |
| InProgress |
the scan is InProgress |
| TransientFailure |
the scan is in transient failure |
| Succeeded |
the scan is succeeded |
| Failed |
the scan is failed |
| Canceled |
the scan is canceled |
ScanStatus
The discovery status.
| Value | Description |
|---|---|
| Queued | |
| Running | |
| Succeeded | |
| Failed | |
| Cancelled | |
| Delayed | |
| Throttled | |
| CompletedWithExceptions | |
| CompleteWithWarning |