Custom Assessment and Remediation Release 2.9.3 API

October 15, 2026

Before you review the API release highlights, learn which API server URL to use in your API requests. See Know Your Qualys API Server URL. The sample API requests in these release notes use <qualys_base_url> as a placeholder for that URL.

Enhancement

Run Scripts on Assets That Match a QQL Query (Execute Scripts On Demand API)

What Changed For You

You can now use the Execute Scripts On Demand API to select target assets dynamically with a QQL query instead of specifying each asset individually.

The following API is enhanced to run scripts using a dynamic QQL query:

Execute Scripts On Demand API

Use this API to select assets using a dynamic QQL query.

New or Updated API Updated
API Endpoint /sm/v1/scripts/{scriptId}/execute
Method POST
DTD or XSD changes Not Applicable

Input ParametersInput Parameters

Parameter Mandatory/
Optional
Data Type Description
assetSelectionType Optional

(Mandatory when assetSelectionType = QQL_BASED_ASSETS)
String

When you run a script, provide the target assets either manually or through Automated Selection using a dynamic QQL query.

1. assetSelectionType - Manual

Provide a list of asset IDs or tag IDs.

2. assetSelectionType - QQL_BASED_ASSETS

Provide a suitable QQL query to filter assets.

For example: dynamicAssetQQL:"operatingSystem.name:Windows"

dynamicAssetQQL Optional

(Mandatory when assetSelectionType = QQL_BASED_ASSETS)
String

Provide a suitable QQL query to filter assets.

For example: dynamicAssetQQL:"operatingSystem.name:Windows"

You can fetch the asset tag id and UUid using the Fetch Asset Tags List API.

Sample: Execute Script on Production Assets Using Automated Asset Selection (Dynamic QQL)Sample: Execute Script on Production Assets Using Automated Asset Selection (Dynamic QQL)

API Request

curl -v -X POST '<qualys_base_url>/sm/v1/scripts/368426/execute' \
  -H 'Accept: application/vnd.qualys.car.api.v6.0+json, application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "testMode": false,
    "assetIds": [],
    "assetTagIds": [],
    "excludedAssetIds": [],
    "testAssets": [],
    "params": [],
    "executorAppName": "CAR",
    "description": "Run a Job",
    "dynamicAssetQQL": "operatingSystem.name:Windows",
    "assetSelectionType": "QQL_BASED_ASSETS",
    "shareScriptResultWithFim": false,
    "allTagsForAssetsEnabled": false,
    "executionPolicyBypassEnabled": true,
    "runAsLoggedInUser": false,
    "rebootAfterScriptExecution": false
  }'

API Response

{
    "body": {
        "correlationUuid": "e674538-a827-4e02-951e-5c55432ca61"
    }
}

Sample: Execute Script on Non-production Assets Using Automated Asset Selection (Dynamic QQL)Sample: Execute Script on Non-production Assets Using Automated Asset Selection (Dynamic QQL)

API Request

curl -v -X POST '<qualys_base_url>/sm/v1/scripts/368426/execute' \
  -H 'Accept: application/vnd.qualys.car.api.v6.0+json, application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "testMode": true,
    "assetIds": [],
    "assetTagIds": [],
    "excludedAssetIds": [],
    "testAssets": [],
    "params": [],
    "executorAppName": "CAR",
    "description": "Run a Job",
    "dynamicAssetQQL": "operatingSystem.name:Windows",
    "assetSelectionType": "QQL_BASED_ASSETS",
    "shareScriptResultWithFim": false,
    "allTagsForAssetsEnabled": false,
    "executionPolicyBypassEnabled": true,
    "runAsLoggedInUser": false,
    "rebootAfterScriptExecution": false
  }'

API Response

{
    "body": {
        "correlationUuid": "e674328-a827-4e22-951e-5c53213ca61"
    }
}

For more information, see the CAR API User Guide.