cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FlexNet Manager Suite (FNMS) API

Hi Folks, 

I was just curious to know if there was something that I can learn from an API perspective that FlexNet Manager Suite actually has in it's OOTB solution. We are having challenges with AWS inventory and we want to perform removal/deletion of AWS inventory using API.
Challenge is like - VM created and assigned to user. User used it for a few hours and then it switched off. So, FNMS device license consumes 1 server license for this VM. We don't want to keep VM which are not running. So, we want to connect with AWS Lambda to perform clean-up activity. 


So, can we connect FNMS on-premises and AWS Lambda using API? If yes, can you please share documentation link? If no, can you please help me alternate option. 

Any information shared would be appreciated, which would help me dig much deeper. 

@ChrisG - Can you please help me with above query? 

Thanks in advance. 

(3) Replies
mfranz
By Level 17 Champion
Level 17 Champion

Please have a look at http://localhost/ManageSoftServices/ComplianceCoreService/ComplianceCoreService.asmx or replace localhost with your FNMS web server name. There is an endpoint ComplianceComputerDeleteComputersByID which looks promising. However, that is working with the ComplianceComputerID, which you may have to look up first.

A challenge might be that you'll have to remove the computer from the actual source (FNMSInventory). I am not sure how the API will behave in this regard. Also I'm not sure if the API is still supported. And I think you need a license file with the API activated. Maybe a solution directly targeting the database is more efficient?

If you have a way to identify these devices, a simplistic approach might be to look at the last inventory date.  If this type of device hasn't uploaded inventory after a certain amount of time, you could mark these devices as Ignored from license calculations.  A business adapter could be written to do this.  (You could also have a second business adapter that marks these devices as Active if they are already Ignored but come back on-line (the Inventory date would be within whatever you chose for the first adapter)).

--Mark

So to add to what Mark posted we have a business adapter in place with following query 

SELECT 
[ComplianceComputerID]
,[ComplianceComputerTypeID]
,[ComputerName]
,[SerialNo]
,[OperatingSystem]
,[Manufacturer]
,[ModelNo],[ModelNoDefault]
,[InventoryDate]
,[UpdatedUser]
,[UpdatedDate]
,[InventoryAgent]
,[CloudServiceProviderID],
case
when (InventoryDate > (cast(GETDATE()-6 as date)) and ComplianceComputerStatusID=2) 
	then 'Active' -- if was last inventoried within last 7 days and current status is Ignored then new status will be set to Active
when (InventoryDate <= (cast(GETDATE()-6 as date)) and ComplianceComputerStatusID=1) 
	then 'Ignored' -- if was last inventoried more than 7 days back and current status is Active then new status will be set to Ignored
end as New_status
  FROM [FNMSCompliance].[dbo].[ComplianceComputer]
  WHERE 
  (ComplianceComputerTypeID in (2,3) -- Are type VM Host or VM only
  and InventoryAgent like 'FlexNet Manager Suite' -- Are inventoried by agent
    and CloudServiceProviderID=-1) -- Are from Amazon Web Services (AWS)
  and (
		(InventoryDate > (cast(GETDATE()-6 as date)) --Were last inventoried within last 7 days 
		and ComplianceComputerStatusID=2) -- Are Ignored
	or 
		(InventoryDate <= (cast(GETDATE()-6 as date)) -- were last inventoried more than 7 days back
		and ComplianceComputerStatusID=1) -- Are Active
		)
  order by New_status

and changing the status of the devices matching on Computer name and serial number. 
Hope it helps.