使用REST API将社区成员添加到社区活动中,得到403

时间:2016-03-08 15:05:19

标签: api member ibm-connections

我们希望将社区成员(作为作者)添加到社区活动中。 我们在Connections Cloud和Connections Cloud中都看到了403错误。

我使用SBT游乐场(https://greenhouse.lotus.com/sbt/SBTPlayground.nsf/Explorer.xsp#)重现了这个 这是我们发布的XML:

no viable conversion from int to vector<vector<int>>

到活动的终点:https://apps.na.collabserv.com/activities/service/atom2/acl?activityUuid=a750558c-d555-474d-8fcf-c3577276e9af

当我们工作&#34;在本地&#34;当我们将社区所有者添加到活动时,我们不会收到错误。只有当我们(尝试)添加社区成员时,才会发生403错误。

当我们通过用户界面执行操作时,没有问题

3 个答案:

答案 0 :(得分:1)

您可以尝试使用以下api,我也会附上您应该发布的样本正文。

API:https://apps.na.collabserv.com/communities/service/atom/community/members?communityUuid=

身体

<entry xmlns="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
<contributor>
  <email>mkataria@in.ibm.com</email>
  <snx:userid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">202432348</snx:userid>
  <snx:userState xmlns:snx="http://www.ibm.com/xmlns/prod/sn">active</snx:userState>
  <snx:isExternal xmlns:snx="http://www.ibm.com/xmlns/prod/sn">false</snx:isExternal>
  <name>Manish Kataria</name>
</contributor>

<snx:role xmlns:snx="http://www.ibm.com/xmlns/prod/sn" component="http://www.ibm.com/xmlns/prod/sn/communities">owner</snx:role>
<category term="person" scheme="http://www.ibm.com/xmlns/prod/sn/type"></category>
<category term="business-owner" scheme="http://www.ibm.com/xmlns/prod/sn/type"></category>
<snx:orgId xmlns:snx="http://www.ibm.com/xmlns/prod/sn">186</snx:orgId></entry>

确保内容类型为application / atom + xml

答案 1 :(得分:1)

我们最终设法在IBM Connections中以编程方式将社区成员(非所有者)添加到community_activity。 在创建社区活动时,Ibm Connections会将群组(作为角色)添加到社区活动中。如果要将特定成员作为编辑者/读者添加到活动中,则必须告诉IBM Connections您希望从该组中为其他成员提供什么角色。

答案 2 :(得分:0)

抱歉,我错过了活动部分,您可以在下面尝试并分享您获得的确切错误。

API:/ activities / service / atom2 / acl?activityUuid =

<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom"
  xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
  <contributor>
   <email>abc@org.com</email>
  </contributor>
  <category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="person" />
  <snx:role component="http://www.ibm.com/xmlns/prod/sn/activities">member</snx:role>
</entry>