Announcement

Collapse
No announcement yet.

Mirth Shell Commands

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mirth Shell Commands

    I'm looking online to get a lit of Mirth Shell commands and I'm referencing this site below. The version of Mirth says 1.8 for these shell commands and didn't know if there was any updates to this document.

    [URL="http://www.mirthcorp.com/community/wiki/display/mirthuserguidev1r8p0/Shell+Commands"]

    Also per documentation I don't see a command to import a channel group or import code templates, does Mirth have the ability to import these configs via shell command.

    Mirth Version 3.4.1.8057
    Webservice to the end, Mirth

  • #2
    I also have not found the latest official mirth-cli list of commands, however there is a help command that you can execute inside the mirth-cli.
    To import a code library, it is:
    codetemplate library import "{LOCALDRIVE}\Mirth\channels\General Library.xml" force
    The "library" is optional, so you can still import scripts not in a library. Substitute between the quote characters the fully qualified path to your file.

    Groups cannot be imported via the cli. Narupley stated it could be done via the web service interface, but I didn't figure that out in the time I spent on it. I've been intending to revisit it.
    Last edited by ahart; 10-17-2016, 02:36 PM.

    Comment


    • #3
      Thanks ahart for the info.
      Webservice to the end, Mirth

      Comment


      • #4
        2 years later, here is the Mirth Shell commands from the help list for 3.4:
        Code:
        java -jar mirth-cli-launcher.jar -ahttps://localhost:8443 -uusername -ppassword
        Connected to Mirth Connect server @ https://localhost:8443 (3.4.0.8000)
        $help
        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 existing channels.
        
        export id|"name"|* "path"
                Exports the specified channel to <path>
        
        importcfg "path" [nodeploy]
                Imports configuration specified by <path>.  Optional 'nodeploy' stops channels from being deployed after importing.
        
        exportcfg "path"
                Exports the configuration to <path>
        
        importalert "path" [force]
                Imports alert specified by <path>.  Optional 'force' overwrites existing alerts.
        
        exportalert id|"name"|* "path"
                Exports the specified alert to <path>
        
        importscripts "path"
                Imports global script specified by <path>
        
        exportscripts "path"
                Exports global script to <path>
        
        codetemplate library list [includecodetemplates]
                Lists all code template libraries. Optional 'includecodetemplates' additionally lists the code templates within each library.
        
        codetemplate list
                Lists all code templates.
        
        codetemplate [library] import path [force]
                Imports code templates or libraries (with the 'library' option).
        
        codetemplate library export id|name|* path
                Exports all matched code template libraries to <path>.
        
        codetemplate export id|name path
                Exports a single code template to <path>.
        
        codetemplate library remove id|name|*
                Removes all matched code template libraries.
        
        codetemplate remove id|name
                Removes a single code template.
        
        importmessages "path" id
                Imports messages specified by <path> into the channel specified by <id>
        
        exportmessages "path/file-pattern" id [xml|xml-attach|raw|processedraw|transformed|encoded|response] [pageSize]
                Exports all messages for channel specified by <id> to <path>
        
        importmap "path"
                Imports configuration map specified by <path>
        
        exportmap "path"
                Exports configuration map to <path>
        
        channel undeploy|deploy|start|stop|halt|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 (running channels will be restarted)
        
        resetstats [lifetime]
                Removes all stats from all Channels. Optional 'lifetime' includes resetting lifetime stats.
        
        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

        Comment

        Working...
        X