IBM Connections API -向Wiki添加成员



我一直在尝试向wiki添加成员,但无济于事。这是如何做到这一点的说明链接:

http://www 10. - 4.5 lotus.com/ldd/appdevwiki.nsf/xpdocviewer.xsp?lookupname=ibm +连接+ + + API文档# action = openDocument& res_title = Updating_a_wiki_ic45&内容= pdcontent

基本上,我需要做的是首先使用这个URL检索wiki:

connectionsURL/wiki/基本/api/wiki/{wiki-label}/条目

然后在那里附加信息,然后使用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错误的请求响应:

<?xml version="1.0" encoding="UTF-8" ?>
 <td:error>
<td:errorCode>InvalidRequest</td:errorCode>
<td:errorMessage>Atom entry is null</td:errorMessage>
 </td:error>

试试这个API - https://conServer.com/wikis/basic/api/wiki/{WIKI_LABEL}/members然后对该资源执行PUT操作以更改条目(我认为类型应该是atom/xml或atom+cat/xml

)

感谢保罗

最新更新