【问题标题】:IBM Connections API - Adding Members to WikiIBM Connections API - 将成员添加到 Wiki
【发布时间】:2014-06-18 21:44:32
【问题描述】:

我一直在尝试将成员添加到 wiki,但无济于事。这是有关如何执行此操作的说明的链接:

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/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


    【解决方案1】:

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

    谢谢

    保罗

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-21
      • 1970-01-01
      • 2016-04-24
      • 2020-02-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多