Scan

Create an ad-hoc scan

Creates scan request and runs scan on nodes that match filter criteria if specified.

To use this endpoint, you must have one of the following roles: comply-admin comply-operator

post/v1/scan

Request

Request body

scan-type'desired' required

The type of scan to be tiggrered.

Example request

{
  "filters": {
    "environments": [
      "production"
    ],
    "hostnames": [
      "hostname.example"
    ],
    "node_groups": [
      "node group"
    ],
    "operating_systems": [
      "redhat 7",
      "redhat 8"
    ]
  },
  "scan-type": "desired"
}

Response

CreateDesiredScanResponse represents the response to a scan request.

created_atstring date-time required

The time at which the scan was created.

erroredinteger required

The number of nodes that errored in scan.

failedinteger required

The number of nodes that failed in scan.

finishedinteger required

The number of nodes that finished in scan.

finished_atstring date-time nullable

The time at which the scan finished.

idstring required

The ID of the scan.

namestring required

The name of the scan.

nodes_scannedinteger required

The number of nodes scanned.

status'started' | 'finished' | 'failed' required

The status of the inventory sync job.

typestring required

The type of scan.

Example response

{
  "created_at": "2023-09-25T13:57:16.743Z",
  "finished": 100,
  "finished_at": "2023-09-25T13:57:16.743Z",
  "id": "123",
  "name": "Scan 1",
  "nodes_scanned": 100,
  "status": "finished",
  "type": "desired"
}

Changes

No recorded changes to this operation across all 1 revision of this API.