Use this API to search assets based on criteria.
Parameter |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
filter | Optional | String |
Filter the Assets by providing a query using Qualys syntax. Refer to the “How to Search” topic in the Online Help for assistance with creating your query. For example - operatingSystem:'Microsoft Windows 10' |
groupBy | Optional | String |
Group results based on certain parameters (provide comma-separated list). For example - operatingSystem |
interval | Optional | String |
GroupBy interval for date fields. Valid values are y(year), q(quarter), M(month), w(week), d(day), h(hour), m(minute), s(second). For example - 1d An interval lower than a second is not supported. Note: Value for each interval period should be 1. For example, you can specify an interval of 1y, 1M, 1w, and so on, but not 2y, 3M, etc. |
limit | Optional | String | Limit the number of rows fetched by the groupBy function. |
sort | Optional | String |
Sort the results using a Qualys token. For example - [{\"operatingSystem\":\"asc\"} |
Authorization |
Mandatory |
String |
Authorization token to authenticate to the Qualys Cloud Platform. Prepend token with "Bearer" and one space. For example - Bearer authToken |
API Request
curl -X POST <qualys_base_url>
/fim/v3/assets/search-H 'Authorization: Bearer <token>'
-H 'content-type: application/json' -d @request.json
Contents of request.json:
{
"Rename": 9030024, "Attributes": 541520, "Delete": 340857,
"Create": 265141, "Security": 189813, "Content": 29497
}
Response
[
{
"sortValues": [],
"data": {
"manifest":
{ "status": "FIM_MANIFEST_APPLIED_SUCCESS"
}
,
"name": "FIM_API_AUTOMATION",
"id": "fef2f2e0-636d-4d20-b68b-2c2967a9da5d",
"operatingSystem": "Microsoft Windows 7 Professional
6.1.7601 64-bit Service Pack 1 Build 7601"
}
}
]