No announcement yet.

exportData node in response from /channels/{channelId} end point

  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2

    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


    • #3
      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.


      • #4

        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 ?