IBM Connections API - 将成员添加到Wiki

时间:2014-06-18 10:21:25

标签: wiki ibm-connections

我一直试图将成员添加到维基无济于事。这是指示如何执行此操作的说明的链接:

http://www-10.lotus.com/ldd/appdevwiki.nsf/xpDocViewer.xsp?lookupName=IBM+Connections+4.5+API+Documentation#action=openDocument&res_title=Updating_a_wiki_ic45&content=pdcontent

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

connectionsURL /维基/基本/ API /维基/ {维基标签} /条目

然后在那里附加信息,然后使用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>

1 个答案:

答案 0 :(得分:0)

试用此API - https://conServer.com/wikis/basic/api/wiki/ {WIKI_LABEL} /成员 然后对该资源进行PUT更改条目(我认为类型应该是atom / xml或atom + cat / xml

由于