Using this API, you can get a list of more than ten thousand assets enabled for your Patch Management subscription.
Parameter |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
searchAfter |
Optional |
string |
Specify the searchAfter parameter to search for results after that. This is a combination of an asset_name and asset_id separated by a comma. |
sortOrder |
Optional |
string |
Specify the order to sort asset_name and asset_id. |
pageSize |
Optional |
string |
Specify the number of rows to be displayed per page. |
platform |
Optional |
string |
Specify the platform type. Example: Windows and Linux |
API request
curl -X 'POST' \
'<qualys_base_url>/pm/v1/assets?sortOrder=ASC&platform=Windows' \
-H 'accept: application/json' \
-H 'searchAfter: PMUI_AUTOMATION_ASSET_WINDOWS_EXCLUSION,ecd86069-c015-4b0e-9488-8ef14a99026d' \
-H 'Authorization: Bearer <Bearer_Token>' \
-H 'Content-Type: application/json' \
-d '{
"query": "installedPatchCount>1",
"havingQuery": "downloadMethod:AcquireFromVendor and rebootRequired:true",
"attributes": "name,id,platform"}'
Response
[
{
"platform": "Windows",
"name": "PMUI_AUTOMATION_MOCK_ASSET_WINDOWS_1",
"id": "e6eaf17a-3069-4c1e-a5dc-df0049cb9f60"
},
...
{
"platform": "Windows",
"name": "PMUI_AUTOMATION_MOCK_ASSET_WINDOWS_5",
"id": "f87461bc-16ad-4621-97ef-c496676815da"
}
]
API Request
curl -X 'POST' \
'<qualys_base_url>/pm/v1/assets?sortOrder=ASC&platform=Linux' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <<jwt token>>’\
-H 'Content-Type: application/json' \
-d '{"query": "installedPatchCount>1",
"havingQuery": "downloadMethod:AcquireFromVendor and rebootRequired:true",
"attributes": "name,id,platform"}'
API Body
[{
"interfaces": [
{
"ipv6Address": "fe80:0:0:0:1dcc:3a12:56d8:73f"
},
{
"address": "10.0.203.124"
}
],
"scanStatus": "Scanned",
"operatingSystem": "Red Hat Enterprise Linux Server 9.2",
"version": "9.2",
"platform": "Linux",
"tags": [
"236bdc33-a0c7-4baf-8ce3-fc89ad5302ce",
"6d1cd4b6-378d-4c95-ad47-f459882e7c35",
"7f14573f-b7b7-4393-8457-d1a10f058a5a",
"1e7aaeae-62fa-4e6c-82c5-99038fc8203b",
"ce1e4d6a-7119-4177-9bcc-0b31c39aad1b"
],
"installedPatchCount": 1,
"missingPatches": [
{
"id": "fb9f585c-5773-30b6-8922-274e47a80ebc"
},
{
"id": "cdbdb949-5153-3511-9f54-eced744470ec"
},
{
"id": "8f378f67-98d3-30a3-bcff-ff6eda730f46"
},
{
"id": "5b4c8d77-f012-3494-80e2-fa4fb5c2bcd4"
},
{
"id": "87c17496-7b00-3652-99b9-ef28cc4adf0d"
}
],
"osIdentifier": "RHEL9",
"missingPatchCount": 5,
"activatedModules": [
"PM"
],
"lastLoggedOnUser": "",
"scanDateTime": 1752821490000,
"statusDateTime": 1752821490000,
"name": "PMUI_AUTOMATION_MOCK_ASSET_LINUX",
"agentVersion": "009.002.000.000",
"id": "9bf5e773-177e-467c-a79a-1c345546be32",
"installedPatches": [
"5e4ebe5d-9d46-3945-aa8b-36e123075b5a"
],
"hardware": {},
"architecture": "x86_64",
"status": "Scanned",
"statusCode": 20211,
"osNotSupportedForModules": []
}
]
API Response
{
"customerId": "bbb55e58-b06f-fd7b-81b8-92a7c5407282",
"id": "72a50f23-d80d-4abf-84ff-4509ba17b732",
"schemaVersion": "1.0",
"name": "MTG_WINDOWS_ONDEMAND_DEMO",
"description": "Test Mitigation Job",
"type": "Install",
"status": "Enabled",
"assetIds": null,
"coAuthorUserIds": [
"430c474e-2309-47bf-832b-a6e5685c3866"
],
"scheduleType": "On-demand",
"startDateTime": "2025-7-01 09:57:18 AM",
"recurring": false,
"timezoneType": "SPECIFIC_TZ",
"timezone": "UTC",
"createdBy": {
"user": {
"id": "b0f469fe-8f5e-f169-80e1-95e8a728bb5d",
"name": "quaysxkm35",
"fullName": "John Doe"
},
"date": 1751363834317
},
"updatedBy": {
"user": null,
"date": null
},
"deletedBy": {
"user": null,
"date": null
},
"assetCount": null,
"taggedAssetCount": 0,
"applicableAssetCount": 0,
"totalAssetCount": null,
"assetResultReceivedCount": null,
"jobCategory": 3,
"jobTriggerStatus": null,
"completionPercent": null,
"jobSource": 3,
"readOnly": false,
"subCategory": "Mitigation",
"platform": "Windows",
"assetTagIds": [
"576b4fab-2682-433e-b3e6-c4ea9861ae75",
"2f0abeac-8fe5-48a0-aef8-c25bb98ec6f8"
],
"matchAllTagIds": [],
"exclusionTagIds": [
"9947851b-017f-4df5-8831-5073392a51c2"
],
"exclusionAssetIds": [],
"filterType": "Any",
"exclusionFilterType": "Any",
"notification": {
"notificationTypes": {
"email": true
},
"notificationConfigs": {
"recipientEmails": "johnd@qualys.com,danielm@qualys.com",
"completedPercentage": "80"
},
"notificationEvents": {
"onJobStart": true,
"onJobComplete": true
}
},
"assetDetectionsQQL": "tags.uuid: [576b4fab-2682-433e-b3e6-c4ea9861ae75,2f0abeac-8fe5-48a0-aef8-c25bb98ec6f8] AND not tags.uuid: [9947851b-017f-4df5-8831-5073392a51c2] AND trackingMethod:QAGENT",
"preDeployActions": [
{
"actionId": "eb0c59e8-78eb-4f0d-9225-4fd7fe3b558e",
"action": "Apply Mitigation",
"actionType": "predeploy",
"params": {
"timeout": 180,
"mitigationCategory": "Script-based Virtual Patch",
"qid": 378985,
"qidDetectionId": 0,
"hostVulnId": 0
},
"mitigationList": [
{
"cves": [
"CVE-2016-2183"
],
"mitigationId": "3f3d2fae-96ec-4d73-83d6-3cf0264ac1dc",
"mitigationType": "Modify registry",
"carScriptId": 226363191,
"customCdnUrl": "",
"signatureHashCode": "",
"impactFactor": 0,
"implication": 1
}
],
"actionLinkedToJob": false
},
{
"actionId": "684162a0-2ce5-46ad-9ea6-56e8a2dd1e47",
"action": "Apply Mitigation",
"actionType": "predeploy",
"params": {
"timeout": 180,
"mitigationCategory": "Script-based Virtual Patch",
"qid": 90044,
"qidDetectionId": 0,
"hostVulnId": 0
},
"mitigationList": [
{
"cves": [
"90044"
],
"mitigationId": "414d7f53-1409-4045-ba3d-7e71ef39abfb",
"mitigationType": "Modify registry",
"carScriptId": 494972837,
"customCdnUrl": "",
"signatureHashCode": "",
"impactFactor": 0,
"implication": 1
}
],
"actionLinkedToJob": false
}
],
"postDeployActions": null,
"vulnQQL": "vulnerabilities.vulnerability.qid:[378985, 90044]"
}