Username and Passwords not recognized in REST API

Hi all,

I am very new to BigFix and have a very basic question on the use of REST API to pull data from BigFix Server.
My REST URL is similar to below:

https://HOSTNAME/webreports?page=EvaluateRelevanceOnly&expr=unique values of (name of it) of bes computers whose (exists name of it AND last report time of it > (now - 1*day))&Username=USERNAME&Password=PASSWORD

With HOSTNAME, USERNAME and PASSWORD being replaced by actual ones.
This url works fine in the browser and returns results i.e. names of computers reported in the last one day. However, when I use the same from Oracle SQL Developer to get the list- The output HTML coding has below line among othe stuff:

Please enter your username and password to connect to Web Reports.

etc. etc. etc.

My question is: The USERNAME and PASSWORD are present in the URL, then why it doesn’t recognize them and again asking for the same instead of displaying the result.

Any help will be appreciated.

Thanks!

If you can - maybe try using curl. As you are using https:// you also need to be sure you are using permitted TLS versions (no idea what BigFix REST API demands - but I am sure someone else can).

And, using curl (or perhaps wget) you should be able to experiment with different TLS settings, as well as certificate acceptance (e.g., maybe Oracle SQL Developer is not accepting the BigFix Certificate - as in - did you have to accept the certificate the first time you used your browser?).

HTH

I’d also suspect that maybe your browser is automatically percent-encoding the URL for you (changing the spaces to %20 and such), and maybe the oracle client isn’tdoing that automatically.

1 Like

Thanks AIXTOOLS and Jason for your responses.
Let me try the stuff that you guys suggested and will let you know the progress.

Jason’s suggestion worked perfect.
Percent encoding was the key.
I just copied the % encoded url from browser and used it.
It works now :slight_smile:
Thanks a million!

Just an observation, that’s not the BigFix REST API. It’s using the Web Reports API.

REST API GET query is would be https://SERVER:52311/api/query?relevance=names+of+bes+computers
I personally prefer a post of the query. It gets you past a URL length issue.

https://developer.bigfix.com/rest-api/api/query.html

1 Like