0% found this document useful (0 votes)
203 views

Mirth Connect Command Line Interface

This document provides information about using the Mirth Connect command line interface. It describes how to connect to Mirth Connect from the command line and lists available commands for managing channels, configurations, scripts and more.

Uploaded by

Foamr
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
203 views

Mirth Connect Command Line Interface

This document provides information about using the Mirth Connect command line interface. It describes how to connect to Mirth Connect from the command line and lists available commands for managing channels, configurations, scripts and more.

Uploaded by

Foamr
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Mirth Connect Command Line Interface

Suggestion

Create a specific user in Mirth Connect Administrator for the command line interface

Quick start

Lookup the HTTPS port in the Mirth configuration file

Mirth.properties
https.port = 8443

Command line

Change current directory to the Mirth Connect root folder (where the file mirth­cli­launcher.jar
resides).

java ­jar mirth­cli­launcher.jar mirth­cli­launcher.xml ­a https://127.0.0.1:<https.port> ­u


<userid> ­p <password> ­v 0.0.0

Example

(c) 2011­2013 ­ Amaron.be


java ­jar mirth­cli­launcher.jar mirth­cli­launcher.xml ­a https://127.0.0.1:55502 ­u admin ­p
admin ­v 0.0.0

If the connection succeeds you should see this:

Type “help” to get the list of available commands

Available Commands:
status
Returns status of deployed channels

deploy [timeout]
Deploys all Channels with optional timeout (in seconds)

import "path" [force]


Imports channel specified by <path>. Optional 'force' overwrites existi
ng channels.

export id|"name"|* "path"


Exports the specified channel to <path>

importcfg "path"
Imports configuration specified by <path>

exportcfg "path"
Exports the configuration to <path>

importalerts "path"
Imports alerts specified by <path>

exportalerts "path"
Exports alerts to <path>

importscripts "path"
Imports global script specified by <path>

exportscripts "path"

Exports global script to <path>

(c) 2011­2013 ­ Amaron.be


importcodetemplates "path"
Imports code templates specified by <path>

exportcodetemplates "path"
Exports code templates to <path>

importmessages "path" id
Imports messages specified by <path> into the channel specified by <id>

exportmessages "path" id [xml|raw|transformed|encoded] [pageSize]


Exports all messages for channel specified by <id> to <path>

channel undeploy|deploy|start|stop|pause|resume|stats id|"name"|*


Performs specified channel action

channel remove|enable|disable id|"name"|*


Remove, enable or disable specified channel

channel list
Lists all Channels

clearallmessages
Removes all messages from all Channels

resetstats
Removes all stats from all Channels

dump stats|events "path"


Dumps stats or events to specified file

user list
Returns a list of the current users

user add username "password" "firstName" "lastName" "organization" "email"


Adds the specified user

user remove id|username


Removes the specified user

user changepw id|username "newpassword"


Changes the specified user's password

quit
Quits Mirth Connect Shell

Launch a script to perform some automated tasks (e.g. backup)

Command line:

(c) 2011­2013 ­ Amaron.be


java ­jar mirth­cli­launcher.jar mirth­cli­launcher.xml ­a https://127.0.0.1:<https.port> ­u
<userid> ­p <password> ­v 0.0.0 ­s <path.to.scriptfile>

Example:

java ­jar mirth­cli­launcher.jar mirth­cli­launcher.xml ­a https://127.0.0.1:55502 ­u admin ­p


admin ­v 0.0.0 ­s mirth­script.txt

Example contents of mirth­script.txt:

exportcfg bkp­nico­20130310.xml

(c) 2011­2013 ­ Amaron.be

You might also like