Table of Contents

Using the API on Wanesy Management Cockpit

API documentation

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.

Setting up your environment

Dependencies

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

Authentication

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.

Run the scripts

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.

API usage examples

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.

Authenticating

The directory authentification/ contains the following example scripts:

Managing the customers

The directory customers/ contains the following example scripts:

Managing the users

The directory users/ contains the following example scripts:

Managing & monitoring the gateways

The directory gateways/ contains the following example scripts:

Managing the groups

The directory groups/ contains the following example scripts:

Managing & monitoring the actions

The directory actions/ contains the following example scripts: