Mirth 3.5.0 - Importing Code Libraries via REST API

1.1k views Asked by At

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 Mirth Community forums and tried all the proposed fixes such as the ones in the thread here:

http://www.mirthproject.org/community/forums/showthread.php?t=216331

1

There are 1 answers

1
spookymodem On BEST ANSWER

This question was answered on the "Mirth Project" forums.

Below is the answer.

For importing a code template library or channel group:

  1. Import the grouping element (channel group/template library) by using the bulk import and assure that:

    • all ids of the child elements (channels respectively templates) are included and
    • all sections are present (update, add, delete, if I remember right)
  2. Import the corresponding channels or code templates with the respective REST call

http://www.mirthproject.org/community/forums/showthread.php?p=260881#post260881