web stats
exportData node in response from /channels/{channelId} end point - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 05-04-2018, 02:12 AM
mnizol mnizol is offline
What's HL7?
Join Date: Jan 2018
Posts: 2
mnizol is on a distinguished road
Default 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
Reply With Quote
Old 08-07-2018, 04:38 AM
kees.bosma kees.bosma is offline
What's HL7?
Join Date: Oct 2011
Location: Groningen, Netherlands
Posts: 4
kees.bosma is on a distinguished road


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
Reply With Quote
Old 08-07-2018, 07:19 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road

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.
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.

- How do I foo?
- You just bar.
Reply With Quote
Old 11-26-2018, 05:59 AM
benoitchiron benoitchiron is offline
What's HL7?
Join Date: Aug 2018
Posts: 1
benoitchiron is on a distinguished road


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 ?

Reply With Quote

api, export, metadata

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 05:28 AM.

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