centreonapi.webservice package

Module contents

class centreonapi.webservice.Webservice[source]

Bases: object

Class for call Centreon Web Rest webservices

auth()[source]

Authenticate to the webservices

call_clapi(action=None, obj=None, values=None)[source]

Call an endpoint of Centreon Web for clapi wrapper

Parameters:
  • action (String) – The clapi action
  • obj (String) – The clapi object
  • values (mixed) – The values for the call
Returns:

The response of call

Return type:

dict

centreon_realtime(action=None, obj=None, values=None)[source]
static getInstance(url=None, username=None, password=None, check_ssl=True)[source]

Get an unique instance of the webservices

Parameters:
  • url (String) – The Centreon Web URL
  • username (String) – The username for connect to Centreon Web webservices
  • password (String) – The password for connect to Centreon Web webservices
isLoaded()[source]

Test if webservices configuration is loaded

Returns:If the webservices configuration is loaded
Return type:Boolean
load(url, username, password, check_ssl=True)[source]

Load configuration for webservices

Parameters:
  • url (String) – The Centreon Web URL
  • username (String) – The username for connect to Centreon Web webservices
  • password (String) – The password for connect to Centreon Web webservices