AnsweredAssumed Answered

Simply query for all SiteShield maps?

Question asked by Gunther Kochmann Employee on Jan 9, 2017
Latest reply on Jan 12, 2017 by Gunther Kochmann

Dear OPEN experts,

 

I came across this question about why an API query for SiteShield maps in an account returns no content. Since I am no expert at all on APIs yet, I might miss the obvious.

 

Code is as follows:

 

if __name__ == "__main__":
   groupInfo = getGroup()
   first_account = groupInfo["accountId"]
   irst_account_string = re.search('act_(.+?)$', first_account)
   first_account = first_account_string.group(1)
   groups = groupInfo["groups"]["items"]
   #print (groupInfo)
   for group in groups:
      groupId = group["groupId"]
      #print "Group id is group %s" %(groupId)
      if "contractIds" in group:
         for contractId in group["contractIds"]:
            if groupId == "grp_XXXXX":
               maplist = httpCaller.getResult('/siteshield/v1/maps')
               #print (maplist)
               for siteShieldMaps in maplist:
                  print (maplist)

 

What are we doing wrongly here? Is there a recommended way of obtaining a simple list of SiteShield maps provisioned?

 

Thanks,

Gunther

Outcomes