Cadet 1st Class
Cadet 1st Class

Running a scan from the REST API


I'm having an issue when I try to run a scan from the REST API in WebInspect (aka WI) 17.10: 

The command is 

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \ 
   "settingsName": "Default" \ 
 }' 'http://localhost:8083/webinspect/scanner/scans'

Where settingName is the name of an existing setting.

And WI is returning: 

  "Message": "An error has occurred.",
  "ExceptionMessage": "Cannot open database \"webinspect\" requested by the login. The login failed.\r\nLogin failed for user 'NT AUTHORITY\\SYSTEM'.",
  "ExceptionType": "System.Data.SqlClient.SqlException",
  "StackTrace": ""

in an HTTP error 500.

Inside the WI GUI I can run the very same scan without any issue. 

Did someone have a clue on what's going on ?


Labels (1)
2 Replies
Admiral Admiral

Try changing the WebInspect API service (start->services.msc) to run as the same user you are logged into the machine with when running WebInspect via the GUI.  It is likely running now as Local System and it looks as though that user "NT AUTHORITY\\SYSTEM" does not have access to the database.

Cadet 1st Class
Cadet 1st Class

That did the trick.

Many thks.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.