10.4.2.1. Soap API Client

class pytan3.api_clients.Soap(http_client, auth_method, ver_check=True, lvl='info')[source]

Bases: pytan3.api_clients.ApiClient

Client for making SOAP API requests to Tanium.

__init__(http_client, auth_method, ver_check=True, lvl='info')[source]

Constructor.

Parameters:
log = None

logging.Logger – Log for this object.

__str__()[source]

Show object info.

Returns:str
__repr__()[source]

Show object info.

Returns:str
__call__(data, timeout=30, **kwargs)[source]

Get response of POST of data to /soap and return a response object.

Parameters:
  • data (str) – Body to send in request.
  • timeout (int, optional) –

    Response timeout.

    Defaults to: 30.

  • **kwargs
    cause (str):
    String to explain purpose of request.

    Defaults to: “”.

    headers (dict):
    Headers to send in request.

    Defaults to: {}.

Returns:

requests.Response

classmethod get_name()[source]

Get the ref name of this object for use by load().

Returns:str
classmethod get_type()[source]

Get the ref type of this object for use by load_type().

Returns:str
classmethod get_version_req()[source]

Get the min, max, and eq version requirements of this class.

Notes

Dict can specify keys: “vmin”, “vmax”, “veq”.

This class method gets called by pytan3.utils.versions.version_check_obj_req() to perform version checks.

Returns:dict
auth_method

Get the AuthMethod for this object.

Returns:pytan3.auth_methods.AuthMethod
http_client

Get the HTTP Client for this object.

Returns:pytan3.http_client.HttpClient
url

Get the URL from ApiClient.http_client.

Returns:str
version

Get the platform version from ApiClient.config.

Returns:str
config

Get the deserialized config.json from ApiClient.url.

Returns:dict
info

Get the deserialized info.json from ApiClient.url.

Returns:dict
_abc_impl = <_abc_data object>