Create a Sensor Profile

Use this API to create a new sensor profile.

POST/csapi/v1.3/sensorProfile

Request Body ParametersRequest Body Parameters

Parameter

Mandatory/Optional

Data Type

Description

profileName

Mandatory

string

Specify a title for your sensor profile.

description

Optional

string

Specify a description for your sensor profile.

profileType

Mandatory

string

Specify the type of sensor profile.

associatedRegistryIds

Mandatory

string

Add one or more registries to the registry sensor profile by specifying the registry IDs.

These are the registries that will be scanned by the sensors in the same profile.

associatedSensorIds

Mandatory

string

Add one or more sensors to this profile by specifying the sensor IDs.

filter

Optional

string

 

config

 

 

weeklyBlackoutWindowSchedules

startTime

Mandatory

string

Configure a window of time in which the sensors in your profile will not operate.

endTime

Mandatory

string

repeatOnDays

Mandatory

string

vulnerabilityManagement

containerScanningInterval

Mandatory

integer

Select a scanning interval for how often sensors should rescan containers.

Valid interval values are: 12, 24, and 48.

An interval of 48 hours is recommended for optimum performance.

imageExclusionRegexList

Optional

string

Create an image exclusion list using regular expressions.

Images matching the exclusion list are not scanned by the sensors in this profile.

globalScanningFlag

Mandatory

Boolean

 Turn on or off all the scan operations.

scanningPolicy

Mandatory

string

 Specify one of the following policies:

  • DynamicWithStaticScanningAsFallback: Performs dynamic scanning

  • Dynamic: Performs static scanning as a fallback to dynamic scanning for images without a shell.

performanceManagement

maxNoOfArchivedLogFiles

Mandatory

integer

Specify the maximum number of log files to archive. The remaining files will be purged.

maxLogFileSize

Mandatory

integer

Specify the maximum file size for each log file. After the file size is achieved for a file, a new file is created.

logSecurityLevel

Mandatory

string

Specifies the type of log data to be logged.

SampleSample

API request

    curl -X PUT
"<qualys_base_url>/csapi/v1.3/sensorProfile/6963d471-7598-4d4d-b95c-e540c75745b2" 
-H "accept: application/json"
-H "Content-Type: application/json"
-H "Authorization: Bearer <token>"

Request Body

    {
    "profileId": "6963d471-7598-4d4d-b95c-e540c75745b2",
    "profileName": "General-test2",
    "profileType": "General",
    "description": "",
    "createdBy": "test_zp53",
    "created": "1669108423070",
    "updatedBy": null,
    "updated": "1669111816485",
    "config": {
        "weeklyInactiveWindowSchedules": [
            {
                "repeatOnDays": [
                    "SUNDAY"
                ],
                "allDayToggle": false,
                "startTime": "01:15",
                "endTime": "03:00"
            }
        ],
        "vulnerabilityManagement": {
            "globalScanningFlag": true,
            "scanningPolicy": "DynamicWithStaticScanningAsFallback",
            "containerScanningInterval": 48,
            "imageExclusionRegexList": []
        },
        "performanceManagement": {
            "maxNoOfArchivedLogFiles": 5,
            "maxLogFileSize": 10,
            "logSecurityLevel": "INFORMATION"
        }
    },
    "associatedSensorIds": [
        "f1edef37-8d72-4f5d-87ed-9d6da981cffe"
    ],
    "associatedRegistryIds": null
}
    

Response

    {
    "profileUuid": "6963d471-7598-4d4d-b95c-e540c75745b2"
}