Appendix E - A.i.m. Api - ADDER A.I.M. User Manual

Adderlink infinity manager
Table of Contents

Advertisement

APPeNDIX e - A.I.M. API

The A.I.M. API provides access for external applications to key routines used within the
A.I.M. server. This appendix provides a reference to the available methods.
API version: 2
changelog
• v2 (A.I.M. v2.3) - added get_devices, get_channels, connect_channel, disconnect_channel.
Updated version compatibility information.
• v1 (A.I.M. v1.3) - added login, logout, get_presets, connect_preset, disconnect_preset
Methods
login
(http://<A.I.M..ip.address>/api/#login)
logout
(http://<A.I.M..ip.address>/api/#logout)
get_devices
(http://<A.I.M..ip.address>/api/#get_devices)
get_channels
(http://<A.I.M..ip.address>/api/#get_channels)
get_presets
(http://<A.I.M..ip.address>/api/#get_presets)
connect_channel
(http://<A.I.M..ip.address>/api/#connect_channel)
connect_preset
(http://<A.I.M..ip.address>/api/#connect_preset)
disconnect_channel
(http://<A.I.M..ip.address>/api/#disconnect_channel)
disconnect_preset
(http://<A.I.M..ip.address>/api/#disconnect_preset)
login
This method was last updated in API version 1, and is compatible with API requests from version
1 onwards.
The API will require a valid A.I.M. user's login credentials to be presented in the first
request. The API will return an authentication code, which must be passed in all future
requests. This authentication code can be re-used until a logout request is made, at which
point the authentication code will no longer be valid.
The concept of an 'anonymous user' can apply to the API. If no login username and
password are provided, the API will return an authentication token for the anonymous
user (either the same one as for the OSD, or else an 'anonymous API user' account can
be created).
Input parameters:
- username
- password
- v (the A.I.M. API version this request is designed for)
Output values:
- timestamp - the current server time
- version - the current API version number
- token - an authentication code for future API requests
- success
Examples
Input:
/api/?v=1&method=login&username=xxxxx&password=xxxxx
Output:
<api_response>
<version>1</version>
<timestamp>2012-12-14 12:12:12</timestamp>
<success>1</success>
<token>5cf494a71c29e9465a57a81e0a2d602c</token>
</api_response>
or
<api_response>
<version>1</version>
<timestamp>2012-12-14 12:12:12</timestamp>
<success>0</success>
<errors>
<error>
<code>2</code>
<msg>Invalid username or password</msg>
</error>
</errors>
</api_response>
49

Advertisement

Table of Contents
loading

This manual is also suitable for:

Infinity aimAdderlink infinityInfinity

Table of Contents