Sql Vulnerability Assessment Scans - List
Gets a list of scan records.
GET https://management.azure.com/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans?workspaceId={workspaceId}&api-version=2023-02-01-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
resource
|
path | True |
string |
The identifier of the resource. |
api-version
|
query | True |
string |
The api version. |
workspace
|
query | True |
string |
The workspace Id. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Returns the list of scan records. |
|
Other Status Codes |
Error response describing why the operation failed. |
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
List scan details
Sample request
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans?workspaceId=55555555-6666-7777-8888-999999999999&api-version=2023-02-01-preview
Sample response
{
"value": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/Scheduled-20200225",
"name": "Scheduled-20200225",
"type": "Microsoft.Security/sqlVulnerabilityAssessments/scans",
"properties": {
"triggerType": "Recurring",
"state": "Failed",
"server": "server1",
"database": "master",
"sqlVersion": "15.0.2000",
"startTime": "2020-02-25T11:34:29.1399864Z",
"endTime": "2020-02-25T11:38:07.8606151Z",
"highSeverityFailedRulesCount": 3,
"mediumSeverityFailedRulesCount": 2,
"lowSeverityFailedRulesCount": 1,
"totalPassedRulesCount": 20,
"totalFailedRulesCount": 6,
"totalRulesCount": 26,
"isBaselineApplied": false,
"lastScanTime": "2020-06-23T06:49:00.6455136+00:00"
}
},
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Rg/providers/Microsoft.HybridCompute/machines/MyMachine/sqlServers/server1/databases/master/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/scan_20200226_113429",
"name": "scan_20200226_113429",
"type": "Microsoft.Security/sqlVulnerabilityAssessments/scans",
"properties": {
"triggerType": "OnDemand",
"state": "Passed",
"server": "server1",
"database": "master",
"sqlVersion": "15.0.2000",
"startTime": "2020-02-26T11:34:29.1399864Z",
"endTime": "2020-02-26T11:38:07.8606151Z",
"highSeverityFailedRulesCount": 0,
"mediumSeverityFailedRulesCount": 0,
"lowSeverityFailedRulesCount": 0,
"totalPassedRulesCount": 26,
"totalFailedRulesCount": 0,
"totalRulesCount": 26,
"isBaselineApplied": true,
"lastScanTime": "2020-06-23T06:49:00.6455136+00:00"
}
}
]
}
Definitions
Name | Description |
---|---|
Cloud |
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). |
Cloud |
The error detail. |
Error |
The resource management error additional info. |
Scan |
A vulnerability assessment scan record. |
Scan |
A vulnerability assessment scan record properties. |
Scans |
A list of vulnerability assessment scan records. |
Scan |
The scan status. |
Scan |
The scan trigger type. |
CloudError
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
Name | Type | Description |
---|---|---|
error.additionalInfo |
The error additional info. |
|
error.code |
string |
The error code. |
error.details |
The error details. |
|
error.message |
string |
The error message. |
error.target |
string |
The error target. |
CloudErrorBody
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
Scan
A vulnerability assessment scan record.
Name | Type | Description |
---|---|---|
id |
string |
Resource Id |
name |
string |
Resource name |
properties |
A vulnerability assessment scan record properties. |
|
type |
string |
Resource type |
ScanProperties
A vulnerability assessment scan record properties.
Name | Type | Description |
---|---|---|
database |
string |
The database name. |
endTime |
string |
Scan results are valid until end time (UTC). |
highSeverityFailedRulesCount |
integer |
The number of failed rules with high severity. |
isBaselineApplied |
boolean |
Baseline created for this database, and has one or more rules. |
lastScanTime |
string |
Last scan time. |
lowSeverityFailedRulesCount |
integer |
The number of failed rules with low severity. |
mediumSeverityFailedRulesCount |
integer |
The number of failed rules with medium severity. |
server |
string |
The server name. |
sqlVersion |
string |
The SQL version. |
startTime |
string |
The scan start time (UTC). |
state |
The scan status. |
|
totalFailedRulesCount |
integer |
The number of total failed rules. |
totalPassedRulesCount |
integer |
The number of total passed rules. |
totalRulesCount |
integer |
The number of total rules assessed. |
triggerType |
The scan trigger type. |
Scans
A list of vulnerability assessment scan records.
Name | Type | Description |
---|---|---|
value |
Scan[] |
List of vulnerability assessment scan records. |
ScanState
The scan status.
Name | Type | Description |
---|---|---|
Failed |
string |
Failed |
FailedToRun |
string |
FailedToRun |
InProgress |
string |
InProgress |
Passed |
string |
Passed |
ScanTriggerType
The scan trigger type.
Name | Type | Description |
---|---|---|
OnDemand |
string |
OnDemand |
Recurring |
string |
Recurring |