Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

mirth-api

MichaelLeeHobbs3GPL-3.0-or-later0.0.5

A Mirth client for Node.js.

readme

MirthApi

The MirthApi is a simple promised based Node.js client for calling Mirth API endpoints. It heavily relies on swagger-client.

Table of Contents

Read First

Use at your own risk! I built this in about 2 hours and then spent another 3-4 hours working on the documentation. This is very much a project in the ALPHA stage. That said it should be very solid as it is build on top of swagger-client. The reason I qualify this as a ALPHA release is there has been little to no testing beyond login and a few other calls to other functions. I don't know how much time I will have to take this project forward as I have a very full life. If you are interesting in helping out then please contact me. Pull request are more than welcome!

Notices

Currently the documentation is badly lacking on any function that has body as one of the inputs. This will be addressed in the next week or so. For now use the following as an example of how to craft a body.

// minimal example - body requires a user object and a user object has a number of props
let res = await mirthClient.Users.createUser({body: {user: {username: 'test'}}}).catch(console.error)

Installation

npm install mirth-api --save

Usage

Promise

const MirthApi = require('../src/index')
new MirthApi({host: '127.0.0.1', port: '8443', username: 'admin', password: 'admin', noLogin: false})
    .then((mirthClient)=>{
        mirthClient.Users.getCurrentUser()
            .then(res=>console.log(res.data))
    })

Async

const MirthApi = require('../src/index')
async function main() {
    let mirthClient = await new MirthApi({host: '127.0.0.1', port: '8443', username: 'admin', password: 'admin'})
    let res = await mirthClient.Users.getCurrentUser()
    console.log(res.data) 
}
main()

Response

let res = await mirthClient.Users.getCurrentUser()
let res = {
  ok: true,
  url: 'https://127.0.0.1:8443/api/users/current',
  status: 200,
  statusText: 'OK',
  headers: {
    connection: 'close',
    date: 'Sat, 26 Oct 2019 21:56:52 GMT',
    'access-control-allow-origin': '*',
    'access-control-allow-credentials': 'false',
    'access-control-allow-methods': 'GET, POST, DELETE, PUT',
    'access-control-allow-headers': 'Content-Type',
    'content-security-policy': "frame-ancestors 'none'",
    'x-frame-options': 'DENY',
    'content-type': 'application/xml',
    'content-length': '348',
    server: 'Jetty(9.4.9.v20180320)'
  },
  text: 'xml string',
  data: 'xml string',
  body: 'xml string',
  obj: 'xml string'
}

Swagger Client

If for some reason you need to access the Swagger Client, it is available via getter:

let swaggerClient = mirthClient.swaggerClient

Session cookies

The Swagger Client has a requestInterceptor to apply cookies that are caught in the hooked User Login function.

Mirth Version

(This is a work in progress.) As each version of Mirth is likely to have a slightly different API please see the documents folder for auto generated version specific APIs.

Browser Support

A this time there is no planned support for browsers. It would likely be very easy to create a fork of this project and create a version that supports browsers. Pull request is welcome!

Changes

Version 0.0.5

  • Fixed Bug #1
  • Added feature to responseInterceptor where it will attempt to parse the response body into xml and then json ie res.json

TODO

  • Better auto generate documentation
  • More version of auto generate documentation
  • schema generation in auto generate documentation
  • TypeDef file generation
  • Add Test

Functions And Properties

Core Properties

Summary: Get/Set the session cookie - This will be overwritten if you call MirthApi.Users.Login

Type: String


MirthApi.host

Summary: Get/Set the host IP or address of Mirth instance

Type: String


MirthApi.port

Summary: Get/Set the host port of Mirth instance

Type: String


MirthApi.username

Summary: Get/Set the username to use when logging into the Mirth instance

Type: String


MirthApi.password

Summary: Get/Set the password to use when logging into the Mirth instance

Type: String


MirthApi.swaggerClient

Summary: Get the swaggerClient

Type: SwaggerClient


MirthApi.url

Summary: Get the generate url to Mirth's swagger.json

Type: String

Example: https://127.0.0.1:8433/api/swagger.json


Core Functions

MirthApi.constructor({host = '127.0.0.1', port = '8443', username = 'admin', password = 'admin', noLogin = false, , disableTLSCheck = false})

Summary: Returns an instance of MirthApi

Parameters:

Name Description Default Value Required
host The Mirth host ip or address. 127.0.0.1 No
port The Mirth port. 8443 No
username The username to use for login. admin No
password The password to use for login. admin No
noLogin If true will not attempt a login when instantiated. false No
disableTLSCheck Disabled Node.js rejection of invalid SSL certs! Please use with causation as this will disable the check for the entire process not just to the Mirth instance! It's far better to add the self-signed cert to the list of trusted certs. false No

MirthApi.login({username, password})

Summary: Login is a hook function for SwaggerClient.apis.User.login({username, password}). It catches the response and pull out the header 'set-cookie' and sets the cookie so MirthApi users don't have to deal with the session token.

Parameters:

Name Description Default Value Required
username The username. MirthApi.user No
password The password. MirthApi.password No

Generated Functions from Swagger

Alerts.getAlerts({alertId})

Summary: Retrieves multiple alerts by ID, or all alerts if not specified.

Description:

Parameters:

Name Description Required
alertId The ID of the alert(s). If absent, all alerts will be returned. No

Responses:

Name Description Schema
200 successful operation
---
#### Alerts.createAlert({body*})

Summary: Creates a new alert.

Description:

Parameters:

Name Description Required
body The alert to create. Yes

Responses:

Name Description Schema
default successful operation
---
#### Alerts.getAlertsPost({body})

Summary: Retrieves multiple alerts by ID, or all alerts if not specified. This is a POST request alternative to GET /alerts that may be used when there are too many alert IDs to include in the query parameters.

Description:

Parameters:

Name Description Required
body The ID of the alert(s). If absent, all alerts will be returned. No

Responses:

Name Description Schema
200 successful operation
---
#### Alerts.getAlertInfo1({body*})

Summary: Returns an AlertInfo object containing alert protocol options and any updated channel summaries.

Description:

Parameters:

Name Description Required
body A map of ChannelHeader objects telling the server the state of the client-side channel cache. Yes

Responses:

Name Description Schema
200 successful operation
---
#### Alerts.getAlertProtocolOptions()

Summary: Returns all alert protocol options.

Description:

Parameters:

Name Description Required

Responses:

Name Description Schema
200 successful operation
---
#### Alerts.getAlertStatusList()

Summary: Returns all alert dashboard statuses.

Description:

Parameters:

Name Description Required

Responses:

Name Description Schema
200 successful operation
---
#### Alerts.getAlert({alertId*})

Summary: Retrieves an alert by ID.

Description:

Parameters:

Name Description Required
alertId The ID of the alert. Yes

Responses:

Name Description Schema
200 successful operation
---
#### Alerts.updateAlert({alertId, body})

Summary: Updates the specified alert.

Description:

Parameters:

Name Description Required
alertId The ID of the alert. Yes
body The alert to create. Yes

Responses:

Name Description Schema
default successful operation
---
#### Alerts.removeAlert({alertId*})

Summary: Removes the specified alert.

Description:

Parameters:

Name Description Required
alertId The ID of the alert. Yes

Responses:

Name Description Schema
default successful operation
---
#### Alerts.disableAlert({alertId*})

Summary: Disables the specified alert.

Description:

Parameters:

Name Description Required
alertId The ID of the alert. Yes

Responses:

Name Description Schema
default successful operation
---
#### Alerts.enableAlert({alertId*})

Summary: Enables the specified alert.

Description:

Parameters:

Name Description Required
alertId The ID of the alert. Yes

Responses:

Name Description Schema
default successful operation
---
#### Alerts.getAlertInfo2({alertId, body})

Summary: Returns an AlertInfo object containing the alert model, alert protocol options, and any updated channel summaries.

Description:

Parameters:

Name Description Required
alertId The ID of the alert. Yes
body A map of ChannelHeader objects telling the server the state of the client-side channel cache. Yes

Responses:

Name Description Schema
200 successful operation
---
#### ChannelGroups.getChannelGroups({channelGroupId})

Summary: Retrieve a list of all channel groups, or multiple channel groups by ID.

Description:

Parameters:

Name Description Required
channelGroupId The IDs of the channel groups to retrieve. If absent, all groups will be retrieved. No

Responses:

Name Description Schema
200 successful operation
---
#### ChannelGroups.updateChannelGroups({channelGroups, removedChannelGroupIds, override})

Summary: Updates all channel groups in one request.

Description:

Parameters:

Name Description Required
channelGroups The channel group object to update or create. No
removedChannelGroupIds All channel group IDs known to be removed. No
override If true, the channel groups will be updated even if different revisions exist on the server. No

Responses:

Name Description Schema
200 successful operation
---
#### ChannelGroups.getChannelGroupsPost({body})

Summary: Retrieve a list of all channel groups, or multiple channel groups by ID. This is a POST request alternative to GET /channelgroups that may be used when there are too many channel group IDs to include in the query parameters.

Description:

Parameters:

Name Description Required
body The IDs of the channel groups to retrieve. If absent, all groups will be retrieved. No

Responses:

Name Description Schema
200 successful operation
---
#### Channels.getChannels({channelId, pollingOnly})

Summary: Retrieve a list of all channels, or multiple channels by ID.

Description:

Parameters:

Name Description Required
channelId The IDs of the channels to retrieve. If absent, all channels will be retrieved. No
pollingOnly If true, only channels with polling source connectors will be returned. No

Responses:

Name Description Schema
200 successful operation
---
#### Channels.createChannel({body*})

Summary: Creates a new channel.

Description:

Parameters:

Name Description Required
body The Channel object to create. Yes

Responses:

Name Description Schema
200 successful operation
---
#### Channels.removeChannels({channelId*})

Summary: Removes the channels with the specified IDs.

Description:

Parameters:

Name Description Required
channelId The IDs of the channels to remove. Yes

Responses:

Name Description Schema
default successful operation
---
#### Channels.getChannelsPost({body, pollingOnly})

Summary: Retrieve a list of all channels, or multiple channels by ID. This is a POST request alternative to GET /channels that may be used when there are too many channel IDs to include in the query parameters.

Description:

Parameters:

Name Description Required
body The IDs of the channels to retrieve. If absent, all channels will be retrieved. No
pollingOnly If true, only channels with polling source connectors will be returned. No

Responses:

Name Description Schema
200 successful operation
---
#### Channels.getChannelSummary({body, ignoreNewChannels})

Summary: Returns a list of channel summaries, indicating to a client which channels have changed (been updated, deleted, undeployed, etc.). If a channel was modified, the entire Channel object will be returned.

Description:

Parameters:

Name Description Required
body A map of ChannelHeader objects telling the server the state of the client-side channel cache. Yes
ignoreNewChannels If true, summaries will only be returned for channels in the map's entry set. Yes

Responses:

Name Description Schema
200 successful operation
---
#### Channels.removeChannelsPost({body*})

Summary: Removes the channels with the specified IDs. This is a POST request alternative to DELETE /channels that may be used when there are too many channel IDs to include in the query parameters.

Description:

Parameters:

Name Description Required
body The IDs of the channels to remove. Yes

Responses:

Name Description Schema
default successful operation
---
#### Channels.setChannelEnabled1({channelId, enabled*})

Summary: Enables/disables the specified channels.

Description:

Parameters:

Name Description Required
channelId The IDs of the channels to enable/disable. If absent, all channels will be enabled/disabled. No
enabled Indicates whether the channels should be enabled or disabled. Yes

Responses:

Name Description Schema
default successful operation
---
#### Channels.setChannelInitialState1({channelId, initialState*})

Summary: Sets the initial state for the specified channels.

Description:

Parameters:

Name Description Required
channelId The IDs of the channels to modify initial states on. If absent, the initial state will be set on all channels. No
initialState The initial state of the channel. Yes

Responses:

Name Description Schema
default successful operation
---
#### Channels.getChannelIdsAndNames()

Summary: Returns a map of all channel IDs and names.

Description:

Parameters:

Name Description Required

Responses:

Name Description Schema
200 successful operation
---
#### Channels.getChannel({channelId*})

Summary: Retrieve a single channel by ID.

Description:

Parameters:

Name Description Required
channelId The ID of the channel to retrieve. Yes

Responses:

Name Description Schema
200 successful operation
---
#### Channels.updateChannel({channelId, body, override})

Summary: Updates the specified channel.

Description:

Parameters:

Name Description Required
channelId The ID of the channel to update. Yes
body The Channel object to update with. Yes
override If true, the channel will be updated even if a different revision exists on the server. No

Responses:

Name Description Schema
200 successful operation
---
#### Channels.removeChannel({channelId*})

Summary: Removes the channel with the specified ID.

Description:

Parameters:

Name Description Required
channelId The ID of the channel to remove. Yes

Responses:

Name Description Schema
default successful operation
---
#### Channels.getConnectorNames({channelId*})

Summary: Returns all connector names for a channel.

Description:

Parameters:

Name Description Required
channelId The ID of the channel. Yes

Responses:

Name Description Schema
200 successful operation
---
#### Channels.setChannelEnabled2({channelId, enabled})

Summary: Enables/disables the specified channel.

Description:

Parameters:

Name Description Required
channelId The ID of the channel. Yes
enabled The enabled flag (true/false) to set. Yes

Responses:

Name Description Schema
default successful operation
---
#### Channels.setChannelInitialState2({channelId, initialState})

Summary: Sets the initial state for a single channel.

Description:

Parameters:

Name Description Required
channelId The ID of the channel. Yes
initialState The initial state of the channel. Yes

Responses:

Name Description Schema
default successful operation
---
#### Channels.getMetaDataColumns({channelId*})

Summary: Returns all metadata columns for a channel.

Description:

Parameters:

Name Description Required
channelId The ID of the channel. Yes

Responses:

Name Description Schema
200 successful operation
---
#### ChannelStatistics.clearAllStatistics()

Summary: Clears all statistics (including lifetime) for all channels/connectors.

Description:

Parameters:

Name Description Required

Responses:

Name Description Schema
default successful operation
---
#### ChannelStatistics.clearStatistics({body*, received, filtered, sent, error})

Summary: Clears the statistics for the given channels and/or connectors.

Description:

Parameters:

Name Description Required
body Channel IDs mapped to lists of metaDataIds (connectors). If the metaDataId list is null, then all statistics for the channel will be cleared. Yes
received If true, received stats will be cleared. No
filtered If true, filtered stats will be cleared. No
sent If true, sent stats will be cleared. No
error If true, error stats will be cleared. No

Responses:

Name Description Schema
default successful operation
---
#### ChannelStatistics.getStatistics1({channelId, includeUndeployed, includeMetadataId, excludeMetadataId, aggregateStats})

Summary: Returns the Statistics for all channels.

Description:

Parameters:

Name Description Required
channelId The IDs of the channels to retrieve. If absent, all channels will be retrieved. No
includeUndeployed If true, statistics for undeployed channels will also be included. No
includeMetadataId The ids of connectors to include. Cannot include and exclude connectors. No
excludeMetadataId The ids of connectors to exclude. Cannot include and exclude connectors. No
aggregateStats If true, statistics will be aggregated into one result No

Responses:

Name Description Schema
200 successful operation
---
#### ChannelStatistics.getStatisticsPost({channelIds, includeUndeployed, includeMetadataIds, excludeMetadataIds, aggregateStats})

Summary: Returns the Statistics for all channels. This is a POST request alternative to GET /statistics that may be used when there are too many channel IDs to include in the query parameters.

Description:

Parameters:

Name Description Required
channelIds The IDs of the channels to retrieve. If absent, all channels will be retrieved. No
includeUndeployed If true, statistics for undeployed channels will also be included. No
includeMetadataIds The ids of connectors to include. Cannot include and exclude connectors. No
excludeMetadataIds The ids of connectors to exclude. Cannot include and exclude connectors. No
aggregateStats If true, statistics will be aggregated into one result No

Responses:

Name Description Schema
200 successful operation
---
#### ChannelStatistics.getStatistics2({channelId*})

Summary: Returns the Statistics for the channel with the specified id.

Description:

Parameters:

Name Description Required
channelId The ID of the channel to retrieve statistics for. Yes

Responses:

Name Description Schema
200 successful operation
---
#### ChannelDeploymentOperations.deployChannels({body, returnErrors})

Summary: Deploys (or redeploys) selected channels.

Description:

Parameters:

Name Description Required
body The ID of the channel(s) to deploy. If absent, all channels will be deployed. No
returnErrors If true, an error response code and the exception will be returned. No

Responses:

Name Description Schema
default successful operation
---
#### ChannelDeploymentOperations.redeployAllChannels({returnErrors})

Summary: Redeploys all channels.

Description:

Parameters:

Name Description Required
returnErrors If true, an error response code and the exception will be returned. No

Responses:

Name Description Schema
default successful operation
---
#### ChannelDeploymentOperations.undeployChannels({body, returnErrors})

Summary: Undeploys selected channels.

Description:

Parameters:

Name Description Required
body The ID of the channel(s) to undeploy. If absent, all channels will be undeployed. No
returnErrors If true, an error response code and the exception will be returned. No

Responses:

Name Description Schema
default successful operation
---
#### ChannelDeploymentOperations.deployChannel({channelId*, returnErrors})

Summary: Deploys (or redeploys) a single channel.

Description:

Parameters:

Name Description Required
channelId The ID of the channel to deploy. Yes
returnErrors If true, an error response code and the exception will be returned. No

Responses:

Name Description Schema
default successful operation
---
#### ChannelDeploymentOperations.undeployChannel({channelId*, returnErrors})

Summary: Undeploys a single channel.

Description:

Parameters:

Name Description Required
channelId The ID of the channel to undeploy. Yes
returnErrors If true, an error response code and the exception will be returned. No

Responses:

Name Description Schema
default successful operation
---
#### ChannelStatusOperations.haltChannels({channelId*, returnErrors})

Summary: Halts the channels with the specified IDs.

Description:

Parameters:

Name Description Required
channelId The channel IDs to halt. Yes
returnErrors If true, an error response code and the exception will be returned. No

Responses:

Name Description Schema
default successful operation
---
#### ChannelStatusOperations.pauseChannels({channelId*, returnErrors})

Summary: Pauses the channels with the specified IDs.

Description:

Parameters:

Name Description Required
channelId The channel IDs to pause. Yes
returnErrors If true, an error response code and the exception will be returned. No

Responses:

Name Description Schema
default successful operation
---
#### ChannelStatusOperations.resumeChannels({channelId*, returnErrors})

Summary: Resume the channels with the specified IDs.

Description:

Parameters:

Name Description Required
channelId The channel IDs to resume. Yes
returnErrors If true, an error response code and the exception will be returned. No

Responses:

Name Description Schema
default successful operation
---
#### ChannelStatusOperations.startChannels({channelId*, returnErrors})

Summary: Starts the channels with the specified IDs.

Description:

Parameters:

Name Description Required
channelId The channel IDs to start. Yes
returnErrors If true, an error response code and the exception will be returned. No

Responses:

Name Description Schema
default successful operation
---
#### ChannelStatusOperations.startConnectors({body*, returnErrors})

Summary: Starts the connectors with the specified channel and metadata IDs.

Description:

Parameters:

Name Description Required
body A map of channel and metadata IDs to start connectors for. Yes
returnErrors If true, an error response code and the exception will be returned. No

Responses:

Name Description Schema
default successful operation
---
#### ChannelStatusOperations.stopChannels({channelId*, returnErrors})

Summary: Stops the channels with the specified IDs.

Description:

Parameters:

Name Description Required
channelId The channel IDs to stop. Yes
returnErrors If true, an error response code and the exception will be returned. No

Responses:

Name Description Schema
default successful operation
---
#### ChannelStatusOperations.stopConnectors({body*, returnErrors})

Summary: Stops the connectors with the specified channel and metadata IDs.

Description:

Parameters:

Name Description Required
body A map of channel and metadata IDs to stop connectors for. Yes
returnErrors If true, an error response code and the exception will be returned. No

Responses:

Name Description Schema
default successful operation
---
#### ChannelStatusOperations.getChannelStatusList({channelId, filter, includeUndeployed})

Summary: Returns all channel dashboard statuses, or multiple statuses by channel ID.

Description:

Parameters:

Name Description Required
channelId The channel IDs to return dashboard statuses for. If absent, all statuses will be returned. No
filter The filter string to limit dashboard statuses with. No
includeUndeployed If true, statuses for undeployed channels will also be included. No

Responses:

Name Description Schema
200 successful operation
---
#### ChannelStatusOperations.getChannelStatusListPost({body, filter, includeUndeployed})

Summary: Returns all channel dashboard statuses, or multiple statuses by channel ID. This is a POST request alternative to GET /statuses that may be used when there are too many channel IDs to include in the query parameters.

Description:

Parameters:

Name Description Required
body The channel IDs to return dashboard statuses for. If absent, all statuses will be returned. No
filter The filter string to limit dashboard statuses with. No
includeUndeployed If true, statuses for undeployed channels will also be included. No

Responses:

Name Description Schema
200 successful operation
---
#### ChannelStatusOperations.getDashboardChannelInfo({fetchSize*, filter})

Summary: Returns a DashboardChannelInfo object containing a partial channel status list and a set of remaining channel IDs.

Description:

Parameters:

Name Description Required
fetchSize Specifies the maximum number of statuses to return. Yes
filter The filter string to limit dashboard statuses with. No

Responses:

Name Description Schema
200 successful operation
---
#### ChannelStatusOperations.haltChannel({channelId*, returnErrors})

Summary: Halts the channel with the specified ID.

Description:

Parameters:

Name Description Required
channelId The channel ID to halt. Yes
returnErrors If true, an error response code and the exception will be returned. No

Responses:

Name Description Schema
default successful operation
---
#### ChannelStatusOperations.pauseChannel({channelId*, returnErrors})

Summary: Pauses the channel with the specified ID.

Description:

Parameters:

Name Description Required
channelId The channel ID to pause. Yes
returnErrors If true, an error response code and the exception will be returned. No

Responses:

Name Description Schema
default successful operation
---
#### ChannelStatusOperations.resumeChannel({channelId*, returnErrors})

Summary: Resumes the channel with the specified ID.

Description:

Parameters:

Name Description Required
channelId The channel ID to resume. Yes
returnErrors If true, an error response code and the exception will be returned. No

Responses:

Name Description Schema
default successful operation
---
#### ChannelStatusOperations.startChannel({channelId*, returnErrors})

Summary: Starts the channel with the specified ID.

Description:

Parameters:

Name Description Required
channelId The channel ID to start. Yes
returnErrors If true, an error response code and the exception will be returned. No

Responses:

Name Description Schema
default successful operation
---
#### ChannelStatusOperations.stopChannel({channelId*, returnErrors})

Summary: Stops the channel with the specified ID.

Description:

Parameters:

Name Description Required
channelId The channel ID to stop. Yes
returnErrors If true, an error response code and the exception will be returned. No

Responses:

Name Description Schema
default successful operation
---
#### ChannelStatusOperations.startConnector({channelId, metaDataId, returnErrors})

Summary: Starts the connector with the specified channel and metadata ID.

Description:

Parameters:

Name Description Required
channelId The channel ID to start a connector for. Yes
metaDataId The connector metadata ID to start. Yes
returnErrors If true, an error response code and the exception will be returned. No

Responses:

Name Description Schema
default successful operation
---
#### ChannelStatusOperations.stopConnector({channelId, metaDataId, returnErrors})

Summary: Stops the connector with the specified channel and metadata ID.

Description:

Parameters:

Name Description Required
channelId The channel ID to stop a connector for. Yes
metaDataId The connector metadata ID to stop. Yes
returnErrors If true, an error response code and the exception will be returned. No

Responses:

Name Description Schema
default successful operation
---
#### ChannelStatusOperations.getChannelStatus({channelId*})

Summary: Returns the dashboard status for a single channel ID.

Description:

Parameters:

Name Description Required
channelId The channel ID to return a dashboard status for. Yes

Responses:

Name Description Schema
200 successful operation
---
#### Messages.removeAllMessages1({channelId*, restartRunningChannels, clearStatistics})

Summary: Removes all messages for multiple specified channels.

Description:

Parameters:

Name Description Required
channelId The IDs of the channels. Yes
restartRunningChannels If true, currently running channels will be stopped and restarted as part of the remove process. Otherwise, currently running channels will not be included. No
clearStatistics If true, message statistics will also be cleared. No

Responses:

Name Description Schema
default successful operation
---
#### Messages.removeAllMessagesPost({body*, restartRunningChannels, clearStatistics})

Summary: Removes all messages for multiple specified channels. This is a POST request alternative to DELETE /_removeAllMessages that may be used when there are too many channel IDs to include in the query parameters.

Description:

Parameters:

Name Description Required
body The IDs of the channels. Yes
restartRunningChannels If true, currently running channels will be stopped and restarted as part of the remove process. Otherwise, currently running channels will not be included. No
clearStatistics If true, message statistics will also be cleared. No

Responses:

Name Description Schema
default successful operation
---
#### Messages.getMessages1({channelId*, minMessageId, maxMessageId, minOriginalId, maxOriginalId, minImportId, maxImportId, startDate, endDate, textSearch, textSearchRegex, status, includedMetaDataId, excludedMetaDataId, serverId, rawContentSearch, processedRawContentSearch, transformedContentSearch, encodedContentSearch, sentContentSearch, responseContentSearch, responseTransformedContentSearch, processedResponseContentSearch, connectorMapContentSearch, channelMapContentSearch, sourceMapContentSearch, responseMapContentSearch, processingErrorContentSearch, postprocessorErrorContentSearch, responseErrorContentSearch, metaDataSearch, metaDataCaseInsensitiveSearch, textSearchMetaDataColumn, minSendAttempts, maxSendAttempts, attachment, error, includeContent, offset, limit})

Summary: Search for messages by specific filter criteria.

Description:

Parameters:

Name Description Required
channelId The ID of the channel. Yes
minMessageId The minimum message ID to query. No
maxMessageId The maximum message ID to query. No
minOriginalId The minimum original message ID to query. Messages that have been reprocessed will retain their original message ID. No
maxOriginalId The maximum original message ID to query. Messages that have been reprocessed will retain their original message ID. No
minImportId The minimum import message ID to query. Messages that have been imported will retain their original message ID under this value. No
maxImportId The maximum import message ID to query. Messages that have been imported will retain their original message ID under this value. No
startDate The earliest original received date to query by. Example: 1985-10-26T09:00:00.000-0700 No
endDate The latest original received date to query by. Example: 2015-10-21T07:28:00.000-0700 No
textSearch Searches all message content for this string. This process could take a long time depending on the amount of message content currently stored. Any message content that was encrypted by this channel will not be searchable. No
textSearchRegex If true, text search input will be considered a regular expression pattern to be matched. Only supported by PostgreSQL, MySQL and Oracle databases. No
status Determines which message statuses to query by. No
includedMetaDataId If present, only connector metadata IDs in this list will be queried. No
excludedMetaDataId If present, connector metadata IDs in this list will not be queried. No
serverId The server ID associated with messages. No
rawContentSearch Searches the raw content of messages. No
processedRawContentSearch Searches the processed raw content of messages. No
transformedContentSearch Searches the transformed content of messages. No
encodedContentSearch Searches the encoded content of messages. No
sentContentSearch Searches the sent content of messages. No
responseContentSearch Searches the response content of messages. No
responseTransformedContentSearch Searches the response transformed content of messages. No
processedResponseContentSearch Searches the processed response content of messages. No
connectorMapContentSearch Searches the connector map content of messages. No
channelMapContentSearch Searches the channel map content of messages. No
sourceMapContentSearch Searches the source map content of messages. No
responseMapContentSearch Searches the response map content of messages. No
processingErrorContentSearch Searches the processing error content of messages. No
postprocessorErrorContentSearch Searches the postprocessor error content of messages. No
responseErrorContentSearch Searches the response error content of messages. No
metaDataSearch Searches a custom metadata column. Value should be in the form: COLUMN_NAME <operator> value, where operator is one of the following: =, !=, <, <=, >, >=, CONTAINS, DOES NOT CONTAIN, STARTS WITH, DOES NOT START WITH, ENDS WITH, DOES NOT END WITH No
metaDataCaseInsensitiveSearch Searches a custom metadata column, ignoring case. Value should be in the form: COLUMN_NAME <operator> value. No
textSearchMetaDataColumn When using a text search, these custom metadata columns will also be searched. No
minSendAttempts The minimum number of send attempts for connector messages. No
maxSendAttempts The maximum number of send attempts for connector messages. No
attachment If true, only messages with attachments are included in the results. No
error If true, only messages with errors are included in the results. No
includeContent If true, message content will be returned with the results. No
offset Used for pagination, determines where to start in the search results. No
limit Used for pagination, determines the maximum number of results to return. No

Responses:

Name Description Schema
200 successful operation
---
#### Messages.processMessage1({channelId, body, destinationMetaDataId, sourceMapEntry, overwrite, imported, originalMessageId})

Summary: Processes a new message through a channel.

Description:

Parameters:

Name Description Required
channelId The ID of the channel. Yes
body The raw message data to process. Yes
destinationMetaDataId Indicates which destinations to send the message to. No
sourceMapEntry These entries will be injected into the source map for the message. Value should be in the format: key=value No
overwrite If true and a valid original message ID is given, this message will overwrite the existing one. No
imported If true, marks this message as being imported. If the message is overwriting an existing one, then statistics will not be decremented. No
originalMessageId The original message ID this message is associated with. No

Responses:

Name Description Schema
200 successful operation
---
#### Messages.removeMessages1({channelId*, minMessageId, maxMessageId, minOriginalId, maxOriginalId, minImportId, maxImportId, startDate, endDate, textSearch, textSearchRegex, status, includedMetaDataId, excludedMetaDataId, serverId, rawContentSearch, processedRawContentSearch, transformedContentSearch, encodedContentSearch, sentContentSearch, responseContentSearch, responseTransformedContentSearch, processedResponseContentSearch, connectorMapContentSearch, channelMapContentSearch, sourceMapContentSearch, responseMapContentSearch, processingErrorContentSearch, postprocessorErrorContentSearch, responseErrorContentSearch, metaDataSearch, metaDataCaseInsensitiveSearch, textSearchMetaDataColumn, minSendAttempts, maxSendAttempts, attachment, error})

Summary: Remove messages by specific filter criteria.

Description:

Parameters:

Name Description Required
channelId The ID of the channel. Yes
minMessageId The minimum message ID to query. No
maxMessageId The maximum message ID to query. No
minOriginalId The minimum original message ID to query. Messages that have been reprocessed will retain their original message ID. No
maxOriginalId The maximum original message ID to query. Messages that have been reprocessed will retain their original message ID. No
minImportId The minimum import message ID to query. Messages that have been imported will retain their original message ID under this value. No
maxImportId The maximum import message ID to query. Messages that have been imported will retain their original message ID under this value. No
startDate The earliest original received date to query by. Example: 1985-10-26T09:00:00.000-0700 No
endDate The latest original received date to query by. Example: 2015-10-21T07:28:00.000-0700 No
textSearch Searches all message content for this string. This process could take a long time depending on the amount of message content currently stored. Any message content that was encrypted by this channel will not be searchable. No
textSearchRegex If true, text search input will be considered a regular expression pattern to be matched. Only supported by PostgreSQL, MySQL and Oracle databases. No
status Determines which message statuses to query by. No
includedMetaDataId If present, only connector metadata IDs in this list will be queried. No
excludedMetaDataId If present, connector metadata IDs in this list will not be queried. No
serverId The server ID associated with messages. No
rawContentSearch Searches the raw content of messages. No
processedRawContentSearch Searches the processed raw content of messages. No
transformedContentSearch Searches the transformed content of messages. No
encodedContentSearch Searches the encoded content of messages. No
sentContentSearch Searches the sent content of messages. No
responseContentSearch Searches the response content of messages. No
responseTransformedContentSearch Searches the response transformed content of messages. No
processedResponseContentSearch Searches the processed response content of messages. No
connectorMapContentSearch Searches the connector map content of messages. No
channelMapContentSearch Searches the channel map content of messages. No
sourceMapContentSearch Searches the source map content of messages. No
responseMapContentSearch Searches the response map content of messages. No
processingErrorContentSearch Searches the processing error content of messages. No
postprocessorErrorContentSearch Searches the postprocessor error content of messages. No
responseErrorContentSearch Searches the response error content of messages. No
metaDataSearch Searches a custom metadata column. Value should be in the form: COLUMN_NAME <operator> value, where operator is one of the following: =, !=, <, <=, >, >=, CONTAINS, DOES NOT CONTAIN, STARTS WITH, DOES NOT START WITH, ENDS WITH, DOES NOT END WITH No
metaDataCaseInsensitiveSearch Searches a custom metadata column, ignoring case. Value should be in the form: COLUMN_NAME <operator> value. No
textSearchMetaDataColumn When using a text search, these custom metadata columns will also be searched. No
minSendAttempts The minimum number of send attempts for connector messages. No
maxSendAttempts The maximum number of send attempts for connector messages. No
attachment If true, only messages with attachments are included in the results. No
error If true, only messages with errors are included in the results. No

Responses:

Name Description Schema
default successful operation
---
#### Messages.exportMessagesServer1({channelId*, minMessageId, maxMessageId, minOriginalId, maxOriginalId, minImportId, maxImportId, startDate, endDate, textSearch, textSearchRegex, status, includedMetaDataId, excludedMetaDataId, serverId, rawContentSearch, processedRawContentSearch, transformedContentSearch, encodedContentSearch, sentContentSearch, responseContentSearch, responseTransformedContentSearch, processedResponseContentSearch, connectorMapContentSearch, channelMapContentSearch, sourceMapContentSearch, responseMapContentSearch, processingErrorContentSearch, postprocessorErrorContentSearch, responseErrorContentSearch, metaDataSearch, metaDataCaseInsensitiveSearch, textSearchMetaDataColumn, minSendAttempts, maxSendAttempts, attachment, error, pageSize, contentType, destinationContent, encrypt, includeAttachments, baseFolder, rootFolder, filePattern, archiveFileName, archiveFormat, compressFormat, password, encryptionType})

Summary: Exports messages into a specific directory path accessible by the server.

Description:

Parameters:

Name Description Required
channelId The ID of the channel. Yes
minMessageId The minimum message ID to query. No
maxMessageId The maximum message ID to query. No
minOriginalId The minimum original message ID to query. Messages that have been reprocessed will retain their original message ID. No
maxOriginalId The maximum original message ID to query. Messages that have been reprocessed will retain their original message ID. No
minImportId The minimum import message ID to query. Messages that have been imported will retain their original message ID under this value. No
maxImportId The maximum import message ID to query. Messages that have been imported will retain their original message ID under this value. No
startDate The earliest original received date to query by. Example: 1985-10-26T09:00:00.000-0700 No
endDate The latest original received date to query by. Example: 2015-10-21T07:28:00.000-0700 No
textSearch Searches all message content for this string. This process could take a long time depending on the amount of message content currently stored. Any message content that was encrypted by this channel will not be searchable. No
textSearchRegex If true, text search input will be considered a regular expression pattern to be matched. Only supported by PostgreSQL, MySQL and Oracle databases. No
status Determines which message statuses to query by. No
includedMetaDataId If present, only connector metadata IDs in this list will be queried. No
excludedMetaDataId If present, connector metadata IDs in this list will not be queried. No
serverId The server ID associated with messages. No
rawContentSearch Searches the raw content of messages. No
processedRawContentSearch Searches the processed raw content of messages. No
transformedContentSearch Searches the transformed content of messages. No
encodedContentSearch Searches the encoded content of messages. No
sentContentSearch Searches the sent content of messages. No
responseContentSearch Searches the response content of messages. No
responseTransformedContentSearch Searches the response transformed content of messages. No
processedResponseContentSearch Searches the processed response content of messages. No
connectorMapContentSearch Searches the connector map content of messages. No
channelMapContentSearch Searches the channel map content of messages. No
sourceMapContentSearch Searches the source map content of messages. No
responseMapContentSearch Searches the response map content of messages. No
processingErrorContentSearch Searches the processing error content of messages. No
postprocessorErrorContentSearch Searches the postprocessor error content of messages. No
responseErrorContentSearch Searches the response error content of messages. No
metaDataSearch Searches a custom metadata column. Value should be in the form: COLUMN_NAME <operator> value, where operator is one of the following: =, !=, <, <=, >, >=, CONTAINS, DOES NOT CONTAIN, STARTS WITH, DOES NOT START WITH, ENDS WITH, DOES NOT END WITH No
metaDataCaseInsensitiveSearch Searches a custom metadata column, ignoring case. Value should be in the form: COLUMN_NAME <operator> value. No
textSearchMetaDataColumn When using a text search, these custom metadata columns will also be searched. No
minSendAttempts The minimum number of send attempts for connector messages. No
maxSendAttempts The maximum number of send attempts for connector messages. No
attachment If true, only messages with attachments are included in the results. No
error If true, only messages with errors are included in the results. No
pageSize The maximum number of messages that will be queried at a time. No
contentType The ContentType that will be extracted from the message for writing. If null or not provided, the entire message will be written in serialized format. No
destinationContent If true, the content to write will be extracted from the destination message(s), rather than the source message. No
encrypt If true, message content will be encrypted before writing. No
includeAttachments Determines whether attachments will be included with messages. No
baseFolder The base directory to use when resolving relative paths in the root folder. No
rootFolder The root folder to contain the written messages/sub-folders. No
filePattern A string defining the folder/filename(s) for writing messages. It may contain variables to be replaced. No
archiveFileName The file name to use for archive exports. No
archiveFormat The archiver format to use to archive messages/folders that are written to the root folder. Valid values: zip, tar No
compressFormat The compressor format to use to compress the archive file. Only valid when using the TAR archive format. Valid values: gz, bzip2 No
password The password used to protect the archive file. Only valid when using the ZIP archive format. No
encryptionType The algorithm used to encrypt the password-protected archive file. Only valid when using the ZIP archive format. Valid values: STANDARD, AES128, AES256 No

Responses:

Name Description Schema
200 successful operation
---
#### Messages.exportMessagesServer2({channelId, filter, pageSize, writerOptions})

Summary: Exports messages into a specific directory path accessible by the server.

Description:

Parameters:

Name Description Required
channelId The ID of the channel. Yes
filter The MessageFilter object to use to query messages by. Yes
pageSize The maximum number of messages that will be queried at a time. No
writerOptions The MessageWriterOptions object containing various export options. No

Responses:

Name Description Schema
200 successful operation
---
#### Messages.importMessage({channelId, body})

Summary: Imports a Message object into a channel. The message will not actually be processed through the channel, only imported.

Description:

Parameters:

Name Description Required
channelId The ID of the channel. Yes
body The Message object to import. Yes

Responses:

Name Description Schema
default successful operation
---
#### Messages.importMessagesServer({channelId, body, includeSubfolders})

Summary: Imports messages into a channel from a path accessible by the server. The messages will not actually be processed through the channel, only imported.

Description:

Parameters:

Name Description Required
channelId The ID of the channel. Yes
body The directory path on the server side to import messages from. Yes
includeSubfolders If true, sub-folders will also be scanned recursively for messages. No

Responses:

Name Description Schema
200 successful operation
---
#### Messages.removeMessages2({channelId, body})

Summary: Remove messages by specific filter criteria.

Description:

Parameters:

Name Description Required
channelId The ID of the channel. Yes
body The MessageFilter object to use to query messages by. Yes

Responses:

Name Description Schema
default successful operation
---
#### Messages.removeAllMessages2({channelId*, restartRunningChannels, clearStatistics})

Summary: Removes all messages for the specified channel.

Description:

Parameters:

Name Description Required
channelId The ID of the channel. Yes
restartRunningChannels If true, currently running channels will be stopped and restarted as part of the remove process. Otherwise, currently running channels will not be included. No
clearStatistics If true, message statistics will also be cleared. No

Responses:

Name Description Schema
default successful operation
---
#### Messages.reprocessMessages1({channelId*, minMessageId, maxMessageId, minOriginalId, maxOriginalId, minImportId, maxImportId, startDate, endDate, textSearch, textSearchRegex, status, includedMetaDataId, excludedMetaDataId, serverId, rawContentSearch, processedRawContentSearch, transformedContentSearch, encodedContentSearch, sentContentSearch, responseContentSearch, responseTransformedContentSearch, processedResponseContentSearch, connectorMapContentSearch, channelMapContentSearch, sourceMapContentSearch, responseMapContentSearch, processingErrorContentSearch, postprocessorErrorContentSearch, responseErrorContentSearch, metaDataSearch, metaDataCaseInsensitiveSearch, textSearchMetaDataColumn, minSendAttempts, maxSendAttempts, attachment, error, replace, filterDestinations, metaDataId})

Summary: Reprocesses messages through a channel by specific filter criteria.

Description:

Parameters:

Name Description Required
channelId The ID of the channel. Yes
minMessageId The minimum message ID to query. No
maxMessageId The maximum message ID to query. No
minOriginalId The minimum original message ID to query. Messages that have been reprocessed will retain their original message ID. No
maxOriginalId The maximum original message ID to query. Messages that have been reprocessed will retain their original message ID. No
minImportId The minimum import message ID to query. Messages that have been imported will retain their original message ID under this value. No
maxImportId The maximum import message ID to query. Messages that have been imported will retain their original message ID under this value. No
startDate The earliest original received date to query by. Example: 1985-10-26T09:00:00.000-0700 No
endDate The latest original received date to query by. Example: 2015-10-21T07:28:00.000-0700 No
textSearch Searches all message content for this string. This process could take a long time depending on the amount of message content currently stored. Any message content that was encrypted by this channel will not be searchable. No
textSearchRegex If true, text search input will be considered a regular expression pattern to be matched. Only supported by PostgreSQL, MySQL and Oracle databases. No
status Determines which message statuses to query by. No
includedMetaDataId If present, only connector metadata IDs in this list will be queried. No
excludedMetaDataId If present, connector metadata IDs in this list will not be queried. No
serverId The server ID associated with messages. No
rawContentSearch Searches the raw content of messages. No
processedRawContentSearch Searches the processed raw content of messages. No
transformedContentSearch Searches the transformed content of messages. No
encodedContentSearch Searches the encoded content of messages. No
sentContentSearch Searches the sent content of messages. No
responseContentSearch Searches the response content of messages. No
responseTransformedContentSearch Searches the response transformed content of messages. No
processedResponseContentSearch Searches the processed response content of messages. No
connectorMapContentSearch Searches the connector map content of messages. No
channelMapContentSearch Searches the channel map content of messages. No
sourceMapContentSearch Searches the source map content of messages. No
responseMapContentSearch Searches the response map content of messages. No
processingErrorContentSearch Searches the processing error content of messages. No
postprocessorErrorContentSearch Searches the postprocessor error content of messages. No
responseErrorContentSearch Searches the response error content of messages. No
metaDataSearch Searches a custom metadata column. Value should be in the form: COLUMN_NAME <operator> value, where operator is one of the following: =, !=, <, <=, >, >=, CONTAINS, DOES NOT CONTAIN, STARTS WITH, DOES NOT START WITH, ENDS WITH, DOES NOT END WITH No
metaDataCaseInsensitiveSearch Searches a custom metadata column, ignoring case. Value should be in the form: COLUMN_NAME <operator> value. No
textSearchMetaDataColumn When using a text search, these custom metadata columns will also be searched. No
minSendAttempts The minimum number of send attempts for connector messages. No
maxSendAttempts The maximum number of send attempts for connector messages. No
attachment If true, only messages with attachments are included in the results. No
error If true, only messages with errors are included in the results. No
replace If true, the message will overwrite the current one No
filterDestinations If true, the metaDataId parameter will be used to determine which destinations to reprocess the message through. No
metaDataId Indicates which destinations to send the message to. No

Responses:

Name Description Schema
default successful operation
---
#### Messages.reprocessMessages2({channelId, body, replace, filterDestinations, metaDataId})

Summary: Reprocesses messages through a channel filtering with a MessageFilter.

Description:

Parameters:

Name Description Required
channelId The ID of the channel. Yes
body The MessageFilter object to use to query messages by. Yes
replace If true, the message will overwrite the current one No
filterDestinations If true, the metaDataId parameter will be used to determine which destinations to reprocess the message through. No
metaDataId Indicates which destinations to send the message to. No

Responses:

Name Description Schema
default successful operation
---
#### Messages.getMessages2({channelId, body, includeContent, offset, limit})

Summary: Search for messages by specific filter criteria.

Description:

Parameters:

Name Description Required
channelId The ID of the channel. Yes
body The MessageFilter object to use to query messages by. Yes
includeContent If true, message content will be returned with the results. No
offset Used for pagination, determines where to start in the search results. No
limit Used for pagination, determines the maximum number of results to return. No

Responses:

Name Description Schema
200 successful operation
---
#### Messages.getMessageCount1({channelId*, m