-
Notifications
You must be signed in to change notification settings - Fork 2
Home
This package is intended to provide both an SDK and CLI for the Aeris connectivity APIs. It can also serve as sample code for customers to write their own integrations to Aeris APIs.
This is not production code. There is no formal support provided by Aeris for this SDK.
OS environments tested so far:
- Ubuntu 18 on Windows 10
- Windows 10 cmd shell
Python environments tested so far:
- Python 3.7.5 / pip 19.3.1
Installation / upgrade:
$ pip install aerisapisdk
$ pip install --upgrade aerisapisdk
Alternatively:
$ pip3 install aerisapisdk
$ pip3 install --upgrade aerisapisdk
Run:
$ aeriscli (Runs this way because aericli script gets installed in python/bin or python/scripts directory)
$ python -m aerisapisdk.cli (Run via module command)
Alternatively:
$ python3 -m aerisapisdk.cli (Run via module command)
The --help option can be used at any level to get more information about usage
$ aeriscli --help
Usage: aeriscli [OPTIONS] COMMAND [ARGS]...
Options:
-v, --verbose Verbose output
-cfg, --config-file TEXT Path to aservices config file.
--help Show this message and exit.
Commands:
aeradmin AerAdmin API Services
aerframe AerFrame API Services
aertraffic AerTraffic API Services
config Set up the configuration for using this tool
ping Simple ping of the api endpoints
This is the most simple command you can run without any configuration.
$ aeriscli ping
Checking all api endpoints ...
Checking all api endpoints ...
Endpoint is alive: https://aeradminapi.aeris.com/AerAdmin_WS_5_0/rest/
Endpoint is alive: https://aertrafficapi.aeris.com/
Endpoint is alive: https://api.aerframe.aeris.com/registration/v2/1/applications
Endpoint is alive: https://longpoll.aerframe.aeris.com
For nearly all commands, you will need to configure the SDK with information about your Aeris account. Run the config command and log into the AerPort portal in order to identify your account number and API key. You must configure the tool with at least one device ID in order to complete the configuration.
$ aeriscli config
Used to interact with the AerAdmin API
$ aeriscli aeradmin --help
Usage: aeriscli aeradmin [OPTIONS] COMMAND [ARGS]...
AerAdmin API Services
Options:
--help Show this message and exit.
Commands:
device AerAdmin get device details
network AerAdmin get device network details
Used to interact with the AerTraffic API
$ aeriscli aertraffic --help
Usage: aeriscli aertraffic [OPTIONS] COMMAND [ARGS]...
AerTraffic API Services
Options:
--help Show this message and exit.
Commands:
devicesummaryreport
Used to interact with the AerFrame API
$ aeriscli aerframe --help
Usage: aeriscli aerframe [OPTIONS] COMMAND [ARGS]...
AerFrame API Services
Options:
--help Show this message and exit.
Commands:
application AerFrame application commands
channel AerFrame notification channel commands
init Initialize application, notification channel, and...
network AerFrame network commands
sms AerFrame SMS commands
subscription AerFrame subscription commands
This command provides the simple way to fully initialize AerFrame so it is ready to send an SMS. It creates an AerFrame application named 'aerframesdk', creates a notification channel, and creates a subscription.
$ aeriscli aerframe init
aerframesdk application does not exist
Created application aerframesdk
aerframesdk channel does not exist
Created notification channel for aerframesdk
aerframesdk has no outbound (MT-DR) subscriptions.
Created outbound (MT-DR) subscription for aerframesdk
$ aeriscli aerframe sms send
AerFrame sms commands
Sent SMS:
{
"address": [
"204043396465339"
],
"senderAddress": "aerframesdk",
"senderName": "aerframesdk",
"outboundSMSTextMessage": {
"message": "Test from aerframesdk."
},
"clientCorrelator": "123456",
"resourceURL": "https://api.aerframe.aeris.com/smsmessaging/v2/1/outbound/aerframesdk/requests/001ec873-443a-0567-46c3-2ceb24b7d646"
}