Create a Sensor Profile
Use this API to create a new sensor profile.
Input ParametersInput Parameters
| Parameter | Mandatory/Optional | Data Type | Description |
|---|---|---|---|
| isVulnPropagation | Mandatory | string | Apply vulnerability propagation to the sensor profile. Valid values: true or false |
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. Valid values: Registry, General, CICD, Cluster, or RUNTIME. The default value is General. |
||
| 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. | ||
| runtimeSensor |
Mandatory | string | Appplicable only with RUNTIME profileType. Use it to send the Container Runtime Sensor (CRS) events to the Qualys Cloud Platform. Valid values: enable or disable If you mention 'disable', the CRS events data is not sent to the Qualys Cloud platform. Default value: enable |
||
| ignoreProcesses | Optional | string | Appplicable only with RUNTIME profileType. Specify the processes to be exluded. You can mention absolute path or binary name. Example: /usr/bin/cat (absolute path) or /cat (binary name) |
||
| filter | Optional | string | |||
| isVulnPropagation | Mandatory | string | Apply vulnerability propagation to the sensor profile. Valid values: true or false |
||
| 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:
|
||
|
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 - General Sensor Profile
curl -X 'POST' \
'<qualys_base_url>/csapi/v1.3/sensorProfile' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"profileName": "TestQA",
"profileType": "General",
"description": "test1_update",
"createdBy": "john_doe",
"updatedBy": "john_doe",
"config": {
"performanceManagement": {
"logSecurityLevel": "INFORMATION",
"maxNoOfArchivedLogFiles": 1,
"maxLogFileSize": 3
},
"vulnerabilityManagement": {
"containerScanningInterval": 0,
"imageExclusionRegexList": [
"string"
],
},
"globalScanningFlag": true,
"scanningPolicy": "DynamicWithStaticScanningAsFallback"
},
"performanceManagement": {
"maxNoOfArchivedLogFiles": 0,
"maxLogFileSize": 0,
"logSecurityLevel": "INFORMATION"
}
},
"associatedSensorIds": [
"096d96b4-c252-4c5b-835d-462109e5a8b0"
]
"isVulnPropagation": true,
"awsFargateVulnPropagationConfig": {}
}
}'
Request Body - General Sensor Profile
{
"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
}
API Request - Runtime Sensor Profile
curl -X 'POST' \
'<qualys_base_url>/csapi/v1.3/sensorProfile' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"profileName": "TestQA",
"profileType": "Runtime",
"description": "test1_update",
"createdBy": "john_doe",
"updatedBy": "john_doe",
"config": {
"performanceManagement": {
"logSecurityLevel": "INFORMATION",
"maxNoOfArchivedLogFiles": 1,
"maxLogFileSize": 3
},
"runtimeSensor": "enable",
"ignoreProcesses": [
"/usr/bin/cat"
]
},
"associatedSensorIds": [
"096d96b4-c252-4c5b-835d-462109e5a8b0"
]
}
Response
{
"profileUuid": "e130bba6-d8f4-47a0-ba34-194b74eaecdf"
}