One of my integrations is using a call to ‘/api/sam/swinventory/products’ to retrieve the product information, and this method call returns values such as:
In earlier versions of the API, the ‘licenseType’ attribute returned the name of the metric type, such as “PVU” / “RVU” etc. But in newer versions of BigFix Inventory the API now returns an integer rather than the name, which I assume is either an enum or a lookup id, but I cannot find what the returned values represent. The licenseType attribute does not seem to be documented in the BigFix API documentation from what I can see.
Is there either a way to retrieve the original licenseType name, or a list of what each of the values represent?
Example conversation - clearing a license metric threshold
1.To retrieve information about the identifier of the product for which you want to clear the license
metric threshold, use the following
GET request. The request returns product ID and name, metric ID and name, and the threshold value.Request
GET
api/sam/v2/license_usage?columns=product_id&columns=product_name
&columns=metric_id&columns=metric_name&columns=threshold
&token=7adc3efb175e2bc0f4484bdd2efca54a8fa04623
Response
[{
“product_id”:
29258,
“product_name”:
“WebSphere
Service
Registry
and
Repository”,
“metric_id”:
3,
“metric_name”:
“PVU
Full
Capacity”
“threshold”:
300
}]
Also there is a fair amount of information about metric types here.
I will be migrating to the new v2 API in the future, but in the meantime I’m looking for a fix for the current users of my integration. I simply need to know what each integer returned by the ‘/api/sam/swinventory/products’ for licenseType represents, then I can create a lookup to fix it.
The method call you mention, ‘/api/sam/v2/license_usage’ is for license usage, which is the equivalent of ‘/api/sam/license_usages’ in the v1 API, which also returns the ‘metric_name’ attribute, but that is not the information I’m looking for.
Odd that it is so difficult to find out what each of the values for licenseType represent now the API has change to represent it as an integer instead of the text description.
@GarySmith I would be very surprised if the data provided by v1 API differed from that provided by the v2 API, given that the underlying data schema has not changed. When viewed in the UI, I would expect your BFI components to have a metric of RVU MAPC (6 = INTERNAL_RVU_MAPC = RVU MAPC). Is this not the case?
This old API is returning only information about products licensed based on PVU and RVU MAPC metrics. For info about all the supported metric types, yo7u need to use the new V2 API.
However, I can see that this licenseType attribute is not documented at all (as well as the above limitation for just 2 license types). I will open internal defect to have this fixed.
Also - this attribute was always an ID, not metric name. Can you provide more details in which BFI version the API returned metric name not ID?