For whatever reason, Forescout has four different APIs to query. This library attempts to simplify things and provide functions for common use cases.
- a Web API Account (Forescout Console > Options > Web API > User Settings)
- an IP ACL (Forescout Console > Options > Web API > Client IPs)
- a CounterACT Web Service Account (Forescout Console > Options > Data Exchange (DEX) > CounterACT Web Service > Accounts)
- an IP ACL (Forescout Console > Options > Data Exchange (DEX) > CounterACT Web Service > Security Settings)
- a standard CounterACT User Profile with relevant privledges (Forescout Console > Options > CounterACT User Profiles)
- an IP ACL for REST API (Forescout Console > Options > Access > Web)
from pyForescout import *
host = getHost("192.168.1.1")
pprint(host)
Error Handling