BigFix Saved Web reports pulling through REST API

Hi,
I am trying to fetch BigFix saved Web report through REST API call.Does anyone know if its possible and how to call the resource with an example?

I’d suggest to continue the thread in this other one:

posted here

Hi,
Sorry to ask you again,i would like to know if its possible to fetch a saved web report from its ID using rest API which would give us the result in CSV format.
For example, we can call rest API to fetch fixlet or task information using request.get on a similar note do we have any resource which would give us saved web reports?

this should work

import xml.etree.cElementTree as ET
from xml.etree import ElementTree
import requests
import sys,traceback
import subprocess
import os.path
import time
import random
import string
import shutil

reload(sys)
sys.setdefaultencoding('utf8')

import urllib3
urllib3.disable_warnings()

bigfix_URL="https://xyz:52311/api/query?relevance="

bigfix_username="abx"
bigfix_pwd="def"

nas_inmtab_csv="/tmp/mtab.csv"
xml_file="/tmp/a.xml"

final_loc="/var/www/html/reports/nas_inmtab.txt"

relevance_nas_inmtab='( (names of it, operating systems of it,values of results from (BES Property "NAS mounted in MTAB") of it) of members of bes computer groups whose ( name of it = "Unix Servers All") )'

auth_url_linux=""+bigfix_URL+""+relevance_nas_inmtab+""
nas_infstab=requests.get(auth_url_linux,verify=False,auth=(bigfix_username,bigfix_pwd))
#print(nas_infstab.text)

#write_to_xml = open(xml_file,'w+')
#write_to_xml.write(nas_infstab.text)
#write_to_xml.close()


write_to_nas_inmtab= open(nas_inmtab_csv,'w+')
res=""
operating_sys=""
nas_name=""
mt_pt=""
nfs=""
mt_option=""
final_nas=""
final_stmt=""

tree2 = ET.fromstring(nas_infstab.text)
#tree2= ET.ElementTree(file=xml_file)
result=tree2.findall('.//Tuple')
if result:
 for fixlet in tree2.findall('.//Tuple'):
  for j in fixlet.findall(".//Answer"):
     if j.text.startswith("Linux"):
      operating_sys=j.text.split(" ")[0]
      operating_sys=operating_sys+j.text.split(" ")[1]
      operating_sys=operating_sys+j.text.split(" ")[5]
     elif j.text.startswith("SunOS") or j.text.startswith("AIX") or j.text.startswith("HP-UX"):
      operating_sys=j.text.split(" ")[0]
      operating_sys=operating_sys+j.text.split(" ")[1]
     elif "," in j.text :
       for i in j.text.split(","):
        if ":" in i:
         nas_name=i
        elif  i.startswith("/"):
         mt_pt=i
        elif i.startswith("nfs"):
         nfs=i
        else:
          if  i:
           mt_option=mt_option+":"+i
       mt_option=mt_option.lstrip(":")
       final_nas=nas_name+","+mt_pt+","+mt_option
       #print (final_nas)
     else:
      res=j.text+","+res
  final_stmt=res+""+operating_sys+","+final_nas
  #print(final_stmt.rstrip(","))
  write_to_nas_inmtab.write(final_stmt.rstrip(",")+"\n")
  res=""
  linos=""
  nas_name=""
  mt_pt=""
  nfs=""
  mt_option=""
  final_nas=""
else:
  print("No found")

write_to_nas_inmtab.close()
if os.stat(nas_inmtab_csv).st_size != 0:
 #os.rename(nas_inmtab_csv, final_loc)
 shutil.copy(nas_inmtab_csv, final_loc)
 os.chmod(final_loc, 0644)

Thank you…
I will try to implement this solution