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 mirthclilauncher.jar
resides).
java jar mirthclilauncher.jar mirthclilauncher.xml a https://127.0.0.1:<https.port> u
<userid> p <password> v 0.0.0
Example
(c) 20112013 Amaron.be
java jar mirthclilauncher.jar mirthclilauncher.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) 20112013 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) 20112013 Amaron.be
java jar mirthclilauncher.jar mirthclilauncher.xml a https://127.0.0.1:<https.port> u
<userid> p <password> v 0.0.0 s <path.to.scriptfile>
Example:
java jar mirthclilauncher.jar mirthclilauncher.xml a https://127.0.0.1:55502 u admin p
admin v 0.0.0 s mirthscript.txt
Example contents of mirthscript.txt:
exportcfg bkpnico20130310.xml
(c) 20112013 Amaron.be