Use this API function to retrieve a list of the assets of the specific certificate. Use cert hash as an input query. The response contains all the asset details of the specific certificate. View details of assets like tags and instances. Use this API to get all the assets when the certificate has more than 1000 assets. If the total count exceeds the number of results returned, you can fetch the next page by calling the API again with the next page number.
You can see only those assets that have been assigned by your manager user. When you send an API request, you can access information about the assets and their corresponding certificates assigned to you, based on scope. For more information on tag-based user scoping refer to Certificate View Online help.
Parameter |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
certhash |
Mandatory |
string |
Query parameter- Provide hash of the certificate. |
attributes |
Optional |
string |
Provide specific attributes to display additional asset details based on
|
filter |
Optional |
String |
Filter the events list 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 - expiryGroup: Expired Refer to the list of tokens you can use to build the query: Search tokens |
pageNumber |
Optional |
Integer |
The page to be returned. Starts from zero. |
pageSize |
Optional |
Integer |
Provide the number of records per page to be included in the response. Default: 10. Maximum: 200 For example, the total result set is 8000 assets. If the page size is specified as 80, then the result is divided in 100 pages with 80 assets each. |
Note: Use a combination of pageNumber and pageSize parameters to ensure that the results returned are less than 10000 records. If it exceeds 10000 records, then an error message is displayed. |
|||
sort |
Optional |
String |
Sort the results in ascending or descending order. By default, the result is sorted by {updated: desc} |
Note: This API supports only new query format. For more details, refer to the following query example
Example |
If you want to view the certificate with asset name server1 |
Old Format |
asset.name:server1 |
New Format |
asset:(name:server1) |
API Request
curl -X POST
"<qualys_base_url>/certview/v1/certificates/<certhash>/assets" --header "Accept: application/json"
-H "Authorization: Bearer <JWT Token>"
-d "{\"certificateDetails\":\"basic\"
Response
[
{
"netbiosName": "",
"assetId": "8d6d19b5-9201-445b-87c2-b61aeb3f4fa5",
"name": "ABC.COM",
"operatingSystem": "NetScaler",
"created": 1587464966000,
"updated": 1625213136000,
"assetInterfaces": [
{
"hostname": "ABC.COM",
"address": "64.xx.96.133"
}
],
"certificateCount": 0
},
{
"netbiosName": "",
"assetId": "2a9428e4-9130-4979-9f8c-dcfe86579c39",
"name": "Server1",
"operatingSystem": "NetScaler",
"created": 1591703972000,
"updated": 1624014415000,
"assetInterfaces": [
{
"hostname": "ABC.COM",
"address": "10.XXX.X.XX"
}
],
"certificateCount": 0
}
]
API Request
curl -X 'POST'
'<qualys_base_url>/certview/v1/certificates/66130b8xxxxxxdcccfd7edxxxxxxx
xx332a9ae0b4304c65d7646fxxxxx57975bd/assets'
-H 'accept: application/json'
-H 'Bearer <JWT Token>'
-H 'Content-Type: application/json'
-d '{
"filter": "asset:(wasUrl: 'https://api.example.com')",
"pageNumber": 0,
"pageSize": 10,
"sort": "[{\"updated\":"desc\"}]"
}'
Response
[
{
"netbiosName":"",
"assetId":"9c07ae8b-c051-4b9d-8a2d-21075c812658",
"name":" api.example.com",
"operatingSystem":"",
"wasUrl":"https://api.example.com",
"created":1715906342000,
"updated":1715906522000,
"assetInterfaces":[
{
"hostname":" api.example.com",
"address":""
}
],
"certificateCount":0
}
]