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

问题描述 投票:1回答:1

在EG https://localhost:8443/api/上的Mirth REST API中,在Channel Groups下,有一个bulkUpdate的测试部分,它有两个参数:channelGroups和removedChannelGroupIds。默认情况下,我将override设置为true。

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

Mirth版本是3.6.0,但理想情况下它也应该在3.5.1中用于传统设备。

mirth mirth-connect
1个回答
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--

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

© www.soinside.com 2019 - 2024. All rights reserved.