Share via


Sql Vulnerability Assessment Scans - Get

Gets the scan details of a single scan record.

GET https://management.azure.com/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/{scanId}?workspaceId={workspaceId}&api-version=2023-02-01-preview

URI Parameters

Name In Required Type Description
resourceId
path True

string

The identifier of the resource.

scanId
path True

string

The scan Id. Type 'latest' to get the scan record for the latest scan.

api-version
query True

string

The api version.

workspaceId
query True

string

The workspace Id.

Responses

Name Type Description
200 OK

Scan

Returns the scan record details.

Other Status Codes

CloudError

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

Get scan details of a scan record
Get scan details of the latest scan record

Get scan details of a scan record

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/Scheduled-20200623?workspaceId=55555555-6666-7777-8888-999999999999&api-version=2023-02-01-preview

Sample response

{
  "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-20200623",
  "name": "Scheduled-20200623",
  "type": "Microsoft.Security/sqlVulnerabilityAssessments/scans",
  "properties": {
    "triggerType": "Recurring",
    "state": "Failed",
    "server": "server1",
    "database": "master",
    "sqlVersion": "15.0.2000",
    "startTime": "2020-06-23T06:49:00.6455136+00:00",
    "endTime": "2020-06-23T06:49:00.7236217Z",
    "highSeverityFailedRulesCount": 3,
    "mediumSeverityFailedRulesCount": 2,
    "lowSeverityFailedRulesCount": 1,
    "totalPassedRulesCount": 20,
    "totalFailedRulesCount": 6,
    "totalRulesCount": 26,
    "isBaselineApplied": false,
    "lastScanTime": "2020-06-23T06:49:00.6455136+00:00"
  }
}

Get scan details of the latest scan record

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/latest?workspaceId=55555555-6666-7777-8888-999999999999&api-version=2023-02-01-preview

Sample response

{
  "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-20200623",
  "name": "Scheduled-20200623",
  "type": "Microsoft.Security/sqlVulnerabilityAssessments/scans",
  "properties": {
    "triggerType": "Recurring",
    "state": "Failed",
    "server": "server1",
    "database": "master",
    "sqlVersion": "15.0.2000",
    "startTime": "2020-06-23T06:49:00.6455136+00:00",
    "endTime": "2020-06-23T06:49:00.7236217Z",
    "highSeverityFailedRulesCount": 3,
    "mediumSeverityFailedRulesCount": 2,
    "lowSeverityFailedRulesCount": 1,
    "totalPassedRulesCount": 20,
    "totalFailedRulesCount": 6,
    "totalRulesCount": 26,
    "isBaselineApplied": false,
    "lastScanTime": "2020-06-23T06:49:00.6455136+00:00"
  }
}

Definitions

Name Description
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.).

CloudErrorBody

The error detail.

ErrorAdditionalInfo

The resource management error additional info.

Scan

A vulnerability assessment scan record.

ScanProperties

A vulnerability assessment scan record properties.

ScanState

The scan status.

ScanTriggerType

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

ErrorAdditionalInfo[]

The error additional info.

error.code

string

The error code.

error.details

CloudErrorBody[]

The error details.

error.message

string

The error message.

error.target

string

The error target.

CloudErrorBody

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

CloudErrorBody[]

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

ScanProperties

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 (date-time)

Scan results are valid until end time (UTC).

highSeverityFailedRulesCount

integer (int32)

The number of failed rules with high severity.

isBaselineApplied

boolean

Baseline created for this database, and has one or more rules.

lastScanTime

string (date-time)

Last scan time.

lowSeverityFailedRulesCount

integer (int32)

The number of failed rules with low severity.

mediumSeverityFailedRulesCount

integer (int32)

The number of failed rules with medium severity.

server

string

The server name.

sqlVersion

string

The SQL version.

startTime

string (date-time)

The scan start time (UTC).

state

ScanState

The scan status.

totalFailedRulesCount

integer (int32)

The number of total failed rules.

totalPassedRulesCount

integer (int32)

The number of total passed rules.

totalRulesCount

integer (int32)

The number of total rules assessed.

triggerType

ScanTriggerType

The scan trigger type.

ScanState

The scan status.

Value Description
Failed

Failed

FailedToRun

FailedToRun

InProgress

InProgress

Passed

Passed

ScanTriggerType

The scan trigger type.

Value Description
OnDemand

OnDemand

Recurring

Recurring