Loading...
 

ALIF: API

The AIM API provides access for external applications to key routines used within the AIM. server. This page provides a reference to the available methods.

 Note

The API is documented as an HTML file and is found by going to the following address:
http://<IPADDRESS>/api where <IPADDRESS> is the IP address of the AIM Manager.

A windows application called the AIM Controller is available for download, whose purpose is to demo and show you the API working in action.

Best Practices

  • Do not login and generate a new token for every API request. When you first connect to the AIM, login and store a copy of the token that you are given, and use it for future requests. Each token that you request, creates a stored session within the AIM Manager. The duration of the session is defined by the AIM's Admin timeout that is set on the web interface under Dashboard -> Settings -> General. Creating a new token on every request will result in hundreds if not thousands of stored sessions, each taking a small amount of space on the AIM's SSD drive. If a particularly long session duration is set, for example 3 years then this could easily fill the drive over time since they don't get deleted until they expire.
  • Do not keep the HTTP port open. When making a request, simply send the api command, wait for the response and then close the connection. A typical web browser will fetch the html page and its associated files such as images, javascripts and ccs files and then close the connection. The AIM runs a standard Apache web service. There is no guarantee that the HTTP connection that you initially establish will always remain open.
  • The API is restful based, this means that you have to periodically request information from the AIM and compare the previous and latest responses to see what has changed. Be careful not to continuously send API requests as they consume resources on the AIM. Requesting the Devices, Channels, Presets and C-USB information every 5-10 seconds should usually suffice to monitor changes.
  • Session tokens are linked to the IP address of the host that connected to the AIM. If you change the IP address of the host and use the same token then the API will throw an error telling you that there is a mis-match.
  • On the AIM Controller API demo the procedure below has been used when sending API requests. This ensures that you are working with a valid token, assuming your login credentials are correct. The initial API request does not send a token, however the procedure takes care of that.

Example Connection Procedure

  1. Establish the HTTP connection.
  2. Send the API request (with the stored token, if known)
  3. Read the response.
    • If the response is a Login error then
      • Send a login request with the appropriate username and password.
      • Read the response.
      • If the login request is successful, extract and store the new token.
        • Go back to step 2 and resend the original API request with the stored token.
      • If the login request fails, then handle appropriately.
    • If the response is different error then handle it appropriately.
  4. Close the HTTP connection.
  5. Process the response.

Repeat above procedure for the next API command.

Using a Web Browser to test the API

You can use a web browser to issue test API commands to the AIM Manager, however, when you authenticate and receive a token, a web session is also created between the browser and AIM. If you try to use the same web browser to also access the AIM's admin web interface, a different session will be created. This can cause the API token to become invalid on the browser. To resolve this, it is recommended that you use two different web browsers, for example, Google Chrome for the API and FireFox for the AIM's admin web interface. This will allow two different sessions to operate simultaneously. This only affects web browsers.

API Version: 7

Change Log

  • v7 (AIM v4.8) - added reboot_devices.
  • v6 (AIM v4.5) - added get_all_c_usb, delete_c_usb, update_c_usb, connect_c_usb, disconnect_c_usb.
  • v5 (AIM v4.3) - added update_device; updated get_devicesconnect_channelconnect_presetcreate_channelcreate_preset.
  • v4 (AIM v4.1) - added create_channeldelete_channel; updated get_channels.
  • v3 (AIM v3.2) - added create_presetdelete_preset.
  • v2 (AIM v2.3) - added get_devicesget_channelsconnect_channeldisconnect_channel. Updated version compatibility information.
  • v1 (AIM v1.3) - added loginlogoutget_presetsconnect_presetdisconnect_preset

 

Methods

login
logout
get_devices
get_channels
get_presets
connect_channel
connect_preset
disconnect_channel
disconnect_preset
create_preset
delete_preset
create_channel
delete_channel
update_device
get_all_c_usb
delete_c_usb
update_c_usb
connect_c_usb
disconnect_c_usb
reboot_devices

 

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 AIM 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 AIM 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>

 

logout

This method was last updated in API version 1, and is compatible with API requests from version 1 onwards
The authentication token provided by the 'login' method can be used until the
'logout' method is called.

Input parameters:
- token
- v (the AIM API version this request is designed for)

Output values:
- timestamp - the current server time
- success - 0 = fail, 1 = success

Examples

Input:

/api/?method=logout&token=xxxxx&v=1

Output:

<api_response>
<version>1</version>
<timestamp>2011-02-04 15:24:15</time>
<success>1</success>
</api_response>


or

<api_response>
<version>1</version>
<timestamp>2012-12-12 12:12:12</timestamp>
<success>0</success>
<errors>
<error>
<code>3</code>
<msg>Error logging out (you may already have logged out)</msg>
</error>
</errors>
</api_response>


 

get_devices

This method was last updated in API version 5, and is compatible with API requests from version 2 onwards
This method returns a list of devices.

Input parameters:
- token
- v (the AIM API version this request is designed for)
- device_type ('rx' = receivers, 'tx' = transmitters. Default = 'rx')
- filter_d_name (Optional. Device name search string)
- filter_d_description (Optional. Device description search string)
- filter_d_location (Optional. Device location search string)
- sort (Optional. Sort results by 'name'/'description'/'location'. Default = 'name')
- sort_dir (Optional. Sort direction for results 'asc'/'desc'. Default = 'asc')
- status (Optional. '','outdated_aim_ip','rebooting','offline','outdated_firmware','invalid_backup_firmware','rebooting','upgrading_firmware','backup_mode')
- show_all (Optional. If set and not blank, shows all receivers, not just those the logged-in user is permitted to use)
- page (page number to start showing results for, default = 1)
- results_per_page (number of results per page, default = 1000)

Output values:
- version - the current API version number
- timestamp - the current server time
- success
- page (page number)
- results_per_page (number of results per page, default = unlimited)
- total_devices - the total number of devices
- count_devices - the number of devices on this page
- for each device:
- attribute: item (e.g. 17th device)
- d_id (device ID)
- d_serial_number (the device's serial number, if it is reported)
- d_mac_address (MAC address for interface 1)
- d_mac_address2 (MAC address for interface 2)
- d_name (device name)
- d_online (0 = interface 1 offline, 1 = interface 1 online)
- d_online2 (0 = interface 2 offline, 1 = interface 2 online)
- d_type (rx, tx)
- d_version (1 = ALIF1000R/ALIF1000T, 2 = all other devices)
- d_variant ('b' = ALIF2002T, 'v' = ALIF2112T, 's' = ALIF1002R/ALIF1002T, 't' = ALIF2020R/ALIF2020T)
- d_ip_address (IP address for interface 1)
- d_ip_address2 (IP address for interface 2)
- d_description (device description)
- d_location (device location)
- d_configured (0 = no, 1 = yes)
- d_valid_firmware (0 = no, 1 = yes)
- d_valid_backup_firmware (0 = no, 1 = yes)
- d_firmware (firmware version, e.g. 2.5.17879)
- d_backup_firmware (backup firmware version)
- d_date_added (Date device added to AIM network e.g. 2012-07-13 22:17:22)
- d_status (0 = device offline, 1 = device online, 2 = rebooting, 4 = firmware_upgrading, 6 = running backup firmware)
The following property is only returned for transmitters:
- count_transmitter_channels (the number of channels containing this transmitter)
- count_transmitter_presets (the number of presets containing this transmitter)
The following properties are only returned for receivers:
- con_exclusive (0/1 - if the last connection is/was in private mode)
- con_control (1/2/3 - 1 if the last connection is/was video-only, 2 if in exclusive mode, 3 if in shared mode)
- con_start_time (start time of last connection e.g. 2012-09-07 13:33:17)
- con_end_time (empty if connection still active, else date/time the connection was ended e.g. 2012-09-07 13:33:17)
- u_username (username of the user who initiated the last connection)
- u_id (user ID of the user who initiated the last connection)
- c_name (name of the channel last connected)
- count_receiver_groups (the number of receiver groups this receiver is a part of)
- count_receiver_presets (the number of presets this receiver is a part of)
- count_users (the number of users who have access to this receiver)

Examples

Input:

/api/?v=2&method=get_devices&token=xxxxx
/api/?v=2&method=get_devices&device_type=tx&page=2&results_per_page=3&token=xxxxx


Output:

<api_response>
<version>2</version>
<timestamp>2012-09-12 14:56:11</timestamp>
<success>1</success>
<page>2</page>
<results_per_page>3</results_per_page>
<total_devices>12</total_devices>
<count_devices>3</count_devices>
<devices>
<device item="4">
<d_id>170</d_id>
<d_serial_number>1409A0000159</d_serial_number>
<d_mac_address>00:0F:58:01:6E:3D</d_mac_address>
<d_mac_address2>00:0F:58:5B:6E:3D</d_mac_address2>
<d_name>RX 123</d_name>
<d_online>1</d_online>
<d_online2>0</d_online2>
<d_type>rx</d_type>
<d_version>2</d_version>
<d_variant></d_variant>
<d_ip_address>10.10.10.66</d_ip_address>
<d_ip_address2>10.10.10.67</d_ip_address2>
<d_description></d_description>
<d_location>Server Rack 3</d_location>
<d_configured>1</d_configured>
<d_valid_firmware>1</d_valid_firmware>
<d_valid_backup_firmware>1</d_valid_backup_firmware>
<d_firmware>2.3.16682</d_firmware>
<d_backup_firmware>2.3.16682</d_backup_firmware>
<d_date_added>2012-07-14 01:37:07</d_date_added>
<d_status>1</d_status>
<con_exclusive>0</con_exclusive>
<con_control>1</con_control>
<con_start_time>2012-09-07 13:33:19</con_start_time>
<con_end_time/>
<u_username>admin</u_username>
<u_id>1</u_id>
<c_name>Channel 1</c_name>
<count_receiver_groups>1</count_receiver_groups>
<count_receiver_presets>2</count_receiver_presets>
<count_users>1</count_users>
</device>
</devices>
</api_response>

<api_response>
<version>2</version>
<timestamp>2012-09-12 14:56:11</timestamp>
<success>1</success>
<page>1</page>
<results_per_page>1</results_per_page>
<total_devices>1</total_devices>
<count_devices>1</count_devices>
<devices>
<device item="1">
<d_id>64</d_id>
<d_serial_number/>
<d_mac_address>00:0F:58:01:56:85</d_mac_address>
<d_mac_address2>00:0F:58:5B:56:85</d_mac_address2>
<d_name>TX 456</d_name>
<d_online>0</d_online>
<d_online2>0</d_online2>
<d_type>tx</d_type>
<d_version>1</d_version>
<d_variant></d_variant>
<d_ip_address>1.1.201.31</d_ip_address>
<d_ip_address2>1.1.201.32</d_ip_address2>
<d_description></d_description>
<d_location></d_location>
<d_configured>1</d_configured>
<d_valid_firmware>1</d_valid_firmware>
<d_valid_backup_firmware>1</d_valid_backup_firmware>
<d_firmware>2.1.15747</d_firmware>
<d_backup_firmware>2.1.15747</d_backup_firmware>
<d_date_added>2012-07-13 17:50:04</d_date_added>
<d_status>0</d_status>
<count_transmitter_channels>3</count_transmitter_channels>
<count_transmitter_presets>1</count_transmitter_presets>
</device>
</devices>
</api_response>


 

get_channels

This method was last updated in API version 4, and is compatible with API requests from version 2 onwards
This method returns a list of channels available to the authenticated user, for a specific receiver.
It was updated in version 4 to include additional information.

Input parameters:
- token
- v (the AIM API version this request is designed for)
- page (page number to start showing results for, default = 1)
- results_per_page (number of results per page, default = 1000)
- device_id (ID of the receiver that this channel will be connected to. Recommended to ensure full checks for connection mode availability.
- filter_c_name (channel name search string)
- filter_c_description (channel description search string)
- filter_c_location (channel location search string)
- filter_favourites (set this non-empty to only show a user's favourites)

Output values:
- version - the current API version number
- timestamp - the current server time
- success
- page (page number)
- results_per_page (number of results per page, default = unlimited)
- count_channels - the number of channels on this page, available to the authenticated user
- for each channel:
- attribute: item (e.g. 17th channel)
- c_id (channel id)
- c_name (channel name)
- c_description (channel description)
- c_location (channel location)
- c_favourite (true if this channel is in the user's favourites, 0-9 if it's a numbered shortcut)
- view_button (disabled/enabled/hidden - whether the user can connect to the preset in video-only mode.
disabled = no, because something is in use by someone else. hidden = never. enabled = yes
If the device_id of the proposed receiver to be used in the connection is not provided,
this will not necessarily be an accurate indication of whether other connections may actually interfere)
- shared_button (disabled/enabled/hidden - as above, but in shared mode)
- control_button (disabled/enabled/hidden - as above, but in exclusive mode)
- exclusive_button (disabled/enabled/hidden - as above, but in private mode)

Additional channel output values in version 4:
- c_video1 (device ID)
- c_video1_head (1|2)
- c_video2 (device ID)
- c_video2_head (1|2)
- c_audio (device ID)
- c_usb (device ID)
- c_serial (device ID)

Examples

Input:

/api/?v=2&method=get_channels&token=xxxxx

Version 2 output:

<api_response>
<version>2</version>
<timestamp>2012-12-14 12:12:12</timestamp>
<success>1</success>
<page>1</page>
<results_per_page>10</results_per_page>
<count_channels>2</count_channels>
<channels>
<channel item="1">
<c_id>3</c_id>
<c_name>Channel 1</c_name>
<c_description>Description for Channel 1</c_description>
<c_location>Location of Channel 1</c_location>
<c_favourite>false</c_favourite>
<view_button>disabled</view_button>
<shared_button>disabled</shared_button>
<control_button>disabled</control_button>
<exclusive_button>disabled</exclusive_button>
</channel>
<channel item="2">
<c_id>5</c_id>
<c_name>Channel 2</c_name>
<c_description>Description for Channel 2</c_description>
<c_location>Location of Channel 2</c_location>
<c_favourite>2</c_favourite>
<view_button>enabled</view_button>
<shared_button>enabled</shared_button>
<control_button>enabled</control_button>
<exclusive_button>hidden</exclusive_button>
</channel>
</channels>
</api_response>


 

get_presets

This method was last updated in API version 1, and is compatible with API requests from version 1 onwards
This simple method returns a list of presets available to the authenticated user.

Input parameters:
- token
- v (the AIM API version this request is designed for)
- results_per_page (number of results per page, default = 1000)
- page (page number to start showing results for, default = 1)

Output values:
- version - the current API version number
- timestamp - the current server time
- success
- page (page number)
- results_per_page (number of results per page, default = unlimited)
- total_presets - the total number of presets available to the authenticaed user
- count_presets - the number of presets on this page, available to the authenticated user
- for each connection_preset:
- attribute: item (e.g. 17th preset)
- cp_id (preset id)
- cp_name (preset name)
- cp_description (preset description)
- cp_pairs (the number of channel-receiver pairs in this preset)
- problem_cp_pairs (the number of channel-receiver pairs that are mis-configured
(e.g. receiver offline, receiver not defined)
- cp_active (whether all, any, or none of the channel-receiver pairs in this preset are
currently connected; values are 'full', 'partial', and 'none')
- connected_rx_count (the number of receivers in this preset that are already connected)
- view_button (disabled/enabled/hidden - whether the user can connect to the preset in video-only mode.
disabled = no, because something is in use by someone else. hidden = never. enabled = yes)
- shared_button (disabled/enabled/hidden - as above, but in shared mode)
- control_button (disabled/enabled/hidden - as above, but in exclusive mode)
- exclusive_button (disabled/enabled/hidden - as above, but in private mode)

Examples

Input:

/api/?v=1&method=get_presets&token=xxxxx

Output:

<api_response>
<version>1</version>
<timestamp>2012-12-14 12:12:12</timestamp>
<success>1</success>
<page>1</page>
<results_per_page>10</results_per_page>
<total_presets>2</total_presets>
<count_presets>2</count_presets>
<connection_preset item="1">
<cp_id>3</cp_id>
<cp_name>Preset 1</cp_name>
<cp_description>Description for Preset 1</cp_description>
<cp_pairs>1</cp_pairs>
<problem_cp_pairs/>
<cp_active>full</cp_active>
<connected_rx_count>1</connected_rx_count>
<view_button>disabled</view_button>
<shared_button>disabled</shared_button>
<control_button>disabled</control_button>
<exclusive_button>disabled</exclusive_button>
</connection_preset>
<connection_preset item="2">
<cp_id>4</cp_id>
<cp_name>Preset 2</cp_name>
<cp_description>Description for Preset 2</cp_description>
<cp_pairs>2</cp_pairs>
<problem_cp_pairs/>
<cp_active>none</cp_active>
<connected_rx_count/>
<view_button>enabled</view_button>
<shared_button>hidden</shared_button>
<control_button>hidden</control_button>
<exclusive_button>hidden</exclusive_button>
</connection_preset>
</api_response>


 

connect_channel

This method was last updated in API version 5, and is compatible with API requests from version 2 onwards
This simple method connects a receiver to a channel.

Input parameters:
- token
- v (the AIM API version this request is designed for)
- c_id - the ID of the channel (acquired from get_channels)
- rx_id - the ID of the receiver (acquired from get_devices)
- mode (optional, 'v', 's', 'e', 'p' - defaults to 's') - the mode in which to connect the channel

Output values:
- version - the current API version number
- timestamp - the current server time
- success (0 = fail, 1 = success)
- errors (optional, if anything went wrong with connecting the channel)

Examples

Input:

/api/?v=5&method=connect_channel&token=xxxxx&c_id=1&rx_id=2&mode=e

Output:

<api_response>
<version>2</version>
<timestamp>2012-12-12 12:12:12</timestamp>
<success>1</success>
</api_response>


or

<api_response>
<version>2</version>
<timestamp>2012-12-12 12:12:12</timestamp>
<success>0</success>
<errors>
<error>
<code>231</code>
<msg>ERROR - private connection not available</msg>
</error>
</errors>
</api_response>


 

connect_preset

This method was last updated in API version 5, and is compatible with API requests from version 1 onwards
This simple method connects all channel-receiver pairs in a preset.

Input parameters:
- token
- v (the AIM API version this request is designed for)
- id - the ID of the preset (acquired from get_presets)
- mode (optional, 'v', 's', 'e', 'p' - defaults to 's') - the mode in which to connect the preset
- force (optional, 0/1 - defaults to 0) - whether to ignore errors with some of the preset's pairs or not

Output values:
- version - the current API version number
- timestamp - the current server time
- success (0 = fail, 1 = success)
- errors (optional, if anything went wrong with connecting the presets)

Examples

Input:

/api/?v=5&method=connect_preset&token=xxxxx&id=1&force=1

Output:

<api_response>
<version>1</version>
<timestamp>2012-12-12 12:12:12</timestamp>
<success>1</success>
</api_response>


or

<api_response>
<version>1</version>
<timestamp>2012-12-12 12:12:12</timestamp>
<success>0</success>
<errors>
<error>
<code>210</code>
<msg>".$config'error_codes'210."</msg>
</error>
</errors>
</api_response>


 

disconnect_channel

This method was last updated in API version 2, and is compatible with API requests from version 2 onwards
This method disconnects a receiver, a number of receivers, or all connected receivers.

Input parameters:
- token
- v (the AIM API version this request is designed for)
- rx_id (ID(s) of the receiver, as an integer, or comma-separated set of integers. Optional. If not supplied, all connections will be ended)
- force - whether to disconnect existing connections by other users, or for offline receivers

Output values:
- version - the current API version number
- timestamp - the current server time
- success (0 = fail, 1 = success)
- errors (if anything failed, details are returned here)

Examples

Input:

/api/?v=2&method=disconnect_channel&token=xxxxx (disconnect all your online, connected channels)
/api/?v=2&method=disconnect_channel&token=xxxxx&rx_id=1 (disconnect channel 1, if you connected it and it's online)
/api/?v=2&method=disconnect_channel&token=xxxxx&rx_id=1,2,3 (disconnect channels 1, 2, and 3, if you connected them and they're online)
/api/?v=2&method=disconnect_channel&token=xxxxx&force=1 (force disconnect all connected channels)
/api/?v=2&method=disconnect_channel&token=xxxxx&rx_id=1,3&force=1 (force disconnect channels 1 and 3)


Output:

<api_response>
<version>2</version>
<timestamp>2012-12-12 12:12:12</timestamp>
<success>1</success>
</api_response>


 

disconnect_preset

This method was last updated in API version 1, and is compatible with API requests from version 1 onwards
This method disconnects all channel-receiver pairs in a preset, or disconnects ALL connections in the whole AIM network.

Input parameters:
- token
- v (the AIM API version this request is designed for)
- id (optional. If not supplied, all connections will be ended)
- force - whether to ignore errors with some of the preset's pairs or not

Output values:
- version - the current API version number
- timestamp - the current server time
- success (0 = fail, 1 = success)
- errors (if anything failed, details are returned here)

Examples

Input:

/api/?v=1&method=disconnect_preset&token=xxxxx&id=1&force=1

Output:

<api_response>
<version>1</version>
<timestamp>2012-12-12 12:12:12</timestamp>
<success>1</success>
</api_response>


 

create_preset

This method was last updated in API version 5, and is compatible with API requests from version 3 onwards
This method creates a new preset.
The API user must have admin privileges to call this method successfully.

Input parameters:
- token
- v (the AIM API version this request is designed for)
- name (the display name for the new preset)
- pairs (a comma-separated list of the channel ID–receiver ID pairs for the preset, where each ID in the pair is separated by a hyphen)
- allowed (the permitted connection modes for the preset. Optional; if omitted, the global setting will be inherited.
Permitted values are any combination of the characters:
v - video-only
s - shared
e - exclusive
p - private

Output values:
- version - the current API version number
- timestamp - the current server time
- success (0 = fail, 1 = success)
- errors (if anything failed, details are returned here)
- id (the ID of the new preset, if it was created)

Examples

Input:

/api/?v=5&method=create_preset&token=xxxxx&name=my_preset&pairs=1-1,1-2,2-3,2-4&allowed=vs

Output:

<api_response>
<version>3</version>
<timestamp>2012-12-12 12:12:12</timestamp>
<success>1</success>
<id>5</id>
</api_response>


 

delete_preset

This method was last updated in API version 3, and is compatible with API requests from version 3 onwards
This method deletes a preset.
The API user must have admin privileges to call this method successfully.

Input parameters:
- token
- v (the AIM API version this request is designed for)
- id (the ID of the preset to be deleted)

Output values:
- version - the current API version number
- timestamp - the current server time
- success (0 = fail, 1 = success)
- errors (if anything failed, details are returned here)

Examples

Input:

/api/?v=3&method=delete_preset&token=xxxxx&id=5

Output:

<api_response>
<version>3</version>
<timestamp>2012-12-12 12:12:12</timestamp>
<success>1</success>
</api_response>


 

create_channel

This method was last updated in API version 5, and is compatible with API requests from version 4 onwards
This method creates a new channel.
The API user must have admin privileges to call this method successfully.
NB that, although the source device ID inputs are each optional, at least one is required.

Input parameters:
- token
- v (the AIM API version this request is designed for)
- name (the display name for the new channel)
- desc (the display description for the new channel. Optional, default is empty.)
- loc (the display location for the new channel. Optional, default is empty.)
- allowed (the permitted connection modes for the channel. Optional; if omitted, the global setting will be inherited.
Permitted values are any combination of the characters:
v - video-only
s - shared
e - exclusive
p - private
- video1 (device ID of video source 1. Optional, default is empty.)
- video1head (video head number for source 1. Optional, default is 1.)
- video2 (device ID of video source 2. Optional, default is empty.)
- video2head (video head number for source 2. Optional, default is 1.)
- audio (device ID of the audio source. Optional, default is empty.)
- usb (device ID of the usb source. Optional, default is empty.)
- serial (device ID of the serial source. Optional, default is empty.)
- groupname (the name of a channel group of which the created channel will be a member. Optional, default is empty.)

Output values:
- version - the current API version number
- timestamp - the current server time
- success (0 = fail, 1 = success)
- errors (if anything failed, details are returned here)
- id (the ID of the new channel, if it was created)

Examples

Input:

/api/?v=5&method=create_channel&token=xxxxx&name=my_channel&video1=21&audio=81&groupname=my_channel_group

Output:

<api_response>
<version>3</version>
<timestamp>2012-12-12 12:12:12</timestamp>
<success>1</success>
<id>91</success>
</api_response>


 

delete_channel

This method was last updated in API version 4, and is compatible with API requests from version 4 onwards
This method deletes a channel.
The API user must have admin privileges to call this method successfully.

Input parameters:
- token
- v (the AIM API version this request is designed for)
- id (the ID of the channel to be deleted)

Output values:
- version - the current API version number
- timestamp - the current server time
- success (0 = fail, 1 = success)
- errors (if anything failed, details are returned here)

Examples

Input:

/api/?v=4&method=delete_channel&token=xxxxx&id=5

Output:

<api_response>
<version>4</version>
<timestamp>2012-12-12 12:12:12</timestamp>
<success>1</success>
</api_response>


 

update_device

This method was last updated in API version 5, and is compatible with API requests from version 5 onwards
This method updates the description and location fields for a device.
The API user must have admin privileges to call this method successfully.

Input parameters:
- token
- v (the AIM API version this request is designed for)
- id (the ID of the device to be updated)
- desc (the display description for the device. Optional, if not supplied, the description will not be changed. To delete an existing value, set it to the underscore character.)
- loc (the display location for the new channel. Optional, if not supplied, the location will not be changed. To delete an existing value, set it to the underscore character.)

Output values:
- version - the current API version number
- timestamp - the current server time
- success (0 = fail, 1 = success)
- errors (if anything failed, details are returned here)

Examples

Input:

/api/?v=5&method=update_device&token=xxxxx&id=1501&desc=John's Desk&loc=room 5

Output:

<api_response>
<version>5</version>
<timestamp>2012-12-12 12:12:12</timestamp>
<success>1</success>
</api_response>


 

get_all_c_usb

This method was last updated in API version 6, and is compatible with API requests from version 6 onwards
This method returns a list of the C-USB LAN network extenders.

Input parameters:
- token
- v (the AIM API version this request is designed for)

Output values:
- version - the current API version number
- timestamp - the current server time
- success
- count_c_usbs - the total number of C-USB LAN network extenders
- for each C-USB LAN network extender:
- attribute: item (e.g. 17th C-USB extender)
- mac (C-USB extender MAC address)
- type (rx, tx)
- name (customisable name)
- online (0, 1)
- ip (C-USB extender IP address)
- connectedTo (if connected, the MAC address of the connected C-USB extender)

Examples

Input:

/api/?v=6&method=get_all_c_usb&token=xxxxx

Output:

<api_response>
<version>6</version>
<timestamp>2012-12-14 12:12:12</timestamp>
<success>1</success>
<count_c_usbs>2</count_c_usbs>
<c_usb_lan_extenders>
<c_usb item="1">
<mac>aa:aa:aa:aa:aa:aa</mac>
<type>rx</type>
<name>John's Desk</name>
<online>1</online>
<ip>10.10.10.25</ip>
<connectedTo>bb:bb:bb:bb:bb:bb</connectedTo>
</c_usb>
<c_usb item="2">
<mac>bb:bb:bb:bb:bb:bb</mac>
<type>tx</type>
<name>John's PC</name>
<online>1</online>
<ip>10.10.10.27</ip>
</c_usb>
</c_usb_lan_extenders>
</api_response>


 

delete_c_usb

This method was last updated in API version 6, and is compatible with API requests from version 6 onwards
This method deletes a C-USB LAN network extender.
The API user must have admin privileges to call this method successfully.

Input parameters:
- token
- v (the AIM API version this request is designed for)
- mac (the C-USB extender MAC address)

Output values:
- version - the current API version number
- timestamp - the current server time
- success (0 = fail, 1 = success)
- errors (if anything failed, details are returned here)

Examples

Input:

/api/?v=6&method=delete_c_usb&token=xxxxx&mac=aa:aa:aa:aa:aa:aa

Output:

<api_response>
<version>6</version>
<timestamp>2012-12-12 12:12:12</timestamp>
<success>1</success>
</api_response>


 

update_c_usb

This method was last updated in API version 6, and is compatible with API requests from version 6 onwards
This method updates the name field for a C-USB LAN network extender.
The API user must have admin privileges to call this method successfully.

Input parameters:
- token
- v (the AIM API version this request is designed for)
- mac (the C-USB extender MAC address)
- name (the new display name for the C-USB extender)

Output values:
- version - the current API version number
- timestamp - the current server time
- success (0 = fail, 1 = success)
- errors (if anything failed, details are returned here)

Examples

Input:

/api/?v=6&method=update_c_usb&token=xxxxx&mac=aa:aa:aa:aa:aa:aa&name=John's Desk

Output:

<api_response>
<version>6</version>
<timestamp>2012-12-12 12:12:12</timestamp>
<success>1</success>
</api_response>


 

connect_c_usb

This method was last updated in API version 6, and is compatible with API requests from version 6 onwards
This method connects a C-USB LAN network extender receiver
to a C-USB LAN network extender transmitter.
Note that if either the receiver or the transmitter is currently connected, it will have to be disconnected first.

Input parameters:
- token
- v (the AIM API version this request is designed for)
- rx (the MAC address of the C-USB extender receiver)
- tx (the MAC address of the C-USB extender transmitter)

Output values:
- version - the current API version number
- timestamp - the current server time
- success (0 = fail, 1 = success)
- errors (if anything failed, details are returned here)

Examples

Input:

/api/?v=6&method=connect_c_usb&token=xxxxx&rx=aa:aa:aa:aa:aa:aa&tx=bb:bb:bb:bb:bb:bb

Output:

<api_response>
<version>6</version>
<timestamp>2012-12-12 12:12:12</timestamp>
<success>1</success>
</api_response>


 

disconnect_c_usb

This method was last updated in API version 6, and is compatible with API requests from version 6 onwards
This method disconnects a C-USB LAN network extender receiver.

Input parameters:
- token
- v (the AIM API version this request is designed for)
- mac (the MAC address of the C-USB extender receiver)

Output values:
- version - the current API version number
- timestamp - the current server time
- success (0 = fail, 1 = success)
- errors (if anything failed, details are returned here)

Examples

Input:

/api/?v=6&method=disconnect_c_usb&token=xxxxx&mac=aa:aa:aa:aa:aa:aa

Output:

<api_response>
<version>6</version>
<timestamp>2012-12-12 12:12:12</timestamp>
<success>1</success>
</api_response>
 

reboot_devices

This method was last updated in API version 7, and is compatible with API requests from version 7 onwards
This method sends a reboot command to the specified devices.

Input parameters:
- token
- v (the AIM API version this request is designed for)
- ids (a comma-separated list of IDs of the devices to be rebooted)

Output values:
- version
- the current API version number
- timestamp
- the current server time
- success (0 = fail, 1 = success)
- errors (if anything failed, details are returned here)

Examples

Input:

/api/?v=7&method=reboot_devices&token=xxxxx&ids=101,1701,501 

Output:

<api_response>
   <version>7</version>
   <timestamp>2012-12-12 12:12:12</timestamp>
   <success>1</success>
</api_response>
 
Page last modified on Thursday June 6, 2019 15:41:01 BST