The Wanesy Management Cockpit exposes an API for integration with your information system.
The following documentation describes all available API methods as well as the expected parameters and format for using them:
API Web services documentation (online)
To help you better understand how to interact with this API, we provide some code examples which consist of a series of Python scripts demonstrating various functionalities of Wanesy Management Cockpit.
To install the dependencies needed to run the scripts, you can use the requirements.txt
file.
Make sure you have a Python environment configured and enabled before running the following command:
pip install-requirements.txt
This command will use pip
(the Python package manager) to install all the Python libraries listed in the requirements.txt
file.
This ensures that all dependencies required to run the examples are correctly installed in your environment.
If your python interpreter doesn't find your module to authenticate, add your module to the PYTHONPATH environment with the following command (replace YOUR_PATH by your real PATH):
export PYTHONPATH=$PYTHONPATH:YOUR_PATH/examples
Before running the scripts, ensure you have valid credentials for authentication with the Wanesy Management Cockpit API.
For that, you need to configure the authentication information in the authentification.py
or authentification_function.py
files.
Choose a file, enter your authentication information and run.
Sometimes you will need to enter others parameters like the customer ID, the group ID or the gateway EUI.
The following archive contains the set of Python scripts: wanesy_management_cockpit_api_examples.zip
Each script provides examples of usage along with explanations of the functionality it covers.
The directory authentification/
contains the following example scripts:
authentification.py
for authenticating with the Wanesy Management Cockpit API using basic authenticationauthentification_function.py
for authenticating with the Wanesy Management Cockpit API and obtain authentication headers
The directory customers/
contains the following example scripts:
create_customer.py
for creating a new customerget_list_customers.py
for listing customersget_specific_customer.py
for getting a specific customer
The directory users/
contains the following example scripts:
create_user.py
for creating a new userget_list_users.py
for listing usersget_specific_user.py
for getting a specific user
The directory gateways/
contains the following example scripts:
create_gateway.py
for creating a new gatewayget_connection_status_gateway.py
for getting connection status of a gateway get_health_data_gateway.py
for getting health information of a gatewayget_list_gateway.py
for listing gateways of a specific customer, without paginationget_full_list_gateway.py
for listing all gateways of a specific customer, with pagination loop
The directory groups/
contains the following example scripts:
create_group.py
for creating a new groupget_specific_group.py
for getting a specific groupput_gateway_in_specific_group.py
for putting a gateway in a specific groupget_list_gateway_in_specific_group.py
for listing all gateways of a specific group
The directory actions/
contains the following example scripts:
get_actions_definitions.py
for getting all actions definitionsgateways_actions.py
for creating a new action for a gateway, getting its status and cancelling itgroups_actions.py
for creating a new action for a group, getting its status and cancelling it