'''APIKeys=======Methods described in this section relate to the APIKeys API.These methods can be accessed at ``TenableIE.api_keys``... rst-class:: hide-signature.. autoclass:: APIKeyAPI :members:'''fromtenable.base.endpointimportAPIEndpoint
[docs]defget(self)->str:''' Gets the API Key of the current user. Examples: >>> tie.api_keys.get() '''returnself._get(box=True).key
[docs]defrefresh(self)->str:''' Creates or renews an API for the current user. Will also refresh the API Key used in the current TenableIE session. Examples: >>> tie.api_keys.refresh() '''key=self._post(json={},box=True).keyself._api._key_auth(key)returnkey