Scan

Create an ad-hoc custom scan

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

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

post/v1/custom-scan

Request

Request body

benchmark_idinteger required

The benchmark for associated profile.

custom_profile_idinteger nullable

The custom profile ID to be used for the scan.

profile_idinteger nullable

The profile ID to be used for the scan.

scan_type'custom' required

ScanType is the type of scan to run.

Example request

{
  "benchmark_id": 123,
  "custom_profile_id": 123,
  "profile_id": 123,
  "scan_filters": {
    "environments": [
      "production"
    ],
    "hostnames": [
      "hostname.example"
    ],
    "node_groups": [
      "node group"
    ],
    "operating_systems": [
      "redhat 7",
      "redhat 8"
    ]
  },
  "scan_type": "custom"
}

Response

CreateCustomScanResponse 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.