参考冰河渔夫的博客,网址:http://blog.csdn.net/npstar/article/details/16965485


在confluence中,设置->Feature Settings-Edit ->Save,之后,选取 Remote Api(XML-RPC&SOAP),之后点击保存,即可。


采用rpc获取数据,首先confluence应该有插件,插件名称为:Confluence JSON-RPC Plugin,确保已经安装。

之后通过官网:confluence数据库表介绍:https://developer.atlassian.com/confdev/deprecated-apis/confluence-xml-rpc-and-soap-apis/remote-confluence-data-objects#RemoteConfluenceDataObjects-spacepermissionsetSpacePermissionSet

已经rpc中方法介绍:https://developer.atlassian.com/confdev/deprecated-apis/confluence-xml-rpc-and-soap-apis/remote-confluence-methods#RemoteConfluenceMethods-Spaces

例如得到空间的所有权限,

官网:

Vector<String> getPermissions(String token, String spaceKey) - Returns a Vector of Strings representing the permissions the current user has for this space (a list of "view", "modify", "comment" and / or "admin").

调用api:

http://ip/rpc/json-rpc/confluenceservice-v2/getPermissions

spaceKey:["zhouSpaceTest2biaozhi"]

即可得到:  

[
        "view",
        "modify",
        "comment",
        "admin"
    ]

对于认证采用basic authentication方式

注意rpc中方法全部用post方式进行调用


Logo

加入社区!打开量化的大门,首批课程上线啦!

更多推荐