Follow/Unfollow IBM Connections 5.5/6.0 中的资源使用 Ajax 请求 (jQuery)

Follow/Unfollow a resource in IBM Connections 5.5/6.0 using Ajax Request (jQuery)

我尝试关注或取消关注 IBM Connections 中的资源。

目前,我尝试使用 AJAX 请求关注 IBM Connections 6.0 中的社区,但我总是收到 400 错误请求

你能帮帮我吗?

我使用这个文档: https://www-10.lotus.com/ldd/lcwiki.nsf/xpAPIViewer.xsp?lookupName=IBM+Connections+6.0+API+Documentation#action=openDocument&res_title=Start_following_a_resource_ic60&content=apicontent

AJAX调用:

var apiSourceIdentifier = 'communitities',
 apiTypeIdentifier = 'community',
 elementUuid = '41759ce1-3a88-4464-b912-8e54e7df453a', // That's a community uuid
 entryToPost = ['<entry>',
  '<category scheme="http://www.ibm.com/xmlns/prod/sn/source" term="' + apiSourceIdentifier + '"/>',
  '<category scheme="http://www.ibm.com/xmlns/prod/sn/resource-type" term="' + apiTypeIdentifier + '"/>',
  '<category scheme="http://www.ibm.com/xmlns/prod/sn/resource-id" term="' + elementUuid + '"/>',
  '</entry>'
 ].join('');

$.ajax({
 method: "POST",
 url: '/communities/follow/atom/resources?source=communitities&type=community',
 cache: false,
 data: entryToPost,
 dataType: 'application/atom+xml',
 contentType: "application/atom+xml"
}).done(function() {
 alert('done!')
}).fail(function() {
 alert('failed');
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

部分

<category

 term="resource-follow"

 scheme="http://www.ibm.com/xmlns/prod/sn/type">

 </category>

您的负载中缺少....