Introduction
Welcome to the Iguana Web API reference. The following API calls are designed to interact with and make changes to the Iguana application, rather than the Translator API which just affects the Translator data.
These APIs will allow you to interact with your Iguana instances programmatically, giving you even more flexibility on using Iguana within your infrastructure.
Please note that all of the URLs in the examples use HTTPS. If you do not have SSL certificates configured on the Iguana that you are trying to send the call to, you'll need to use a HTTP URL instead.
Log API
Log Query
Example Usage of POST /api_query
local LogResults = net.http.post{ url = 'https://localhost:6543/api_query', auth = {username = 'admin',password = 'password'}, parameters = { limit = 50, type = 'message', deleted = 'false' }, live=true }
Usage
POST /api_query
This query will return a table of Iguana log messages that match the given parameters. If no parameters are entered, will return all log messages.
Required Parameters
- Username: string
- Password: string
Optional Parameters
- before: The last date that messages should be returned from. yyyy/mm/dd hh:mm:ss
- after: The first date that messages should be returned from. yyyy/mm/dd hh:mm:ss
- debugmode: This will include system messages in the return (default: false) true / false
- deleted: Select only deleted messages, or messages that have not been deleted (returns both if this parameter is not included) true / false
- filter: Returned messages will include the specified value string
- includesourcelogs: Includes source channel messages true / false
- refmsgid: This will return messages with the given unique ID string
- source: Returns messages from the specified channel string
- type: Returns messages of the selected type. Several types can be included, separated by commas.
- messages
- ack_messages
- errors
- errors_marked
- errors_unmarked
- info
- debug
- warnings
- successes
- resubmitted
- limit: Limits the number of messages that are returned integer
- reverse: Returns messages in order from newest to oldest true / false
- unqiue: When combined with the type: messages, will only return unique log messagestrue / false
Returns
- A table containing the log messages which match the entered parameters. string.
Monitor API
Get Server Configuration
Example Usage of POST /get_server_config
local config = net.http.post{ url='https://localhost:6543/get_server_config', auth = {username = 'admin',password = 'password'}, parameters = { }, live = true }
Usage
POST /get_server_config
Queries the specified server and returns its configuration details as XML.
Required Parameters
- Username: string
- Password: string
Returns
The configuration details of the server specified by the URL as XML.
Query Performance Statistics
Example Usage of POST /monitor_query
local PerformanceStats = net.http.post{ url = "https://localhost:6543/monitor_query", auth = {username = 'admin',password = 'password'}, parameters = { }, live = true }
Usage
POST /monitor_query
Queries the specified Iguana server and reutrns a detailed XML summary of its performance statistics. It includes information such as the number of open file handles, memory usage, and so on.
Required Parameters
- Username: string
- Password: string
Returns
Performance statistics of the server specified by the URL as XML.
Retrieve Current Iguana Version
Example Usage of POST /current_version
local Version = net.http.post{ url = 'https://localhost:6543/current_version', auth = {username = 'admin',password = 'password'}, parameters = { }, live = true }
Usage
POST /current_version
Queries the specified Iguana server and returns information regarding it's software version.
Required Parameters
- Username: string
- Password: string
Channel API
Add Channel
Example Usage of POST /add_channel
local channelConfig = net.http.post{ url = 'https://localhost:6543/add_channel', auth = {username = 'admin', password = 'password'}, parameters = { config = XMLSTRING, compact = 'true', }, live = true }
Usage
POST /add_channel
Adds a channel with the specified components to the specified server.
Required Parameters
- Username: string
- Password: string
- config: The configuration parameters for the channel (URLs, ports, etc). XML string
- compact: Returns the XML in compact form. true / false
Returns
- An XML string with the newly added channels configuration details.string
More Information
- The default channel configuration can be retrieved using the get_default_config API call. Note that the default does not contain a filter component.
Get Default Channel Configuration
Example Usage of POST /get_default_config
local defaultConfig = net.http.post{ url = 'https://localhost:6543/get_default_config', auth = {username = 'admin', password = 'password'}, parameters = { source = 'LLP Listener', destination = 'To Translator', compact = true, }, live = true }
Usage
POST /get_default_config
Required Parameters
- Username: string
- Password: string
- source: The type of source component you want to get configuration details for. string
- LLP Listener
- From Translator
- From HTTPS
- From Channel
- From Database
- From File
- From Plugin
- destination: The type of destination component that you want to get configuration details for. string
- LLP Client
- To Translator
- To HTTPS
- To Channel
- To Database
- To File
- To Plugin
Returns
- An XML string containing the default configuration parameters for the entered components, with no values set.XML string
Get Channel Configuration
Example Usage of POST /get_channel_config
local channelConfig = net.http.post{ url = 'https://localhost:6543/get_channel_config', auth = {username = 'admin',password = 'password'}, parameters = { guid = '44F1636BCBA7D0766D418716BDDFC389', compact = 'true', }, live = true }
Usage
POST /get_channel_config
Retrieves the configuration parameters for a given channel. This can be used with other request handlers in the API to clone channels or to update existing ones. This operation requires the user to have view permissions for the channel.
Required Parameters
- Username: string
- Password: string
- guid: or name: The GUID or name of the channel that you want the configuraiton details for. NOTE that this is the channel GUID and not the project GUIDstring.
- compact: Returns XML in compact format if true. true / false.
Returns
- An XML string containing the configuration details from the specified channel XML string
Import Project
Example Usage of POST /import_project
local guidImport = net.http.post{ url = 'https://localhost:6543/import_project', auth = {username = 'admin', password = 'password'}, parameters = { project = Base64Zip, guid = GUID, sample_data = 'replace', }, live = true }
Usage
POST /import_project
Required Parameters
- Username: string
- Password: string
- guid: The guid of the Translator Project you want to import to.string
- project: Base64 encoded project zip file filehandle.
Optional Parameters
- sample_data Acceptable entries are 'append' or 'replace', will either add new sample data or replace it with the data in the project zip. If this parameter is omitted then sample data will not be included. string
Returns
- The GUID of the Translator project that the zip file was imported into.string
Export Project
Example Usage of POST /export_project
local base64Zip = net.http.post{ url = 'https://localhost:6543/export_project', auth = {username = 'admin', password = 'password'}, parameters = { guid = GUID, sample_data = true, }, live = true }
Usage
POST /export_project
Required Parameters
- Username: string
- Password: string
- guid: The guid of the Translator Project you want to export.string
Optional Parameters
- sample_data: Includes sample data in the export if true, excludes it if false true / false
Returns
- The project as a base64 encoded zip filefilehandle
Remove Channel
Example Usage of POST /remove_channel
local Config = net.http.post{ url = 'https://localhost:6543/remove_channel', auth = {username = 'admin',password = 'password'}, parameters = { guid = GUID, compact = true, }, live = true }
Usage
POST /remove_channel
Required Parameters
- Username: string
- Password: string
- guid: or name: The guid or name of the channel you want to remove.string
- compact: Returns the configuration as compact XML if true true / false
Returns
- The XML configuration of the channel that was removedXML string
Source Control Commit
Example Usage of POST /sc/commit
local Commit = net.http.post{ url = 'https://localhost:6543/sc/commit', auth = {username = 'admin',password = 'password'}, parameters = { translator_guid = GUID, comment='COMMENT', }, live = true }
Usage
POST /sc/commit
Required Parameters
- Username: string
- Password: string
- translator_guid: The guid of the Translator you want to commit.string
- comment: The comment to attach to the commit string
Returns
- A JSON object containing information regarding what was committedJSON
Source Control Bump
Example Usage of POST /sc/bump
local Commit = net.http.post{ url = 'https://localhost:6543/sc/bump', auth = {username = 'admin',password = 'password'}, parameters = { translator_guid = GUID, commit_id = CommitID, translators_to_bump = [GUID], }, live = true }
Usage
POST /sc/bump
Required Parameters
- Username: string
- Password: string
- guid: The guid of the Translator project.string
- commit: The ID of the commit that the Translators should run from.string
- translators_to_bump: A list of Translator GUIDs to be bumped, serialized as a JSON array.string
Returns
- The result of the bump (success:true/false)JSON