web stats
Acess to Mirth REST API - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 02-20-2018, 11:29 AM
AlexNeiva AlexNeiva is offline
Mirth Guru
Join Date: Oct 2013
Location: Portugal
Posts: 277
AlexNeiva is on a distinguished road
Post Acess to Mirth REST API

Hello everyone,

i'm creating this post just to share a piece of "code" regarding the Mirth REST API.
I wanted to access the Mirth REST API services, using the Mirth itself but, with no success because of the SSL Certificate.

So, i develop a external .jar which can handle that perfectly, and just need to include it on the Mirth custom-lib folder.
I don't know if anyone face the same situation, or anyone would like to have access to those services, which are super great, using Mirth, so
that is why I'm sharing this.

Just copy the attached .jar file to the custom-lib folder in Mirth directory, and restart Mirth Service.
Then, on Mirth just need to create a new channel, WebService Listener, and choose the custom webservice that is on the custom-lib folder.
Then is just use it and invoke the operations that you need.

For now, i just made 6 operations, which are:

- login
- logout
- get channels
- get server version
- get server status
- get users

For each operation, first we need to login to get the cookie response from that. Just after getting this cookie, then yes, we can invoke the rest of the operations. This is not my invention, but yes a "must" from Mirth REST API, which i obviously agree for security purposes.

  • mirth.customws.jar - the jar file to put on custom-lib folder
  • WS_Test.xml - channel that create a "workflow" to call all the operations needed, managing the cookie from login (login->get channels->logout, etc)
  • Master_WS.xml - the channel that exposes the .jar service to call the Mirth REST Services

Just use, and give feedback please.

Thank you
Attached Files
File Type: xml Master_WS.xml (9.9 KB, 38 views)
File Type: xml WS_Test.xml (30.9 KB, 45 views)
File Type: jar mirth.customws.jar (10.9 KB, 28 views)
Reply With Quote

custom jar, custom webservice, rest api, rest service

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 02:41 PM.

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