在Mirth REST API中,POST / channelgroups / _bulkUpdate的最小工作示例是什么?

时间:2018-09-21 13:40:13

标签: mirth mirth-connect

在EG https://localhost:8443/api/上的Mirth REST API的“通道组”下,有一个bulkUpdate的测试部分,它具有两个参数:channelGroups和removeChannelGroupIds。默认情况下,我将override设置为true。

尽管以各种格式传递channelGroups和ID列表(例如,作为channelGroup XML对象的EG,通道列表,channelGroups列表等),Mirth拒绝了这些格式,我不知道Mirth的格式是什么。将任何一个字段保留为空白也将失败。有没有人提供两个字段的最小工作数据集示例,当调用bulkUpdate时,这两个字段会从Mirth返回成功?

Mirth版本为3.6.0,但理想情况下,它对于旧版设备也应在3.5.1中工作。

2 个答案:

答案 0 :(得分:1)

在用户论坛https://www.mirthcorp.com/community/forums/showthread.php?t=218606上回答了

  

该路线实际上需要multipart / form-data。因此,例如,您可以发送带有“ Content-Type:multipart / form-data; boundary = abc123”和有效负载的请求,例如:

--abc123
Content-Type: application/xml; charset=utf8
Content-Disposition: form-data; name="channelGroups"

<set>
  <channelGroup version="3.6.1">
    <id>56a61dfb-58df-4286-8100-5ccab05364ba</id>
    <name>Group 1</name>
    <revision>1</revision>
    <lastModified>
      <time>1537550138646</time>
      <timezone>UTC</timezone>
    </lastModified>
    <description></description>
    <channels/>
  </channelGroup>
</set>
--abc123
Content-Type: application/xml; charset=utf8
Content-Disposition: form-data; name="removedChannelGroupIds"

<set/>
--abc123--

从3.6版开始,无法从SwaggerUI调用此API函数。

答案 1 :(得分:0)

似乎也无法在频道组中创建频道。