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 |
The dataSource name. Regex pattern: |
endpoint
|
path | True |
string url |
The scanning endpoint of your purview account. Example: https://{accountName}.purview.azure.com. |
scan
|
path | True |
string |
The scan name. Regex pattern: |
api-version
|
query | True |
string |
The api version to use. |
run
|
query | True |
string |
The scan run id. Regex pattern: |
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.
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 |
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 |
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 |
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 |
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 |
The data source type. |
|
diagnostics |
The scan diagnostics. |
|
discoveryExecutionDetails |
The discovery execution details. |
|
endTime |
string |
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 |
The scan ruleset version. |
startTime |
string |
The scan start time. |
status |
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 |