API - BigFix , WebReports

Preformatted textHello, I’m a BigFix student, I don’t know many terms yet.

I created the relevancy below, in BES Session Relevance Tester and it’s really bringing what I need.

However, when I try to run it via API on my BigFix server, the error below appears:

img

where can i be wrong?

reference: Efficient Session Relevance Query for Computer Properties

Tks

Not sure what this tool is you’re using to send the query, but it looks like it has split your query into multiple parameters. The entire query, with the embedded newlines, needs to all be sent in the “relevance” parameter

1 Like

Depending on the tool, you may want to consider passing the “relevance” parameter pre-url-encoded to help avoid such issues (assuming the tool doesn’t have an option to handle that for you). https://www.urlencoder.org/ can be handy to encode the relevance parameter to then pass to /api.query.

1 Like

Hello , @JasonWalker and @Aram

Thanks for the support and excellent observation, I was using “Postman” and there were many line breaks.

With your support, I reached the expected result.

references used:

https://forum.bigfix.com/t/api-https-server-api-query/45981

https://forum.bigfix.com/t/efficient-session-relevance-query-for-computer-properties/32820

https://github.com/Jwalker107/BigFix/blob/master/API%20Samples/Session%20Relevance%20to%20JSON%20Dictionary.py

2 Likes