web stats
Admin API question - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 04-13-2015, 10:07 AM
mby01 mby01 is offline
Mirth Newb
 
Join Date: Jan 2014
Posts: 20
mby01 is on a distinguished road
Default Admin API question

Hello, I'd like to create a Windows application that implements some of the basic functionality available via the Mirth Connect Administrator app. Mainly, the ability to stop and start channels, and to export and import channels between two Mirth Connect servers.

I'm assuming the Mirth Connect Administrator communicates with the Mirth Connect server via SOAP and/or REST-based calls, and would basically just like to do the same thing from my Windows application.

Thanks!
Reply With Quote
  #2  
Old 04-13-2015, 10:10 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,124
narupley is on a distinguished road
Default

Yep that's right, there's an internal HTTP API used by the client to communicate with the server. Strictly speaking it's not REST though. The class you'd want to look at is com.mirth.connect.core.Client.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #3  
Old 04-13-2015, 10:26 AM
mby01 mby01 is offline
Mirth Newb
 
Join Date: Jan 2014
Posts: 20
mby01 is on a distinguished road
Default

Thanks, I'll check it out.

I wonder if it will be easier to try and use the com.mirth.connect.core.Client class (using IKVM) to issue those HTTP calls in my Windows application, as opposed to mimicking those HTTP calls directly in .NET.

If anyone's done this before in .NET, please share
Reply With Quote
  #4  
Old 04-13-2015, 10:43 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,124
narupley is on a distinguished road
Default

You might also look into the CLI (mccommand). It can already do most of what the Administrator UI does. You can invoke it via an OS shell from within your .NET application, and pass it the "-s <script>" option to point to a file containing a list of commands.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #5  
Old 04-13-2015, 10:56 AM
mby01 mby01 is offline
Mirth Newb
 
Join Date: Jan 2014
Posts: 20
mby01 is on a distinguished road
Default

Thanks, using the CLI seems like a pretty useful option. I'll look into that also.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 07:50 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation