I formed the below mentioned json request payload for creating a scan in purview for an Azure SQL datasource. I am able to create one under domain , but ends up with 400 bad request when tried giving a collection name. No idea on what I am missing.
scan_body = {
"kind": "AzureSqlDatabaseMsi",
"properties": {
"serverEndpoint": "mockserver.database.windows.net",
"databaseName": "mock",
"scanRulesetName": "AzureSqlDatabase",
"collection": {
"referenceName": "collectionname",#Here with domain ,it works.
"type": "CollectionReference"
},
"scanRulesetType": "System"
}
}
I created the above json payload based on the MS docs.
https://learn.microsoft.com/en-us/rest/api/purview/scanningdataplane/scans/create-or-replace?view=rest-purview-scanningdataplane-2023-09-01&tabs=HTTP#request-body
Suggestions please.