So, assuming all you have is an arbitrary list of computer names, perhaps something like the following might work (there are likely more efficient methods, but this one is quick/easy if the lists are small):
ids of bes computers whose ("|computer1|computer2|computer3|" as lowercase contains ("|" & name of it as lowercase & "|"))
meanwhile I tried this but it is not efficient method I feel. I want to optimize this, can you please help
https://10.226.228.133:52311/api/query?relevance=(ids of it) of bes computers whose ((name of it as string as uppercase starts with “ACERTEST-PC”) or (name of it as string as uppercase starts with “15E-DTP-H-07882”)or (name of it as string as uppercase starts with “15A-DTP-H-02010”))
Note: here ACERTEST-PC, 15E-DTP-H-07882 & 15A-DTP-H-02010 are computer names
The error message This expression could not be parsed suggests a syntax error somewhere, often due to mismatching parens or double-quotes or similar (see Common Relevance Error Messages as reference). One way to help identify such issues is to test the relevance expression in the Presentation Debugger in the Console which might highlight the syntax issue: https://developer.bigfix.com/tools/presentation_debugger.html
It may be an artifact of posting and displaying the image on here, but it doesn’t look as if you have included the whole of Aram’s relevance statement in your code.
Commenting on this a year later because search is useful.
The clipping of the query is being caused by the ampersand. I’ve tried replacing it with & (for HTML) and & (for XML) but they both still clip the query. Taking out the “|”& and &"|" entirely works fine. How does one append text in a relevance query for the API?
How are you sending the query? If using curl or wget on the command line, it is likely the shell truncating the command line. While I would recommend learning Python (it’s not as bad as it sounds), the faster approach is probably to store your query ina text file and use the curl option to read the query from the file.