Fetch Asset Tags List API
Search list of asset tags on which CAR is enabled.
Input ParametersInput Parameters
Parameter |
Mandatory/ |
Data Type |
Description |
---|---|---|---|
Authorization |
Mandatory |
string |
Authorization token to authenticate to the Qualys Enterprise TruRisk™ Platform. Prepend token with 'Bearer', followed by a space. For example: ’Bearer’ <authToken> |
filter | Optional (Mandatory when you want to fetch lab asset tags) |
String | Provide the value as,
By default the value of |
pageSize | Optional | Integer | Provide the maximum number of lab asset tags you want to fetch. |
pageNumber | Optional | Integer | Provide the page index for pagination. |
Sample: Fetch asset tagsSample: Fetch asset tags
API Request:
curl -X POST
'<qualys_base_url>/sm/v1/assettags/search'
--header 'accept: application/json'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer'
Response:
{
"errorCode": null,
"message": null,
"body": {
"totalCount": "<NUMBER OF ASSETS>",
"list": [
{
"customerUuid": "<CUSTOMER UUID>",
"tagId": "<ASSET TAG>",
"customerId": "<CUSTOMER ID>",
"name": "<ASSET NAME>",
"tagUuid": "<ASSET TAG UUID>",
"id": "<ASSET ID>"
},
{
"backgroundColor": "#0000FF",
"customerUuid": "<CUSTOMER UUID>",
"tagId": "<ASSET TAG ID>",
"customerId": "<CUSTOMER ID>",
"name": "<ASSET TAG>",
"tagUuid": "<ASSET TAG UUID>",
"id": "<TAG ID>"
},
{
"customerUuid": "<CUSTOMER UUID>",
"tagId": "<TAG ID>",
"customerId": "<CUSTOMER ID>",
"name": "Internet Facing Assets",
"tagUuid": "<ASSET TAG UUID>",
"id": "<TAG ID>"
},
{
"backgroundColor": "#FF0000",
"customerUuid": "<CUSTOMER UUID>",
"tagId": "<TAG ID>",
"customerId": "<CUSTOMER ID>",
"name": "<TAG NAME>",
"tagUuid": "<ASSET TAG UUID>",
"id": "<TAG ID>"
},
{
"backgroundColor": "#A2C4C9",
"customerUuid": "<CUSTOMER UUID>",
"tagId": "<TAG ID>",
"customerId": "<CUSTOMER ID>",
"name": "<ASSET ID>",
"tagUuid": "<ASSET TAG UUID>",
"id": "<TAG ID>"
},
{
"customerUuid": "<CUSTOMER UUID>",
"tagId": "<TAG ID>",
"customerId": "<CUSTOMER ID>",
"name": "<TAG NAME>",
"tagUuid": "<ASSET TAG UUID>",
"id": "<TAG ID>"
},
{
"customerUuid": "<CUSTOMER UUID>",
"tagId": "<TAG ID>",
"customerId": "<CUSTOMER ID>",
"name": "<TAG NAME>",
"tagUuid": "<ASSET TAG UUID>",
"id": "<TAG ID>"
},
{
"customerUuid": "<CUSTOMER UUID>",
"tagId": "<TAG ID>",
"customerId": "<CUSTOMER ID>",
"name": "<TAG NAME>",
"tagUuid": "<ASSET TAG UUID>",
"id": "<TAG ID>"
},
{
"backgroundColor": "#FFFF00",
"customerUuid": "<CUSTOMER UUID>",
"tagId": "<TAG ID>",
"customerId": "<CUSTOMER ID>",
"name": "<TAG NAME>",
"tagUuid": "<ASSET TAG UUID>",
"id": "<TAG ID>"
},
{
"backgroundColor": "#206CFF",
"customerUuid": "<CUSTOMER UUID>",
"tagId": "<TAG ID>",
"customerId": "<CUSTOMER ID>",
"name": "<TAG NAME>",
"tagUuid": "<ASSET TAG UUID>",
"id": "<TAG ID>"
}
]
}
}
Sample: Fetch non-production asset tagsSample: Fetch non-production asset tags
API Request
curl -X POST
'<qualys_base_url>/sm/v1/assettags/search'
--header 'accept: application/json'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer <authToken>'
--data '{
"filter": "(labTag:true)",
"pageSize": 50,
"pageNumber": 0
}'
API Response
{
"body": {
"totalCount": 1,
"list": [
{
"sortValues": [],
"data": {
"customerUuid": "74c1bcdd-9bbb-e9dd-802a-65e2c579abc0",
"tagId": 28902062,
"customerId": 1076635,
"name": "Tag name",
"tagUuid": "3dff19c9-e7cc-4e41-91f9-c324c850dfa9",
"id": "28902062",
"labTag": true,
"addedToGlobalExclusion": false
}
}
]
}
}
To know the details of the response codes, refer to Appendix.