search

zenApiLib

Overview

zenApiLib is available at https://github.com/zenoss/zenoss-RM-api/ as an unofficial tool for leveraging the Zenoss Resource Manager and Collection Zone APIs.

zenApiLib

  • leverages python logging library
  • paging API support; leverage router methods 'limit' parameter to break large results queries into manageable chunks
  • API result error checking
    • Content-Type JSON, return decoded json object
    • Content-Type HTML, return error w/ HTML page title
    • Misc
  • API call error checking
    • Validate specified Router exists
    • Validate called method exists
  • backward compatibility w/ zenoss_api.ZenAPIConnector.ZenAPIConnector
  • support multiple zenoss instance definitions in credential file
    • credential file name defaults to 'creds.cfg' and same directory as zenApiLib.py file
    • ability to specify credential file
  • 'zenApiCli.py' script available. For simple, command line API interaction. Can be easily incorporated with existing shell scripts.


API Router Helper Libraries

Files: zenApiDeviceRouterHelper.py, zenApiImpactRouterHelper.py

Helper libraries that are router specific, should contain common, repeatedly-used functionality.


Leveraging zenApiLib