BaseApi
Overview
Base class to be used for all API implementations. Takes auth and connection information to create a session to the NAS.
The session is created on instantiation.
If accessing the NAS through a remote connection, it is advised to use HTTPS to connect to it. Please make sure the certificate is valid.
Parameters
ip_address str
The IP/DNS address of the NAS.
port str
The port of the NAS. Defaults to 5000.
username str
The username to use for authentication.
password str
The password to use for authentication.
secure bool
Whether to use HTTPS or not. Defaults to False.
cert_verify bool
Whether to verify the SSL certificate or not. Defaults to False.
dsm_version int
The DSM version. Defaults to 7.
debug bool
Whether to print debug messages or not. Defaults to True.
otp_code str
The OTP code to use for authentication. Defaults to None.
Methods
logout
Close the current session.