BFI REST API - Error when retrieving additional property using REST API

I am trying to get the user defined property using REST API and do the same steps as short guided below on BFI 9.2.3.1:
https://forum.bigfix.com/t/ilmt-sua-suadb-database-integration-is-it-supported/14403/9

Somehow, I am getting error. Does anyone know what is wrong? How can I get the correct results?

Here is my steps:

  1. I added a new computer property and imported it to BFI.

  2. I can find the property as “computer_property_14” with api/schemas/computer.json API.

“computer_property_14”:{
“type”:[
“string”,
“array”,
“null”
],
“items”:“string”,
“title”:“companycode”,
“mappings”:{
“type”:“array”,
“association”:true,
“description”:“Mappings into datasource properties”,
“item”:[
{
“datasource_site_remote_id”:-1995284676,
“datasource_analysis_remote_id”:196,
“datasource_property_remote_id”:1,
“datasource_id”:1
}
]
}
}

  1. I am trying to get the property with the following URL:
    https://bfiserver:port/api/sam/computer_systems?token=20xxx&columns[]=computer_property_14

  2. I get the following error:
    {“error”:“Don’t know how to report on column computer_property_14”}

Also, a FATAL error is recorded on tema.log.

Thanks.

Hello yasuko,

In your case, there should be:
at the end of the sample url:
columns[]=computer_system_properties.computer_property_14

There was ‘computer_system_properties’ alias missing in example you mentioned:

3.) Use “computer_property_1” for RAM attribute as a name of column in API. Example:
/api/sam/computer_systems?columns[]=id&columns[]=computer_system_properties.computer_property_1

1 Like

Hello Lukasz,

Thank you for the update. Now I can get the data I want with computer_systems element.

Then, do you have any ways to get the data with API for software instances and
license usage using the computer_system_properties.computer_property_14?

Hello yasuko,

Software Instances and License Usage are connected by computer system id.
I think you can first filter computer systems by your computer property 14 and then use filtered computer systems ids as a criteria for Software Instances and License Usage API.

Regards,
Łukasz

Hello Lukasz,

Thank you. Reasonable.
I will try that way.