- Flexera Community
- :
- Software Vulnerability Management
- :
- Software Vulnerability Management Forum
- :
- SVM API "List Scan Result for Each Host"
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I’m using the API and I noticed that with the “List Scan Result for Each Host” query (https://docs.flexera.com/csi/api/Content/helplibrary/List_Scan_Result_for_Each_Host.htm#svm_api_completed_scan_3551738620_1219696) only allows us to search by “device_id”. Is there a way we are able to search by device name?
or some way to determine what the "device_id" is from the device name? or would this be an enhancement request?
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
To get device id from device name, use the following API. This is "All Hosts" smartgroup API. From the API response, 'nsi_device_id' json node have device id
api/?action=smart_groups&which=getSmartGroupContents&smartGroupTextType=host&smartGroupId=<1>&?_dc=1663230490412&host_name=<Device Name>&page=1&start=0&limit=30&sorters=[{"field":"host_name","direction":"ASC"}]
Pass smartGroupId and host_name as required.
A sample code to get device details from device id is listed here - https://docs.flexera.com/csi/api/Content/helplibrary/Sample_PowerShell_Code_to_Get_Host_Details.htm
Thanks,
Anish Mohan
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
To get device id from device name, use the following API. This is "All Hosts" smartgroup API. From the API response, 'nsi_device_id' json node have device id
api/?action=smart_groups&which=getSmartGroupContents&smartGroupTextType=host&smartGroupId=<1>&?_dc=1663230490412&host_name=<Device Name>&page=1&start=0&limit=30&sorters=[{"field":"host_name","direction":"ASC"}]
Pass smartGroupId and host_name as required.
A sample code to get device details from device id is listed here - https://docs.flexera.com/csi/api/Content/helplibrary/Sample_PowerShell_Code_to_Get_Host_Details.htm
Thanks,
Anish Mohan
