session#
The following methods allow for interaction with the ZCON Session API endpoints.
Methods are accessible via zcon.session
- class ZCONSessionAPI#
- create(api_key, username, password)#
Create a new ZCON authentication session.
- Parameters:
- Returns:
The authenticated session information.
- Return type:
Box
Examples
Create a new authentication session:
zcon.session.create( api_key='123456789', username='admin@example.com', password='MyInsecurePassword' )
- delete()#
End the authentication session.
- Returns:
The status code of the operation.
- Return type:
Examples
End the authentication session:
print(zcon.session.delete())
- status()#
Returns the status of the authentication session if it exists.
- Returns:
Session authentication information.
- Return type:
Box
Examples
Check the status of the authentication session:
print(zcon.session.status())