This repository contains three files that enable you to send sample data to Fogwing IoTHub via API using API Key.
Note: This SDK is subject to change as it is currently in preview.
To simulate data to Fogwing using an API, you will need to download the following files:
Note: The purpose of the code is to send sample data over Fogwing IoTHub using an API client. To achieve this, you can modify the configuration.json file to configure the Fogwing IoTHub credentials and customize the sample data as needed.
- Move downloaded files to a directory of your choice on your system. Once you have done this, you can proceed with the next steps.
-
You can install all the required libraries using pip and the requirements.txt file provided using follwing command.
pip install -r requirements.txt
- To update credentials for Fogwing IoTHub access, you need to modify the configuration.json file.
- Replace the placeholder values of USERNAME and PASSWORD with your Fogwing IoTHub access credentials and save the file.
- To run the program, use the following command.
python fw_apikey_client.py
Note: If everything goes according to the instructions mentioned above, you should see
{"statusCode":201,"message":"Created","description":"The Request Has Succeeded","data":"Successfully published"}
message displayed on the Terminal.
- Now you are ready to analyze your data at Fogwing Platform portal, you can check all the data within the data storage in the portal.