【发布时间】:2014-06-18 21:44:32
【问题描述】:
我一直在尝试将成员添加到 wiki,但无济于事。这是有关如何执行此操作的说明的链接:
基本上,我需要做的是首先使用此 URL 检索 wiki:
connectionsURL/wikis/basic/api/wiki/{wiki-label}/entry
然后在此处附加信息,然后使用 PUT 请求将其发送回,Content-Type: application/atom+xml。根据示例,传递的内容应如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<id>ignore</id>
<td:label xmlns:td="urn:ibm.com/td">Lake Champlain</td:label>
<category term="wiki" scheme="tag:ibm.com,2006:td/type" label="wiki">
</category>
<author>
<name>Bill Jones</name>
<snx:userid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
bf9117c0-f8f2-102c-97c4-ceb7f24c5708
</snx:userid>
<email>bjones@us.example.com</email>
</author>
<td:sharedWith xmlns:td="urn:ibm.com/td">
<ca:member
xmlns:ca="http://www.ibm.com/xmlns/prod/composite-applications/v1.0"
ca:id="new_user_id"
ca:type="user"
ca:role="editor" >
</ca:member>
<ca:member
xmlns:ca="http://www.ibm.com/xmlns/prod/composite-applications/v1.0"
ca:id="anonymous-user"
ca:type="virtual"
ca:role="reader" >
</ca:member>
</td:sharedWith>
<title type="text">Long Lake</title>
<summary type="text">
modification none
</summary>
</entry>
我试过了,但总是收到 400 Bad Request 响应:
<?xml version="1.0" encoding="UTF-8" ?>
<td:error>
<td:errorCode>InvalidRequest</td:errorCode>
<td:errorMessage>Atom entry is null</td:errorMessage>
</td:error>
【问题讨论】:
标签: wiki ibm-connections