FortiSIEM Get the List of Monitored Organizations

Get the List of Monitored Organizations

Applies To

API Parameters

Sample XML Output

Sample Code

Applies To

Multitenant deployments

API Parameters
Methodology REST API based: make an HTTP(S) request with an input XML (optional). An output XML is returned.
Input URL https:///phoenix/rest/config/Domain
Input Credentials  Username and password of Super account
Output  An XML that contains Organization id, Organization name, Status, Included and Excluded IP range

Sample XML Output

Sample Code

This sample python script takes the Super credentials as arguments and writes out the parsed XML output file in a comma separated value (CSV) format on the screen. The output can be redirected to a file if needed.

mapping={‘name’:”, ‘domainId’:”, ‘disabled’:”, ‘initialized’:”, ‘include’:”, ‘exclude’:”}             for node2 in node1.getElementsByTagName(“domainId”):                for node3 in node2.childNodes:                   if node3.nodeType==Node.TEXT_NODE:                      mapping[‘domainId’]=node3.data                for node4 in node1.getElementsByTagName(“excludeRange”):                   for node5 in node4.childNodes:                      if node5.nodeType==Node.TEXT_NODE:                         mapping[‘exclude’]=node5.data                for node6 in node1.getElementsByTagName(“includeRange”):                   for node7 in node6.childNodes:                      if node7.nodeType==Node.TEXT_NODE:                         mapping[‘include’]=node7.data                for node8 in node1.getElementsByTagName(“name”):                   for node9 in node8.childNodes:                      if node9.nodeType==Node.TEXT_NODE:                         mapping[‘name’]=node9.data                for node10 in node1.getElementsByTagName(“disabled”):                   for node11 in node10.childNodes:                      if node11.nodeType==Node.TEXT_NODE:                         mapping[‘disabled’]=node11.data                for node12 in node1.getElementsByTagName(“initialized”):                   for node13 in node12.childNodes:                      if node13.nodeType==Node.TEXT_NODE:                         mapping[‘initialized’]=node13.data                param.append(mapping)    return param def generateResult(param):    print “Org Name,Org Id,Disabled,Initialized,Include Range,Exclude Range\n\n”    for item in param:

print “%s,%s,%s,%s,%s,%s\n” % (item[‘name’], item[‘domainId’], item[‘disabled’], item[‘initialized’], item[‘include’], item[‘exclude’]) if __name__==’__main__’:

import sys    if len(sys.argv)!=4:

print “Usage: GetMonitoredOrganizations.py appServer user password”       exit()


Having trouble configuring your Fortinet hardware or have some questions you need answered? Check Out The Fortinet Guru Youtube Channel! Want someone else to deal with it for you? Get some consulting from Fortinet GURU!

This entry was posted in Administration Guides, FortiSIEM on by .

About Mike

Michael Pruett, CISSP has a wide range of cyber-security and network engineering expertise. The plethora of vendors that resell hardware but have zero engineering knowledge resulting in the wrong hardware or configuration being deployed is a major pet peeve of Michael's. This site was started in an effort to spread information while providing the option of quality consulting services at a much lower price than Fortinet Professional Services. Owns PacketLlama.Com (Fortinet Hardware Sales) and Office Of The CISO, LLC (Cybersecurity consulting firm).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.