AnsweredAssumed Answered

Additional criteria allow by host search v2

Question asked by bernsco on Mar 24, 2014
Latest reply on May 12, 2014 by JHo

In the body you declare a critieria but the documentation doesn't say what other critieria is allow.  Does anyone know?  Looking to get back all hosts with a certain port open...

 

See below for the doc reference:

 

Search Hosts Assets - By Criteria

 

Find assets according to specified criteria and paging preferences. The Service Request

Criteria allows the operator to evaluate value fields, like name.

 

Permissions

Managers with Full Scope. Users without Full Scope must have these permissions:

Access Permission“API Access”

Asset Management Permission “Read Asset”

 

Example

Find an asset by name.

 

Request:

curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST"

--data-binary @-

"https://qualysapi.qualys.com/qps/rest/1.0/search/am/hostasset" <

file.xml

 

Request POST data (file.xml):

<ServiceRequest>

<preferences>

<limitResults>100</limitResults>

</preferences>

<filters>

<Criteria field="name" operator="CONTAINS">HostAsset <--- What other Criteria are allowed?

test</Criteria>

</filters>

</ServiceRequest>

Outcomes