Scan Server REST Interface
Server Info
Obtain general server info: Version number, runtime, memory usage.
- Method
- GET
- URL
- /server/info
- Result
- XML with server info
Submit Scan
Submit a new scan for execution.
- Method
- POST
- URL
- /scan/{name-of-new-scan} to queue or
/scan/{name-of-new-scan}?queue=false for immediate execution.
- Message Body
- XML-formatted scan
- Result
-
- On success, XML with scan ID, example:
<id>42</id>
- On error, XML with error message and trace, example:
<error><message>Failed to submit</message><trace>java.lang.Exception at ..</trace></error>
Submit a scan for simulation.
- Method
- POST
- URL
- /simulate
- Message Body
- XML-formatted scan
- Result
-
- On success, XML with scan ID, example:
<id>42</id>
- On error, XML with error message and trace, example:
<error><message>Failed to submit</message><trace>java.lang.Exception at ..</trace></error>
List Scans
List all scans on the server.
- Method
- GET
- URL
- /scans
- Result
- XML with scans
Get Scan Info
Get information for a specific scan.
- Method
- GET
- URL
- /scan/{id}
- Result
- XML with scan info
Get commands of a specific scan.
- Method
- GET
- URL
- /scan/{id}/commands
- Result
- XML with scan commands
Get devices used by a specific scan.
Returns default devices for scan ID -1: /scan/-1/devices.
- Method
- GET
- URL
- /scan/{id}/devices
- Result
- XML with device infos
Get logged data of a specific scan.
- Method
- GET
- URL
- /scan/{id}/data
- Result
- XML with scan data
Get last sample's serial for logged data of a specific scan.
- Method
- GET
- URL
- /scan/{id}/last_serial
- Result
- XML with last sample's serial, example:
<serial>142</serial>
Put Scan into different States
Pause a running scan.
- Method
- PUT
- URL
- /scan/{id}/pause
- Result
- HTTP OK or error
Resume a paused scan.
- Method
- PUT
- URL
- /scan/{id}/resume
- Result
- HTTP OK or error
Abort a running or paused scan.
- Method
- PUT
- URL
- /scan/{id}/abort
- Result
- HTTP OK or error
The above pause, resume, abort commands can be used with scan ID -1 to address all scans.
Delete Scans
Delete a finished Scan.
- Method
- DELETE
- URL
- /scan/{id}
- Result
- HTTP OK or error
Delete all finished Scan
- Method
- DELETE
- URL
- /scans/completed
- Result
- HTTP OK or error