0.0.5 • Published 5 years ago

mirth-api v0.0.5

Weekly downloads
4
License
GPL-3.0-or-later
Repository
github
Last release
5 years ago

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

MirthApi.cookie

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:

NameDescriptionDefault ValueRequired
hostThe Mirth host ip or address.127.0.0.1No
portThe Mirth port.8443No
usernameThe username to use for login.adminNo
passwordThe password to use for login.adminNo
noLoginIf true will not attempt a login when instantiated.falseNo
disableTLSCheckDisabled 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.falseNo

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:

NameDescriptionDefault ValueRequired
usernameThe username.MirthApi.userNo
passwordThe password.MirthApi.passwordNo

Generated Functions from Swagger

Alerts.getAlerts({alertId})

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

Description:

Parameters:

NameDescriptionRequired
alertIdThe ID of the alert(s). If absent, all alerts will be returned.No

Responses:

NameDescriptionSchema
200successful operation

Alerts.createAlert({body*})

Summary: Creates a new alert.

Description:

Parameters:

NameDescriptionRequired
bodyThe alert to create.Yes

Responses:

NameDescriptionSchema
defaultsuccessful 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:

NameDescriptionRequired
bodyThe ID of the alert(s). If absent, all alerts will be returned.No

Responses:

NameDescriptionSchema
200successful operation

Alerts.getAlertInfo1({body*})

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

Description:

Parameters:

NameDescriptionRequired
bodyA map of ChannelHeader objects telling the server the state of the client-side channel cache.Yes

Responses:

NameDescriptionSchema
200successful operation

Alerts.getAlertProtocolOptions()

Summary: Returns all alert protocol options.

Description:

Parameters:

NameDescriptionRequired

Responses:

NameDescriptionSchema
200successful operation

Alerts.getAlertStatusList()

Summary: Returns all alert dashboard statuses.

Description:

Parameters:

NameDescriptionRequired

Responses:

NameDescriptionSchema
200successful operation

Alerts.getAlert({alertId*})

Summary: Retrieves an alert by ID.

Description:

Parameters:

NameDescriptionRequired
alertIdThe ID of the alert.Yes

Responses:

NameDescriptionSchema
200successful operation

Alerts.updateAlert({alertId, body})

Summary: Updates the specified alert.

Description:

Parameters:

NameDescriptionRequired
alertIdThe ID of the alert.Yes
bodyThe alert to create.Yes

Responses:

NameDescriptionSchema
defaultsuccessful operation

Alerts.removeAlert({alertId*})

Summary: Removes the specified alert.

Description:

Parameters:

NameDescriptionRequired
alertIdThe ID of the alert.Yes

Responses:

NameDescriptionSchema
defaultsuccessful operation

Alerts.disableAlert({alertId*})

Summary: Disables the specified alert.

Description:

Parameters:

NameDescriptionRequired
alertIdThe ID of the alert.Yes

Responses:

NameDescriptionSchema
defaultsuccessful operation

Alerts.enableAlert({alertId*})

Summary: Enables the specified alert.

Description:

Parameters:

NameDescriptionRequired
alertIdThe ID of the alert.Yes

Responses:

NameDescriptionSchema
defaultsuccessful operation

Alerts.getAlertInfo2({alertId, body})

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

Description:

Parameters:

NameDescriptionRequired
alertIdThe ID of the alert.Yes
bodyA map of ChannelHeader objects telling the server the state of the client-side channel cache.Yes

Responses:

NameDescriptionSchema
200successful operation

ChannelGroups.getChannelGroups({channelGroupId})

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

Description:

Parameters:

NameDescriptionRequired
channelGroupIdThe IDs of the channel groups to retrieve. If absent, all groups will be retrieved.No

Responses:

NameDescriptionSchema
200successful operation

ChannelGroups.updateChannelGroups({channelGroups, removedChannelGroupIds, override})

Summary: Updates all channel groups in one request.

Description:

Parameters:

NameDescriptionRequired
channelGroupsThe channel group object to update or create.No
removedChannelGroupIdsAll channel group IDs known to be removed.No
overrideIf true, the channel groups will be updated even if different revisions exist on the server.No

Responses:

NameDescriptionSchema
200successful 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:

NameDescriptionRequired
bodyThe IDs of the channel groups to retrieve. If absent, all groups will be retrieved.No

Responses:

NameDescriptionSchema
200successful operation

Channels.getChannels({channelId, pollingOnly})

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

Description:

Parameters:

NameDescriptionRequired
channelIdThe IDs of the channels to retrieve. If absent, all channels will be retrieved.No
pollingOnlyIf true, only channels with polling source connectors will be returned.No

Responses:

NameDescriptionSchema
200successful operation

Channels.createChannel({body*})

Summary: Creates a new channel.

Description:

Parameters:

NameDescriptionRequired
bodyThe Channel object to create.Yes

Responses:

NameDescriptionSchema
200successful operation

Channels.removeChannels({channelId*})

Summary: Removes the channels with the specified IDs.

Description:

Parameters:

NameDescriptionRequired
channelIdThe IDs of the channels to remove.Yes

Responses:

NameDescriptionSchema
defaultsuccessful 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:

NameDescriptionRequired
bodyThe IDs of the channels to retrieve. If absent, all channels will be retrieved.No
pollingOnlyIf true, only channels with polling source connectors will be returned.No

Responses:

NameDescriptionSchema
200successful 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:

NameDescriptionRequired
bodyA map of ChannelHeader objects telling the server the state of the client-side channel cache.Yes
ignoreNewChannelsIf true, summaries will only be returned for channels in the map's entry set.Yes

Responses:

NameDescriptionSchema
200successful 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:

NameDescriptionRequired
bodyThe IDs of the channels to remove.Yes

Responses:

NameDescriptionSchema
defaultsuccessful operation

Channels.setChannelEnabled1({channelId, enabled*})

Summary: Enables/disables the specified channels.

Description:

Parameters:

NameDescriptionRequired
channelIdThe IDs of the channels to enable/disable. If absent, all channels will be enabled/disabled.No
enabledIndicates whether the channels should be enabled or disabled.Yes

Responses:

NameDescriptionSchema
defaultsuccessful operation

Channels.setChannelInitialState1({channelId, initialState*})

Summary: Sets the initial state for the specified channels.

Description:

Parameters:

NameDescriptionRequired
channelIdThe IDs of the channels to modify initial states on. If absent, the initial state will be set on all channels.No
initialStateThe initial state of the channel.Yes

Responses:

NameDescriptionSchema
defaultsuccessful operation

Channels.getChannelIdsAndNames()

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

Description:

Parameters:

NameDescriptionRequired

Responses:

NameDescriptionSchema
200successful operation

Channels.getChannel({channelId*})

Summary: Retrieve a single channel by ID.

Description:

Parameters:

NameDescriptionRequired
channelIdThe ID of the channel to retrieve.Yes

Responses:

NameDescriptionSchema
200successful operation

Channels.updateChannel({channelId, body, override})

Summary: Updates the specified channel.

Description:

Parameters:

NameDescriptionRequired
channelIdThe ID of the channel to update.Yes
bodyThe Channel object to update with.Yes
overrideIf true, the channel will be updated even if a different revision exists on the server.No

Responses:

NameDescriptionSchema
200successful operation

Channels.removeChannel({channelId*})

Summary: Removes the channel with the specified ID.

Description:

Parameters:

NameDescriptionRequired
channelIdThe ID of the channel to remove.Yes

Responses:

NameDescriptionSchema
defaultsuccessful operation

Channels.getConnectorNames({channelId*})

Summary: Returns all connector names for a channel.

Description:

Parameters:

NameDescriptionRequired
channelIdThe ID of the channel.Yes

Responses:

NameDescriptionSchema
200successful operation

Channels.setChannelEnabled2({channelId, enabled})

Summary: Enables/disables the specified channel.

Description:

Parameters:

NameDescriptionRequired
channelIdThe ID of the channel.Yes
enabledThe enabled flag (true/false) to set.Yes

Responses:

NameDescriptionSchema
defaultsuccessful operation

Channels.setChannelInitialState2({channelId, initialState})

Summary: Sets the initial state for a single channel.

Description:

Parameters:

NameDescriptionRequired
channelIdThe ID of the channel.Yes
initialStateThe initial state of the channel.Yes

Responses:

NameDescriptionSchema
defaultsuccessful operation

Channels.getMetaDataColumns({channelId*})

Summary: Returns all metadata columns for a channel.

Description:

Parameters:

NameDescriptionRequired
channelIdThe ID of the channel.Yes

Responses:

NameDescriptionSchema
200successful operation

ChannelStatistics.clearAllStatistics()

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

Description:

Parameters:

NameDescriptionRequired

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelStatistics.clearStatistics({body*, received, filtered, sent, error})

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

Description:

Parameters:

NameDescriptionRequired
bodyChannel IDs mapped to lists of metaDataIds (connectors). If the metaDataId list is null, then all statistics for the channel will be cleared.Yes
receivedIf true, received stats will be cleared.No
filteredIf true, filtered stats will be cleared.No
sentIf true, sent stats will be cleared.No
errorIf true, error stats will be cleared.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelStatistics.getStatistics1({channelId, includeUndeployed, includeMetadataId, excludeMetadataId, aggregateStats})

Summary: Returns the Statistics for all channels.

Description:

Parameters:

NameDescriptionRequired
channelIdThe IDs of the channels to retrieve. If absent, all channels will be retrieved.No
includeUndeployedIf true, statistics for undeployed channels will also be included.No
includeMetadataIdThe ids of connectors to include. Cannot include and exclude connectors.No
excludeMetadataIdThe ids of connectors to exclude. Cannot include and exclude connectors.No
aggregateStatsIf true, statistics will be aggregated into one resultNo

Responses:

NameDescriptionSchema
200successful 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:

NameDescriptionRequired
channelIdsThe IDs of the channels to retrieve. If absent, all channels will be retrieved.No
includeUndeployedIf true, statistics for undeployed channels will also be included.No
includeMetadataIdsThe ids of connectors to include. Cannot include and exclude connectors.No
excludeMetadataIdsThe ids of connectors to exclude. Cannot include and exclude connectors.No
aggregateStatsIf true, statistics will be aggregated into one resultNo

Responses:

NameDescriptionSchema
200successful operation

ChannelStatistics.getStatistics2({channelId*})

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

Description:

Parameters:

NameDescriptionRequired
channelIdThe ID of the channel to retrieve statistics for.Yes

Responses:

NameDescriptionSchema
200successful operation

ChannelDeploymentOperations.deployChannels({body, returnErrors})

Summary: Deploys (or redeploys) selected channels.

Description:

Parameters:

NameDescriptionRequired
bodyThe ID of the channel(s) to deploy. If absent, all channels will be deployed.No
returnErrorsIf true, an error response code and the exception will be returned.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelDeploymentOperations.redeployAllChannels({returnErrors})

Summary: Redeploys all channels.

Description:

Parameters:

NameDescriptionRequired
returnErrorsIf true, an error response code and the exception will be returned.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelDeploymentOperations.undeployChannels({body, returnErrors})

Summary: Undeploys selected channels.

Description:

Parameters:

NameDescriptionRequired
bodyThe ID of the channel(s) to undeploy. If absent, all channels will be undeployed.No
returnErrorsIf true, an error response code and the exception will be returned.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelDeploymentOperations.deployChannel({channelId*, returnErrors})

Summary: Deploys (or redeploys) a single channel.

Description:

Parameters:

NameDescriptionRequired
channelIdThe ID of the channel to deploy.Yes
returnErrorsIf true, an error response code and the exception will be returned.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelDeploymentOperations.undeployChannel({channelId*, returnErrors})

Summary: Undeploys a single channel.

Description:

Parameters:

NameDescriptionRequired
channelIdThe ID of the channel to undeploy.Yes
returnErrorsIf true, an error response code and the exception will be returned.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelStatusOperations.haltChannels({channelId*, returnErrors})

Summary: Halts the channels with the specified IDs.

Description:

Parameters:

NameDescriptionRequired
channelIdThe channel IDs to halt.Yes
returnErrorsIf true, an error response code and the exception will be returned.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelStatusOperations.pauseChannels({channelId*, returnErrors})

Summary: Pauses the channels with the specified IDs.

Description:

Parameters:

NameDescriptionRequired
channelIdThe channel IDs to pause.Yes
returnErrorsIf true, an error response code and the exception will be returned.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelStatusOperations.resumeChannels({channelId*, returnErrors})

Summary: Resume the channels with the specified IDs.

Description:

Parameters:

NameDescriptionRequired
channelIdThe channel IDs to resume.Yes
returnErrorsIf true, an error response code and the exception will be returned.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelStatusOperations.startChannels({channelId*, returnErrors})

Summary: Starts the channels with the specified IDs.

Description:

Parameters:

NameDescriptionRequired
channelIdThe channel IDs to start.Yes
returnErrorsIf true, an error response code and the exception will be returned.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelStatusOperations.startConnectors({body*, returnErrors})

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

Description:

Parameters:

NameDescriptionRequired
bodyA map of channel and metadata IDs to start connectors for.Yes
returnErrorsIf true, an error response code and the exception will be returned.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelStatusOperations.stopChannels({channelId*, returnErrors})

Summary: Stops the channels with the specified IDs.

Description:

Parameters:

NameDescriptionRequired
channelIdThe channel IDs to stop.Yes
returnErrorsIf true, an error response code and the exception will be returned.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelStatusOperations.stopConnectors({body*, returnErrors})

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

Description:

Parameters:

NameDescriptionRequired
bodyA map of channel and metadata IDs to stop connectors for.Yes
returnErrorsIf true, an error response code and the exception will be returned.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelStatusOperations.getChannelStatusList({channelId, filter, includeUndeployed})

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

Description:

Parameters:

NameDescriptionRequired
channelIdThe channel IDs to return dashboard statuses for. If absent, all statuses will be returned.No
filterThe filter string to limit dashboard statuses with.No
includeUndeployedIf true, statuses for undeployed channels will also be included.No

Responses:

NameDescriptionSchema
200successful 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:

NameDescriptionRequired
bodyThe channel IDs to return dashboard statuses for. If absent, all statuses will be returned.No
filterThe filter string to limit dashboard statuses with.No
includeUndeployedIf true, statuses for undeployed channels will also be included.No

Responses:

NameDescriptionSchema
200successful 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:

NameDescriptionRequired
fetchSizeSpecifies the maximum number of statuses to return.Yes
filterThe filter string to limit dashboard statuses with.No

Responses:

NameDescriptionSchema
200successful operation

ChannelStatusOperations.haltChannel({channelId*, returnErrors})

Summary: Halts the channel with the specified ID.

Description:

Parameters:

NameDescriptionRequired
channelIdThe channel ID to halt.Yes
returnErrorsIf true, an error response code and the exception will be returned.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelStatusOperations.pauseChannel({channelId*, returnErrors})

Summary: Pauses the channel with the specified ID.

Description:

Parameters:

NameDescriptionRequired
channelIdThe channel ID to pause.Yes
returnErrorsIf true, an error response code and the exception will be returned.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelStatusOperations.resumeChannel({channelId*, returnErrors})

Summary: Resumes the channel with the specified ID.

Description:

Parameters:

NameDescriptionRequired
channelIdThe channel ID to resume.Yes
returnErrorsIf true, an error response code and the exception will be returned.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelStatusOperations.startChannel({channelId*, returnErrors})

Summary: Starts the channel with the specified ID.

Description:

Parameters:

NameDescriptionRequired
channelIdThe channel ID to start.Yes
returnErrorsIf true, an error response code and the exception will be returned.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelStatusOperations.stopChannel({channelId*, returnErrors})

Summary: Stops the channel with the specified ID.

Description:

Parameters:

NameDescriptionRequired
channelIdThe channel ID to stop.Yes
returnErrorsIf true, an error response code and the exception will be returned.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelStatusOperations.startConnector({channelId, metaDataId, returnErrors})

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

Description:

Parameters:

NameDescriptionRequired
channelIdThe channel ID to start a connector for.Yes
metaDataIdThe connector metadata ID to start.Yes
returnErrorsIf true, an error response code and the exception will be returned.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelStatusOperations.stopConnector({channelId, metaDataId, returnErrors})

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

Description:

Parameters:

NameDescriptionRequired
channelIdThe channel ID to stop a connector for.Yes
metaDataIdThe connector metadata ID to stop.Yes
returnErrorsIf true, an error response code and the exception will be returned.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

ChannelStatusOperations.getChannelStatus({channelId*})

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

Description:

Parameters:

NameDescriptionRequired
channelIdThe channel ID to return a dashboard status for.Yes

Responses:

NameDescriptionSchema
200successful operation

Messages.removeAllMessages1({channelId*, restartRunningChannels, clearStatistics})

Summary: Removes all messages for multiple specified channels.

Description:

Parameters:

NameDescriptionRequired
channelIdThe IDs of the channels.Yes
restartRunningChannelsIf true, currently running channels will be stopped and restarted as part of the remove process. Otherwise, currently running channels will not be included.No
clearStatisticsIf true, message statistics will also be cleared.No

Responses:

NameDescriptionSchema
defaultsuccessful 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:

NameDescriptionRequired
bodyThe IDs of the channels.Yes
restartRunningChannelsIf true, currently running channels will be stopped and restarted as part of the remove process. Otherwise, currently running channels will not be included.No
clearStatisticsIf true, message statistics will also be cleared.No

Responses:

NameDescriptionSchema
defaultsuccessful 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:

NameDescriptionRequired
channelIdThe ID of the channel.Yes
minMessageIdThe minimum message ID to query.No
maxMessageIdThe maximum message ID to query.No
minOriginalIdThe minimum original message ID to query. Messages that have been reprocessed will retain their original message ID.No
maxOriginalIdThe maximum original message ID to query. Messages that have been reprocessed will retain their original message ID.No
minImportIdThe minimum import message ID to query. Messages that have been imported will retain their original message ID under this value.No
maxImportIdThe maximum import message ID to query. Messages that have been imported will retain their original message ID under this value.No
startDateThe earliest original received date to query by. Example: 1985-10-26T09:00:00.000-0700No
endDateThe latest original received date to query by. Example: 2015-10-21T07:28:00.000-0700No
textSearchSearches 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
textSearchRegexIf true, text search input will be considered a regular expression pattern to be matched. Only supported by PostgreSQL, MySQL and Oracle databases.No
statusDetermines which message statuses to query by.No
includedMetaDataIdIf present, only connector metadata IDs in this list will be queried.No
excludedMetaDataIdIf present, connector metadata IDs in this list will not be queried.No
serverIdThe server ID associated with messages.No
rawContentSearchSearches the raw content of messages.No
processedRawContentSearchSearches the processed raw content of messages.No
transformedContentSearchSearches the transformed content of messages.No
encodedContentSearchSearches the encoded content of messages.No
sentContentSearchSearches the sent content of messages.No
responseContentSearchSearches the response content of messages.No
responseTransformedContentSearchSearches the response transformed content of messages.No
processedResponseContentSearchSearches the processed response content of messages.No
connectorMapContentSearchSearches the connector map content of messages.No
channelMapContentSearchSearches the channel map content of messages.No
sourceMapContentSearchSearches the source map content of messages.No
responseMapContentSearchSearches the response map content of messages.No
processingErrorContentSearchSearches the processing error content of messages.No
postprocessorErrorContentSearchSearches the postprocessor error content of messages.No
responseErrorContentSearchSearches the response error content of messages.No
metaDataSearchSearches 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 WITHNo
metaDataCaseInsensitiveSearchSearches a custom metadata column, ignoring case. Value should be in the form: COLUMN_NAME <operator> value.No
textSearchMetaDataColumnWhen using a text search, these custom metadata columns will also be searched.No
minSendAttemptsThe minimum number of send attempts for connector messages.No
maxSendAttemptsThe maximum number of send attempts for connector messages.No
attachmentIf true, only messages with attachments are included in the results.No
errorIf true, only messages with errors are included in the results.No
includeContentIf true, message content will be returned with the results.No
offsetUsed for pagination, determines where to start in the search results.No
limitUsed for pagination, determines the maximum number of results to return.No

Responses:

NameDescriptionSchema
200successful operation

Messages.processMessage1({channelId, body, destinationMetaDataId, sourceMapEntry, overwrite, imported, originalMessageId})

Summary: Processes a new message through a channel.

Description:

Parameters:

NameDescriptionRequired
channelIdThe ID of the channel.Yes
bodyThe raw message data to process.Yes
destinationMetaDataIdIndicates which destinations to send the message to.No
sourceMapEntryThese entries will be injected into the source map for the message. Value should be in the format: key=valueNo
overwriteIf true and a valid original message ID is given, this message will overwrite the existing one.No
importedIf true, marks this message as being imported. If the message is overwriting an existing one, then statistics will not be decremented.No
originalMessageIdThe original message ID this message is associated with.No

Responses:

NameDescriptionSchema
200successful 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:

NameDescriptionRequired
channelIdThe ID of the channel.Yes
minMessageIdThe minimum message ID to query.No
maxMessageIdThe maximum message ID to query.No
minOriginalIdThe minimum original message ID to query. Messages that have been reprocessed will retain their original message ID.No
maxOriginalIdThe maximum original message ID to query. Messages that have been reprocessed will retain their original message ID.No
minImportIdThe minimum import message ID to query. Messages that have been imported will retain their original message ID under this value.No
maxImportIdThe maximum import message ID to query. Messages that have been imported will retain their original message ID under this value.No
startDateThe earliest original received date to query by. Example: 1985-10-26T09:00:00.000-0700No
endDateThe latest original received date to query by. Example: 2015-10-21T07:28:00.000-0700No
textSearchSearches 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
textSearchRegexIf true, text search input will be considered a regular expression pattern to be matched. Only supported by PostgreSQL, MySQL and Oracle databases.No
statusDetermines which message statuses to query by.No
includedMetaDataIdIf present, only connector metadata IDs in this list will be queried.No
excludedMetaDataIdIf present, connector metadata IDs in this list will not be queried.No
serverIdThe server ID associated with messages.No
rawContentSearchSearches the raw content of messages.No
processedRawContentSearchSearches the processed raw content of messages.No
transformedContentSearchSearches the transformed content of messages.No
encodedContentSearchSearches the encoded content of messages.No
sentContentSearchSearches the sent content of messages.No
responseContentSearchSearches the response content of messages.No
responseTransformedContentSearchSearches the response transformed content of messages.No
processedResponseContentSearchSearches the processed response content of messages.No
connectorMapContentSearchSearches the connector map content of messages.No
channelMapContentSearchSearches the channel map content of messages.No
sourceMapContentSearchSearches the source map content of messages.No
responseMapContentSearchSearches the response map content of messages.No
processingErrorContentSearchSearches the processing error content of messages.No
postprocessorErrorContentSearchSearches the postprocessor error content of messages.No
responseErrorContentSearchSearches the response error content of messages.No
metaDataSearchSearches 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 WITHNo
metaDataCaseInsensitiveSearchSearches a custom metadata column, ignoring case. Value should be in the form: COLUMN_NAME <operator> value.No
textSearchMetaDataColumnWhen using a text search, these custom metadata columns will also be searched.No
minSendAttemptsThe minimum number of send attempts for connector messages.No
maxSendAttemptsThe maximum number of send attempts for connector messages.No
attachmentIf true, only messages with attachments are included in the results.No
errorIf true, only messages with errors are included in the results.No

Responses:

NameDescriptionSchema
defaultsuccessful 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:

NameDescriptionRequired
channelIdThe ID of the channel.Yes
minMessageIdThe minimum message ID to query.No
maxMessageIdThe maximum message ID to query.No
minOriginalIdThe minimum original message ID to query. Messages that have been reprocessed will retain their original message ID.No
maxOriginalIdThe maximum original message ID to query. Messages that have been reprocessed will retain their original message ID.No
minImportIdThe minimum import message ID to query. Messages that have been imported will retain their original message ID under this value.No
maxImportIdThe maximum import message ID to query. Messages that have been imported will retain their original message ID under this value.No
startDateThe earliest original received date to query by. Example: 1985-10-26T09:00:00.000-0700No
endDateThe latest original received date to query by. Example: 2015-10-21T07:28:00.000-0700No
textSearchSearches 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
textSearchRegexIf true, text search input will be considered a regular expression pattern to be matched. Only supported by PostgreSQL, MySQL and Oracle databases.No
statusDetermines which message statuses to query by.No
includedMetaDataIdIf present, only connector metadata IDs in this list will be queried.No
excludedMetaDataIdIf present, connector metadata IDs in this list will not be queried.No
serverIdThe server ID associated with messages.No
rawContentSearchSearches the raw content of messages.No
processedRawContentSearchSearches the processed raw content of messages.No
transformedContentSearchSearches the transformed content of messages.No
encodedContentSearchSearches the encoded content of messages.No
sentContentSearchSearches the sent content of messages.No
responseContentSearchSearches the response content of messages.No
responseTransformedContentSearchSearches the response transformed content of messages.No
processedResponseContentSearchSearches the processed response content of messages.No
connectorMapContentSearchSearches the connector map content of messages.No
channelMapContentSearchSearches the channel map content of messages.No
sourceMapContentSearchSearches the source map content of messages.No
responseMapContentSearchSearches the response map content of messages.No
processingErrorContentSearchSearches the processing error content of messages.No
postprocessorErrorContentSearchSearches the postprocessor error content of messages.No
responseErrorContentSearchSearches the response error content of messages.No
metaDataSearchSearches 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 WITHNo
metaDataCaseInsensitiveSearchSearches a custom metadata column, ignoring case. Value should be in the form: COLUMN_NAME <operator> value.No
textSearchMetaDataColumnWhen using a text search, these custom metadata columns will also be searched.No
minSendAttemptsThe minimum number of send attempts for connector messages.No
maxSendAttemptsThe maximum number of send attempts for connector messages.No
attachmentIf true, only messages with attachments are included in the results.No
errorIf true, only messages with errors are included in the results.No
pageSizeThe maximum number of messages that will be queried at a time.No
contentTypeThe 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
destinationContentIf true, the content to write will be extracted from the destination message(s), rather than the source message.No
encryptIf true, message content will be encrypted before writing.No
includeAttachmentsDetermines whether attachments will be included with messages.No
baseFolderThe base directory to use when resolving relative paths in the root folder.No
rootFolderThe root folder to contain the written messages/sub-folders.No
filePatternA string defining the folder/filename(s) for writing messages. It may contain variables to be replaced.No
archiveFileNameThe file name to use for archive exports.No
archiveFormatThe archiver format to use to archive messages/folders that are written to the root folder. Valid values: zip, tarNo
compressFormatThe compressor format to use to compress the archive file. Only valid when using the TAR archive format. Valid values: gz, bzip2No
passwordThe password used to protect the archive file. Only valid when using the ZIP archive format.No
encryptionTypeThe algorithm used to encrypt the password-protected archive file. Only valid when using the ZIP archive format. Valid values: STANDARD, AES128, AES256No

Responses:

NameDescriptionSchema
200successful operation

Messages.exportMessagesServer2({channelId, filter, pageSize, writerOptions})

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

Description:

Parameters:

NameDescriptionRequired
channelIdThe ID of the channel.Yes
filterThe MessageFilter object to use to query messages by.Yes
pageSizeThe maximum number of messages that will be queried at a time.No
writerOptionsThe MessageWriterOptions object containing various export options.No

Responses:

NameDescriptionSchema
200successful 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:

NameDescriptionRequired
channelIdThe ID of the channel.Yes
bodyThe Message object to import.Yes

Responses:

NameDescriptionSchema
defaultsuccessful 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:

NameDescriptionRequired
channelIdThe ID of the channel.Yes
bodyThe directory path on the server side to import messages from.Yes
includeSubfoldersIf true, sub-folders will also be scanned recursively for messages.No

Responses:

NameDescriptionSchema
200successful operation

Messages.removeMessages2({channelId, body})

Summary: Remove messages by specific filter criteria.

Description:

Parameters:

NameDescriptionRequired
channelIdThe ID of the channel.Yes
bodyThe MessageFilter object to use to query messages by.Yes

Responses:

NameDescriptionSchema
defaultsuccessful operation

Messages.removeAllMessages2({channelId*, restartRunningChannels, clearStatistics})

Summary: Removes all messages for the specified channel.

Description:

Parameters:

NameDescriptionRequired
channelIdThe ID of the channel.Yes
restartRunningChannelsIf true, currently running channels will be stopped and restarted as part of the remove process. Otherwise, currently running channels will not be included.No
clearStatisticsIf true, message statistics will also be cleared.No

Responses:

NameDescriptionSchema
defaultsuccessful 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:

NameDescriptionRequired
channelIdThe ID of the channel.Yes
minMessageIdThe minimum message ID to query.No
maxMessageIdThe maximum message ID to query.No
minOriginalIdThe minimum original message ID to query. Messages that have been reprocessed will retain their original message ID.No
maxOriginalIdThe maximum original message ID to query. Messages that have been reprocessed will retain their original message ID.No
minImportIdThe minimum import message ID to query. Messages that have been imported will retain their original message ID under this value.No
maxImportIdThe maximum import message ID to query. Messages that have been imported will retain their original message ID under this value.No
startDateThe earliest original received date to query by. Example: 1985-10-26T09:00:00.000-0700No
endDateThe latest original received date to query by. Example: 2015-10-21T07:28:00.000-0700No
textSearchSearches 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
textSearchRegexIf true, text search input will be considered a regular expression pattern to be matched. Only supported by PostgreSQL, MySQL and Oracle databases.No
statusDetermines which message statuses to query by.No
includedMetaDataIdIf present, only connector metadata IDs in this list will be queried.No
excludedMetaDataIdIf present, connector metadata IDs in this list will not be queried.No
serverIdThe server ID associated with messages.No
rawContentSearchSearches the raw content of messages.No
processedRawContentSearchSearches the processed raw content of messages.No
transformedContentSearchSearches the transformed content of messages.No
encodedContentSearchSearches the encoded content of messages.No
sentContentSearchSearches the sent content of messages.No
responseContentSearchSearches the response content of messages.No
responseTransformedContentSearchSearches the response transformed content of messages.No
processedResponseContentSearchSearches the processed response content of messages.No
connectorMapContentSearchSearches the connector map content of messages.No
channelMapContentSearchSearches the channel map content of messages.No
sourceMapContentSearchSearches the source map content of messages.No
responseMapContentSearchSearches the response map content of messages.No
processingErrorContentSearchSearches the processing error content of messages.No
postprocessorErrorContentSearchSearches the postprocessor error content of messages.No
responseErrorContentSearchSearches the response error content of messages.No
metaDataSearchSearches 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 WITHNo
metaDataCaseInsensitiveSearchSearches a custom metadata column, ignoring case. Value should be in the form: COLUMN_NAME <operator> value.No
textSearchMetaDataColumnWhen using a text search, these custom metadata columns will also be searched.No
minSendAttemptsThe minimum number of send attempts for connector messages.No
maxSendAttemptsThe maximum number of send attempts for connector messages.No
attachmentIf true, only messages with attachments are included in the results.No
errorIf true, only messages with errors are included in the results.No
replaceIf true, the message will overwrite the current oneNo
filterDestinationsIf true, the metaDataId parameter will be used to determine which destinations to reprocess the message through.No
metaDataIdIndicates which destinations to send the message to.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

Messages.reprocessMessages2({channelId, body, replace, filterDestinations, metaDataId})

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

Description:

Parameters:

NameDescriptionRequired
channelIdThe ID of the channel.Yes
bodyThe MessageFilter object to use to query messages by.Yes
replaceIf true, the message will overwrite the current oneNo
filterDestinationsIf true, the metaDataId parameter will be used to determine which destinations to reprocess the message through.No
metaDataIdIndicates which destinations to send the message to.No

Responses:

NameDescriptionSchema
defaultsuccessful operation

Messages.getMessages2({channelId, body, includeContent, offset, limit})

Summary: Search for messages by specific filter criteria.

Description:

Parameters:

NameDescriptionRequired
channelIdThe ID of the channel.Yes
bodyThe MessageFilter object to use to query messages by.Yes
includeContentIf true, message content will be returned with the results.No
offsetUsed for pagination, determines where to start in the search results.No
limitUsed for pagination, determines the maximum number of results to return.No

Responses:

NameDescriptionSchema
200successful operation

Messages.getMessageCount1({channelId*, m