Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   exportData node in response from /channels/{channelId} end point (http://www.mirthcorp.com/community/forums/showthread.php?t=218229)

mnizol 05-04-2018 03:12 AM

exportData node in response from /channels/{channelId} end point
I am trying to use the /channels/{channelId} end point from the client API to export channel XML. For some channels, the XML returned via the end point matches that generated via the "Export Channel" operation from within Mirth Connect Administrator. However, the end point response sometimes omits channel meta data captured in the "exportData" node (e.g. enabled status, last updated date, pruning settings). Below is an example of this node and its children:


I have resorted to calling the /server/channelMetadata endpoint to capture this information when the /channels/{channelId} end point omits it and then dynamically building the exported XML by appending the additional metadata. This works, but it feels like a hack.

I would like to confirm whether the occasional omission of the exportData node from the response of /channels/{channelId} is a known bug, or whether there might be a channel-specific setting that controls inclusion of the meta data in the export.

I am using Mirth version

kees.bosma 08-07-2018 05:38 AM


I'm using Mirth Connect server 3.6.1 and I'm confronted with the same issue.

We scripted the export of all our Mirth Channels by CLI for building a release, but the <exportData> node is missing nowadays (we used to work with MC 3.4.2). Using the REST API leads to the same result. The only way to fetch a complete XML for a channel is to export it by hand or combining the two API methods as mentioned above so you can automate the job.

Does anybody know a workaround or is this a known bug, which is going to be fixed in the nearby future?


Kees Bosma

narupley 08-07-2018 08:19 AM

This is expected, the channel itself returned from the /channels/{channelId} endpoint does not typically contain exportData.

The Administrator GUI combines the channel XML with the metadata for you upon export.

benoitchiron 11-26-2018 06:59 AM


as mentionned previously and as we experienced we don't believe that this behavior is expected.

In our case :
- we export individually or globally channels via the REST Api
- In the XML, the section ExportData is present
- we make a modification in one channel (for example modification of a filter)
- we redo the export via the REST Api
- In the XML the ExportData section for the channel modified has disappeared

It seems that the REST Api has not a deterministic behavior whereas it should give, for the same type of call, the same result (in this case : systematic presence, or not, of the ExportData in the XML export)

Could you confirm, that this behavior looks like a bug when using API Rest ?
what could be the solution to make automatic exports of the channels ?


All times are GMT -8. The time now is 04:29 PM.

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