web stats
Mirth 3.5.0 - Importing Code Libraries via REST API - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 08-30-2017, 08:08 AM
spookymodem spookymodem is offline
Mirth Newb
 
Join Date: Aug 2017
Posts: 6
spookymodem is on a distinguished road
Question Mirth 3.5.0 - Importing Code Libraries via REST API

I am attempting to import a code library into Mirth Connect using the REST API.

According to the API documentation, there are 2 endpoints that may be used to do this:

POST /codeTemplateLibraries/_bulkUpdate
PUT /codeTemplateLibraries

Hitting either of these endpoints using curl and passing the required data, I receive a positive response from the Mirth server, but when I open the Mirth Connect GUI and look at the code libraries, all of the libraries are empty; however, each library should have multiple code templates.

Has anyone experienced anything like this with Mirth 3.5.0? I have searched the forums here and tried all the proposed fixes such as the ones in the thread here:

http://www.mirthproject.org/communit...d.php?t=216331
Reply With Quote
  #2  
Old 08-30-2017, 01:54 PM
odo odo is offline
OBX.3 Kenobi
 
Join Date: Feb 2017
Location: Luxembourg
Posts: 137
odo is on a distinguished road
Default

Quote:
Originally Posted by spookymodem View Post
I receive a positive response from the Mirth server, but when I open the Mirth Connect GUI and look at the code libraries, all of the libraries are empty; however, each library should have multiple code templates.
For importing a code template library or channel group:
  1. Import the grouping element (channel group/template library) by using the bulkimport and assure that
    a) all ids of the child elements (channels respectively templates) are included and
    b) all sections are present (update, add, delete, if I remember right)
  2. Import the corresponding channels or code templates with the respective REST call

If 1a) is not fulfilled, the child element will be there but not visible.

I don't claim this to be the only way however this is a way that works fine for us.
Reply With Quote
  #3  
Old 09-01-2017, 12:25 PM
spookymodem spookymodem is offline
Mirth Newb
 
Join Date: Aug 2017
Posts: 6
spookymodem is on a distinguished road
Default

odo -

This worked for me! Thank you very much for your help!
Reply With Quote
  #4  
Old 10-30-2017, 10:28 PM
aonomike aonomike is offline
What's HL7?
 
Join Date: Mar 2017
Posts: 5
aonomike is on a distinguished road
Default Export channel groups using rest api

Quote:
Originally Posted by spookymodem View Post
odo -

This worked for me! Thank you very much for your help!
Hi I am new to mirth and am trying to import and export a channel group form a javascript transformer, can you please share the code for achieving this, importing channel groups in a Javascript transformer? Is there good documentation on how to consume the mirth connect rest api in a transformer?

Last edited by aonomike; 10-30-2017 at 10:32 PM.
Reply With Quote
Reply

Tags
api, code library, code template

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:27 AM.


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