Highlighted
securicon Absent Member.
Absent Member.
9222 views

How to get the Scan ID for a started scan using Webinpect API

Jump to solution

Greetings,

I started a scan using the API in Webinspect.  I would like to check the status of the scan using only the command line.  How do I find it?  Is there supposed to be some sort of output once the scan has started?

Labels (1)
0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

Re: How to get the Scan ID for a started scan using Webinpect API

Jump to solution

The default URL for the running WebInspect API is http://localhost:8083/webinspect/api   With the 16.10 release (April 2016), the detailed documentation and samples were (mostly) removed from the WebInspect Help (*.CHM) and are accessible only at that URL.  There is no live, on-screen output of the scan details, but there are some commands you may issue periodically to check on it.

Specific for identifying the ScanID:

Samples:

curl http://localhost:8083/webinspect/scanner/scans

[{"ID":"351c0538-5887-442f-87df-aea07a6b2ced","Name":"MultipleHostWorkflowViaAPI","StartTime":"2016-01-13T13:25:32","Status":"Complete"},{"ID":"9e48a1e1-6f48-4564-901a-6e8c6644e3ac","Name":"LegacyrawlOnlyviaPI","StartTime":"2016-01-13T14:28:09","Status":"Complete"}{"ID":"fa5cfd19-4122-41c6-bcdc-27bf8d61f2e7","Name":"LegacyrawlOnlyviaPI","StartTime":"2016-01-13T14:30:35","Status":"Complete"},{"ID":"4d868b68-7d03-4418-a960-9571d3b3907a","Name":"LegacyrawlOnlyviaAPI","StartTime":"2016-01-13T14:39:17","Status":"Complete"}]

curl http://localhost:8083/webinspect/scanner/scans?Status=Complete

[{"ID":"351c0538-5887-442f-87df-aea07a6b2ced","Name":"MultipleHostWorkflowViaAPI","StartTime":"2016-01-13T13:25:32","Status":"Complete"},{"ID":"9e48a1e1-6f48-4564-901a-6e8c6644e3ac","Name":"LegacyrawlOnlyviaPI","StartTime":"2016-01-13T14:28:09","Status":"Complete"},

{"ID":"fa5cfd19-4122-41c6-bcdc-27bf8d61f2e7","Name":"LegacyrawlOnlyviaPI","StartTime":"2016-01-13T14:30:35","Status":"Complete"},{"ID":"4d868b68-7d03-4418-a960-9571d3b3907a","Name":"LegacyrawlOnlyviaAPI","StartTime":"2016-01-13T14:39:17","Status":"Complete"}]

curl http://localhost:8083/webinspect/scanner/scans?StartsAfter=2016-01-13T14:30:00

[{"ID":"fa5cfd19-4122-41c6-bcdc-27bf8d61f2e7","Name":"LegacyrawlOnlyviaPI","StartTime":"2016-01-13T14:30:35","Status":"Complete"},{"ID":"4d868b68-7d03-4418-a960-9571d3b3907a","Name":"LegacyrawlOnlyviaAPI","StartTime":"2016-01-13T14:39:17","Status":"Complete"}]


-- Habeas Data
Micro Focus Fortify Customers-Only Forums – https://community.softwaregrp.com/t5/Fortify/ct-p/fortify
0 Likes
3 Replies
Micro Focus Expert
Micro Focus Expert

Re: How to get the Scan ID for a started scan using Webinpect API

Jump to solution

The default URL for the running WebInspect API is http://localhost:8083/webinspect/api   With the 16.10 release (April 2016), the detailed documentation and samples were (mostly) removed from the WebInspect Help (*.CHM) and are accessible only at that URL.  There is no live, on-screen output of the scan details, but there are some commands you may issue periodically to check on it.

Specific for identifying the ScanID:

Samples:

curl http://localhost:8083/webinspect/scanner/scans

[{"ID":"351c0538-5887-442f-87df-aea07a6b2ced","Name":"MultipleHostWorkflowViaAPI","StartTime":"2016-01-13T13:25:32","Status":"Complete"},{"ID":"9e48a1e1-6f48-4564-901a-6e8c6644e3ac","Name":"LegacyrawlOnlyviaPI","StartTime":"2016-01-13T14:28:09","Status":"Complete"}{"ID":"fa5cfd19-4122-41c6-bcdc-27bf8d61f2e7","Name":"LegacyrawlOnlyviaPI","StartTime":"2016-01-13T14:30:35","Status":"Complete"},{"ID":"4d868b68-7d03-4418-a960-9571d3b3907a","Name":"LegacyrawlOnlyviaAPI","StartTime":"2016-01-13T14:39:17","Status":"Complete"}]

curl http://localhost:8083/webinspect/scanner/scans?Status=Complete

[{"ID":"351c0538-5887-442f-87df-aea07a6b2ced","Name":"MultipleHostWorkflowViaAPI","StartTime":"2016-01-13T13:25:32","Status":"Complete"},{"ID":"9e48a1e1-6f48-4564-901a-6e8c6644e3ac","Name":"LegacyrawlOnlyviaPI","StartTime":"2016-01-13T14:28:09","Status":"Complete"},

{"ID":"fa5cfd19-4122-41c6-bcdc-27bf8d61f2e7","Name":"LegacyrawlOnlyviaPI","StartTime":"2016-01-13T14:30:35","Status":"Complete"},{"ID":"4d868b68-7d03-4418-a960-9571d3b3907a","Name":"LegacyrawlOnlyviaAPI","StartTime":"2016-01-13T14:39:17","Status":"Complete"}]

curl http://localhost:8083/webinspect/scanner/scans?StartsAfter=2016-01-13T14:30:00

[{"ID":"fa5cfd19-4122-41c6-bcdc-27bf8d61f2e7","Name":"LegacyrawlOnlyviaPI","StartTime":"2016-01-13T14:30:35","Status":"Complete"},{"ID":"4d868b68-7d03-4418-a960-9571d3b3907a","Name":"LegacyrawlOnlyviaAPI","StartTime":"2016-01-13T14:39:17","Status":"Complete"}]


-- Habeas Data
Micro Focus Fortify Customers-Only Forums – https://community.softwaregrp.com/t5/Fortify/ct-p/fortify
0 Likes
securicon Absent Member.
Absent Member.

Re: How to get the Scan ID for a started scan using Webinpect API

Jump to solution

Yea I go to the help section quite often.  In fact I keep it up.  For some reason I thought the get all scans was for scans already completed not ones in progress.

TY

0 Likes
richard.bri.smi Absent Member.
Absent Member.

Re: How to get the Scan ID for a started scan using Webinpect API

Jump to solution

The GUID for the scan you started should be returned in the body of the response to the scan start request.  However, this response and the contained GUID will not be returned until after the scan has started.

0 Likes
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.