I noticed post-upgrade to 9.5.8 that some of the .csv methods were a little different (borked) from prior automation. Requests we had cadged from prior XHR and console watching to make our report automation simpler were no longer quite right…
Specifically something had changed in the report generation processes affecting my applying a third and/or fourth dimension of fixlet information data to first and second dimensions of computer properties data. I had been merging it using a mongrel toolset of (curl/grep/sed/awk/cut/tr/etc,etc.) Digging into the XHR, I saw new methods in Web Reports, pretty clearly put there to support a deeper RESTful API integration and JS-ifying of the WR frontend vs the current core RESTful relevance-y XML.
If you are like me and don’t want to write a relevance for every single reporting activity that needs nice clean JSON, this may help save your sanity and/or productivity.
If you’re interested, I put together some documentation, a python script, and config file to pull some information using these APIs, located here: https://github.com/DoubleDeuceBuddha/bfwr_api
WARNING: THESE ARE UNDOCUMENTED AND LIKELY TO CHANGE
Seemingly new methods (non-exhaustive):
- computers
- fixletproperties
- chartdata
- getallfilters
All of these are accessible via http(s)://yourbfserver(:52311)/json/methodname
Useful parameters:
-
Text shorten/unshorten:
shortentext
unshorten
-
Pagination:
&results=-1&startIndex=0 will give you all results
&results=100&startIndex=300 will give you 100 results starting at the 300th result
This script is hardcoded for all results in the build_parameters function.
-
Columns:
&c= column/property name to include
&sort= column/property name
&dir= direction (asc or desc)
Example:
&sort=column1&sort=column2&sort=column3&dir=asc&dir=desc&dir=asc&c=column1&c=column3&c=column2&c=column4
Will present 4 columns in this order: column1, column3, column2, column4
Sorted on column1 ascending, column2 descending, column3 ascending, column 4 unsorted
c=R-Computer Name is required or your query will fail