1. API Operations
  2. Get scans

Deprecated

You are viewing a deprecated version of our API Reference. Please visit the up-to-date documentation.

Get scans

This operation returns the list of the scans performed by the current user, together with their status.

Request

Parameters
Parameter
op
Type
string
required
true

Get the list of scans. The value is "get_scans".

Parameter
limit
Type
integer
required
true

Limit the number of returned scans.

Parameter
workspace_id
Type
integer

Only show scans from this workspace.

Parameter
target_id
Type
integer

Only show scans from this target.

{
  "op": "get_scans",
  "limit": 4,
  "workspace_id": 5425246
}

Response

Attributes
Attribute
op_status
Type
string

The status of the operation. The value can "success" or "fail".

Attribute
scans
Type
array

The list of scans for the current user. Returned in case of a successful operation.

Attribute
error
Type
string

Error message. Returned in case of a failed operation.

{
  "op_status": "success",
  "scans": [
    {
      "scan_id": 456234,
      "scan_status": "running"
    },
    {
      "scan_id": 456235,
      "scan_status": "finished"
    },
    {
      "scan_id": 456236,
      "scan_status": "waiting"
    },
    {
      "scan_id": 456237,
      "scan_status": "stopped"
    }
  ]
}