web stats
Client API - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 11-20-2017, 02:12 AM
AlexNeiva AlexNeiva is offline
Mirth Guru
 
Join Date: Oct 2013
Location: Portugal
Posts: 277
AlexNeiva is on a distinguished road
Post Client API

Hello,

i'm using Mirth 3.5.1 and i just want to ask if we can use the Client API in Mirth itself...
Using a HTTP Sender, can we invoke the REST services?
I try to do that but with no luck! I get some SSL errors.

Best Regards
Reply With Quote
  #2  
Old 11-20-2017, 02:36 AM
obsessio obsessio is offline
OBX.3 Kenobi
 
Join Date: Mar 2015
Location: Turkey
Posts: 164
obsessio is on a distinguished road
Default

Yes you can use it. If you're using an HTTP Sender to invoke API (which has HTTPS protocol), then you need to import the certificate into the default Java truststore.
Reply With Quote
  #3  
Old 11-20-2017, 08:18 AM
AlexNeiva AlexNeiva is offline
Mirth Guru
 
Join Date: Oct 2013
Location: Portugal
Posts: 277
AlexNeiva is on a distinguished road
Default

Were can i get the certificate?
Reply With Quote
  #4  
Old 11-22-2017, 02:22 AM
nalmeida nalmeida is offline
What's HL7?
 
Join Date: Nov 2017
Posts: 2
nalmeida is on a distinguished road
Default

You can export it from your browser and then import in the Java truststore.
Reply With Quote
  #5  
Old 04-08-2018, 09:53 PM
SeanSpeer SeanSpeer is offline
Mirth Newb
 
Join Date: Nov 2016
Posts: 6
SeanSpeer is on a distinguished road
Default

Is there any official documentation on the Client API and maybe some simple super secret squirrel channels that can be shared?

That'd sure be great to get some of us started in using it.

Thx!
Reply With Quote
  #6  
Old 04-08-2018, 10:31 PM
odo odo is offline
OBX.3 Kenobi
 
Join Date: Feb 2017
Location: Luxembourg
Posts: 139
odo is on a distinguished road
Default

I would recommend to only use the webservice api directyl from within mirth if you want to remotely access mirth instances of another version than the calling instance.

If both are of the same version, I would strongly recommend using the mirth client instead (com.mirth.connect.client.core.Client). It encapsulates the calls to the mirth server and is much more convenient than using the webservice api directly.
Reply With Quote
  #7  
Old 04-08-2018, 10:39 PM
SeanSpeer SeanSpeer is offline
Mirth Newb
 
Join Date: Nov 2016
Posts: 6
SeanSpeer is on a distinguished road
Default

Thx odo... makes perfect sense.

I found some documentation that seems pretty neat. I don't know the rules of sharing this documentation I pulled off the success community... but if anyone has questions I'm sure I can point them in the right direction.

I still haven't found any sample channels based on this... still looking around for that. I learn better by breaking things than reading.
Reply With Quote
  #8  
Old 04-08-2018, 10:49 PM
odo odo is offline
OBX.3 Kenobi
 
Join Date: Feb 2017
Location: Luxembourg
Posts: 139
odo is on a distinguished road
Default

Quote:
Originally Posted by SeanSpeer View Post
I still haven't found any sample channels based on this
If you are into Java, the best documentation probably is browsing the source code.

If you need an example of how to use the mirth client class, you can find it in this thread.

There is a code template which uses the mirth client for backing up remote mirth instances.
Reply With Quote
  #9  
Old 04-08-2018, 10:58 PM
SeanSpeer SeanSpeer is offline
Mirth Newb
 
Join Date: Nov 2016
Posts: 6
SeanSpeer is on a distinguished road
Default

This is awesome! I love browsing the code and learning how to do it that way. Excellent thread... I'll be looking at more of your posts too as I'm sure I can pull a lot of info from them.

I appreciate the help!
Reply With Quote
Reply

Tags
api, client api, postman, rest

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 03:50 PM.


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