As a follow up, I too would highly recommend avoiding the use of the Database API for this use case. There are several reasons for this including (but not limited to):
- Performance and functional impact to the BigFix system as you’d be querying the core database (including high potential for locks)
- The database schema can (and has) changed in the past…this means that queries may need to be written as part of upgrades, and that is clearly not ideal
- The IDs in question are not guaranteed to be consistent across environments
- The BigFix database is optimized for speed of data insertion rather than these sorts of queries
Instead, I’d recommend leveraging the REST API. More specifically, I’d recommend using the query
method (https://developer.bigfix.com/rest-api/api/query.html) with Session Relevance.
Depending on your version of BigFix, consider also BigFix Explorer.
We can help with potential Session Relevance queries, but the following post is a great one for reference on how to generate efficient queries for Computer properties: Efficient Session Relevance Query for Computer Properties