This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Confluence Connector

DRAFT DOCUMENT

The Confluence connector allows you to connect to Confluence, an online team collaboration software. The connector uses the Confluence 5.4.3 SOAP API to connect to confluence, manage users and groups, change global/space permissions, manage labels and more.

The following sections describe how to perform various operations with the connector. For general information on using connectors and their operations in your ESB configurations, see Using a Connector.


Supported ESB Version

WSO2 ESB 4.9.0 supports this connector. You can download WSO2 ESB 4.9.0 from here.

Connecting to Confluence

To use the Confluence connector, add the <confluence.init> element in your configuration before any Confluence operations. This Confluence configuration authenticates with Confluence by specifying the user name, password, and URI of the Confluence instance.

init
<confluence.init>
	<username>xxxx@wso2.com</username>
	<password>{wso2:vault-lookup('xxxx.email.login')}</password>
	<uri>https://xxx:xx/xx</uri>
</confluence.init>
Entering secure data

For security purposes, you should store your SID and token in the WSO2 secure vault and reference it by using an alias instead of hard-coding the actual values in the configuration file. For more information, see Working with Passwords.

Re-using JIRA configurations

For best results, save the Confluence configuration as a local entry.  You can then easily reference it with the configKey attribute in your Confluence operations. For example, if you saved the above <confluence.init> entry as a local entry named confluenceConfig,  you could reference it from an operation like  getUser  as follows:

<confluence.getUser configKey="confluenceConfig">
	<username>Bob</username>
</confluence.getUser>

 


Working with administrative operations

OperationDescription
exportSite

Exports a Confluence instance and returns a string holding the URL for the download.

getClusterInformation Returns information about the cluster to which this node belongs.
getClusterNodeStatuses Returns a vector of NodeStatus objects containing information about each node in the cluster.
isPluginEnabled Returns true if the plugin is installed and enabled. If not, the value is false.

Exporting Site  

exportSite
<confluence.exportSite configKey="confluenceConfig">
	<exportAttachments>true</exportAttachments>
</confluence.exportSite>

To export a site, use confluence.exportSite and s pecify the following properties. If successful, Confluence responds with a export site URL.

Properties
  • exportAttachments :  A boolean argument indicates whether or not attachments ought to be included in the export.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#exportSite (java.lang.String, boolean)

Getting ClusterInformation

getClusterInformation
<confluence.getClusterInformation configKey="confluenceConfig"/>

To get cluster information, use confluence.getClusterInformation. If successful, Confluence responds with information about the cluster to which the node belongs.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getClusterInformation(java.lang.String)

Getting ClusterNodeStatuses

ClusterNodeStatuses
<confluence.getClusterNodeStatuses configKey="confluenceConfig"/>

To get cluster note status, use confluence.getClusterNodeStatus. If successful, Confluence responds with node status.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getClusterNodeStatuses(java.lang.String)

Checking whether pluging is enabled  

isPluginEnabled
<confluence.isPluginEnabled configKey="confluenceConfig">
	<pluginKey>Key</pluginKey>
</confluence.isPluginEnabled>

To check whether a particular plugin is enabled, use confluence.isPluginEnabled and specify the following properties. If successful, Confluence responds with true or false.

Properties
  • pluginKey: A string argument that indicates the plugin key.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getClusterNodeStatuses(java.lang.String)

Working with attachments

OperationDescription
getAttachment

Retrieves a paginated list of attachment content entities within a single container.

getAttachmentData Gets the contents of an attachment.
removeAttachment Removes an attachment from a content entity object.

Getting an attachment  

getAttachment
<confluence.getAttachment>
    <limit>{$ctx:limit}</limit>
    <id>{$ctx:id}</id>
    <start>{$ctx:start}</start>
    <fileName>{$ctx:fileName}</fileName>
    <expand>{$ctx:expand}</expand>
	<mediaType>{$ctx:mediaType}</mediaType>
</confluence.getAttachment>

This operation retrieves a paginated list of attachment content entities within a single container.

Properties
  • limit : Specifies how many items should be returned after the start index.

  • id : A string containing the ID of the attachments content container.

  • start : The index of the first item within the result set that should be returned.

  • fileName : A filter parameter to return only the attachment with the matching file name.

  • expand : A comma separated list of properties to expand on the attachments returned.

  • mediaType : A filter parameter to return only attachments with a matching Media-Type.

Related Confluence documentation

https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e1021

Getting an attachment data  

getAttachmentData
<confluence.getAttachmentData configKey="confluenceConfig">
	<pageId>1245678</pageId>
	<fileName>file.txt</fileName>
	<versionNumber>0</versionNumber>
</confluence.getAttachmentData>

To get an attachment data, use confluence.getAttachmentData and specify the following properties. If successful, Confluence responds with the attachment data.

Properties
  • pageID : The id of the ContentEntityObject the attachemt belongs to.

  • fileName : The name of the attachment.

  • version : The version number of the attachment. To retrieve information or content from the current version of an attachment, use a versionNumber 0

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getAttachmentData(java.lang.String, long, java.lang.String, int)

Removing an attachment  

removeAttachment
<confluence.removeAttachment configKey="confluenceConfig">
	<contentId>12345678</contentId>
	<fileName>file.pgn</fileName>
</confluence.removeAttachment>

To remove an attachment, use confluence.removeAttachment and specifiy the following properties. if successful, Confluence removes the particular attachment.

Properties
  • contentId : The id of the ContentEntityObject to which the attachment belongs.

  • fileName : The name of the attachment.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#removeAttachment(java.lang.String, long, java.lang.String)

Working with blogs

Operation Description
getBlogEntries Returns all the summaries in the space.
getBlogEntry Returns a single entry

Getting blog entries  

getBlogEntries
<confluence.getBlogEntries configKey="confluenceConfig">
	<spaceKey>SPK</spaceKey>
</confluence.getBlogEntries>

To get blog entries of a space, use confluence.getBlogEntries and specify the following properties. If successful, Confluence responds with a list of blog entries.

Properties
  • spaceKey : The value of the space key

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getBlogEntries(java.lang.String, java.lang.String)

Getting a blog entry  

getBlogEntry
<confluence.getBlogEntry configKey="confluenceConfig">
	<pageId>123456789</pageId>
</confluence.getBlogEntry>

To get a particular blog entry of a space, use confluence.getBlogEntry and specify the following properties. If successful, Confluence responds with the blog entry.

Properties
  • pageId : The page ID of the blog entry.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getBlogEntry(java.lang.String, long)

Working with general operations

Operation Description
getServerInfo Retrieves some basic information about the server to which the connection is made.

Getting server information  

getServerInfo
<confluence.getServerInfo configKey="confluenceConfig" />

To get the server information, use confluence.getServerInfo and specify the following properties. If successful, Confluence responds with the server details.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getServerInfo(java.lang.String)

Working with labels

Operation Description
addLabelByNameToSpace Adds a label to the object with the given ContentEntityObject ID.
getLabelContentByName Returns the content for a given label name.
getMostPopularLabels Returns the most popular labels for the Confluence instance with a specified maximum number.
getRecentlyUsedLabels Returns the recently used labels for the Confluence instance with a specified maximum number of results.
getSpacesWithLabel Returns an array of spaces that have been labelled with labelName.
addContentLabels

Adds a list of labels to the specified content. 

getContentLabelsRetrieves the list of labels on a piece of content. 
removeContentLabelDeletes labels to the specified content. 

Adding a label by name to space  

addLabelByNameToSpace
<confluence.addLabelByNameToSpace configKey="confluenceConfig">
	<labelNamer>label-1</labelNamer>
	<spaceKey>SPK</spaceKey>
</confluence.addLabelByNameToSpace>

To add label to a space by the name, use confluence.addLabelByNameToSpace and specify the following properties. If successful, Confluence adds the label to space and responds with true.

Properties
  • labelName : The name of the label(s) to be added to the space in the form of a space-separated string.

  • spaceKey : The space to which the label should be added.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#addLabelByNameToSpace(java.lang.String, java.lang.String, java.lang.String)

Getting a label content by name  

getLabelContentByName
<confluence.getLabelContentByName configKey="confluenceConfig">
	<labelName>label-1</labelName>
</confluence.getLabelContentByName>

To get label content by the label name, use confluence.getLabelContentByName and specify the following properties. If successful, Confluence responds with the label content.

Properties
  • labelName : The name of the label(s) to be retrieved.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getLabelContentByName(java.lang.String, java.lang.String)

Getting most popular labels  

getMostPopularLabels
<confluence.getMostPopularLabels configKey="confluenceConfig">
	<maxCount>10</maxCount>
</confluence.getMostPopularLabels>

To get most popular labels, use confluence.getMostPopularLabels and specify the following properties. If successful, Confluence responds a list of most popular labels.

Properties
  • maxCount : The maximum limit of the most popular labels

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getMostPopularLabels(java.lang.String, int)

Getting recently used labels  

getRecentlyUsedLabels
<confluence.getRecentlyUsedLabels configKey="confluenceConfig">
	<maxResults>10</maxResults>
</confluence.getRecentlyUsedLabels>

To get most recently used labels, use confluence.getRecentlyUsedLabels and specify the following properties. If successful, Confluence responds a list of most recently used labels.

Properties
  • maxCount : The maximum limit of the most recently used labels

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getRecentlyUsedLabels(java.lang.String, int)

Getting spaces with label  

getSpacesWithLabel
<confluence.getSpacesWithLabel configKey="confluenceConfig">
	<labelName>label-1</labelName>
</confluence.getSpacesWithLabel>

To get spaces containing the a particular label, use confluence.getSpacesWithLabel and specify the following properties. If successful, Confluence responds a list of spaces IDs.

Properties
  • labelName : The name of the label with which one needs to get the spaces.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getSpacesWithLabel(java.lang.String, java.lang.String)

Adding a list of labels to the specified content

addContentLabels
<confluence.addContentLabels>
	<id>{$url:id}</id>
</confluence.addContentLabels>

This operation adds a list of labels to the specified content.

Properties
  • id : A string containing the ID of the labels content container.

Related Confluence documentation

https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e80 

Retrieving the list of labels on a piece of content

getContentLabels
<confluence.getContentLabels>
    <limit>{$ctx:limit}</limit>
    <id>{$ctx:id}</id>
    <start>{$ctx:start}</start>
	<prefix>{$ctx:prefix}</prefix>
</confluence.getContentLabels>

This operation retrieves the list of labels on a piece of content.

Properties
  • limit : The limit of the number of labels to return, this may be restricted by fixed system limits.

  • id : A string containing the ID of the labels content container.
  • start : The start point of the collection to return.
  • prefix : The prefixes to filter the labels with.
Related Confluence documentation

https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e55

Deleting labels to the specified content

removeContentLabel
<confluence.removeContentLabel>
    <id>{$ctx:id}</id>
	<name>{$ctx:name}</name>
</confluence.removeContentLabel>

This operation deletes labels to the specified content.

Properties
  • id : A string containing the ID of the labels content container.
  • name: The name of the label to be removed from the content.
Related Confluence documentation

https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e104

Working with pages

OperationDescription
movePage Moves the position of a page in the hierarchy.
movePageToTopLevel Moves a page to the top level of the target space.
removePage Removes a page.
getContentPermissionSets Returns all the page level permissions for this page as content permission sets.
getPage Returns a single page
getPages Returns all the summaries in the space.

Moving a page  

movePage
<confluence.movePage configKey="confluenceConfig">
	<sourcePageId>123456789</sourcePageId>
	<targetPageId>987654321</targetPageId>
	<position>above</position>
</confluence.movePage>

To move a page in the hierarchy, use confluence.movePage and specify the following properties. If successful, Confluence moves the page to the target page location.

Properties
  • sourcePageId : Page ID to be moved.

  • targetPageId : The id of the page that is relative to the sourcePageId page being moved.

  • position : Possible values are above, below, and append. (Note that the terms above and below refer to the relative vertical position of the pages in the page tree.)

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#movePage(java.lang.String, long, long, java.lang.String)

Moving a page to top level  

movePageToTopLevel
<confluence.movePageToTopLevel configKey="confluenceConfig">
	<pageId>123456789</pageId>
	<targetSpaceKey>SPK</targetSpaceKey>
</confluence.movePageToTopLevel>

To move page to the top in the hierarchy , use confluence.movePageToTopLevel and specify the following properties. If successful, Confluence moves the page to the top in the hierarchy.

Properties
  • pageID : The id of the page to be moved.

  • targetSpaceKey : Space key of the target

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#movePageToTopLevel(java.lang.String, long, java.lang.String)

Removing a page  

removePage
<confluence.removePage configKey="confluenceConfig">
	<pageId>123456789</pageId>
</confluence.removePage>

To remove a page, use confluence.removePage and specify the following properties. If successful, Confluence removes the page.

Properties
  • pageId : The ID of the page to be removed.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#removePage(java.lang.String, long)

Getting the content permission sets  

getContentPermissionSets
<confluence.getContentPermissionSets configKey="confluenceConfig">
	<contentId>123456789</contentId>
</confluence.getContentPermissionSets>

To get the set of content permissions, use confluence.getContentPermissionSets and specify the following properties. If successful, Confluence responds with the content permissions.

Properties
  • contentId : ID of the content.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getContentPermissionSets(java.lang.String, long)

Getting a single page

getPage
<confluence.getPage configKey="confluenceConfig">
	<pageID>123456789</pageID>
</confluence.getPage>

To get a particular set, use confluence.getPage and specify the following properties. If successful, Confluence responds with the page.

Properties
  • pageID : ID of the page to be retrieved.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getPage(java.lang.String, long)

Getting pages

getPages
<confluence.getPages configKey="confluenceConfig">
	<spaceKey>SPK</spaceKey>
</confluence.getPages>

To get a list of pages in a space, use confluence.getPages and specify the following properties. If successful, Confluence responds with a list of pages.

Properties
  • spaceKey : The ID of the space containing the required pages.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getPages(java.lang.String, java.lang.String)

Changing permissions

Operation Description
addAnonymousPermissionToSpace Gives any anonymous users the permission to perform specific actions in the space which has space key and permission type as parameters.
addPermissionToSpace Gives permission to some entity (this entity can be either a group or an user) to perform specific actions in the space with the space key and remoteEntityName as parameters.
getPagePermissions Returns a vector of permissions representing the permissions set on the given page.
getPermissions Returns a vector of sings representing the permissions that the current user has for this space.
getPermissionsForUser Returns a vector of strings representing the permissions that the given user has for this space.
getSpaceLevelPermissions Returns all of the space level permissions which may be granted.
removeAllPermissionsForGroup Removes all the global and space level permissions for the specified group name.
removeAnonymousPermissionFromSpace Removes the permission for the space which has space key and permission type as parameters.
removeGloblePermissions Removes the global permissions from an entity.
removePermissionFromSpace Removes the existing permission to carry out specific actions in the space which has space key and permission type as parameters, from the entity named remoteEntityName (either a group or a user).

Adding anonymous permissions to space

getBlogEntries
<confluence.addAnonymousPermissionToSpace configKey="confluenceConfig">
	<permission>VIEWSPACE</permission>
	<spaceKey>SPK</spaceKey>
</confluence.addAnonymousPermissionToSpace>

To add anonymous permissions to a particular space, use confluence.addAnonymousPermissionToSpace and specify the following properties.

Properties
  • permission : The space permission to be added. Possible values are VIEWSPACEEDITSPACE, EXPORTPAGE,  SETPAGEPERMISSIONS,  REMOVEPAGE,  EDITBLOG,  REMOVEBLOG,  COMMENT,  REMOVECOMMENT,  CREATEATTACHMENT,  REMOVEATTACHMENT,  REMOVEMAIL,  EXPORTSPACE  and  SETSPACEPERMISSIONS.

  • spaceKey: The key of the space affected by this action.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#addAnonymousPermissionToSpace(java.lang.String, java.lang.String, java.lang.String)

Adding the permissions to space

addPermissionToSpace
<confluence.addPermissionToSpace configKey="confluenceConfig">
	<permission>VIEWSPACE</permission>
	<remoteEntityName>bob</remoteEntityName>
	<spaceKey>SPK</spaceKey>
</confluence.addPermissionToSpace>

To add permissions to an entity, use confluence.addPermissionToSpace and specify the following properties.

Properties
  • permission : The space permission to be added. Possible values are VIEWSPACEEDITSPACE, EXPORTPAGE,  SETPAGEPERMISSIONS,  REMOVEPAGE,  EDITBLOG,  REMOVEBLOG,  COMMENT,  REMOVECOMMENT,  CREATEATTACHMENT,  REMOVEATTACHMENT,  REMOVEMAIL,  EXPORTSPACE  and  SETSPACEPERMISSIONS.

  • remoteEntityName : The name of the user or group.

  • spaceKey: The key of the space affected by this action

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#addPermissionToSpace(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

Getting the page permissions

getPagePermissions
<confluence.getPagePermissions configKey="confluenceConfig">
	<pageId>123456789</pageId>
</confluence.getPagePermissions>

To get a list of pages permissions, use confluence.getPagePermissions and specify the following properties. If successful, Confluence responds with  the set of permissions of the page.

Properties
  • pageId : ID of the page

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getPagePermissions(java.lang.String, long)

Getting the permissions

getPermissions
<confluence.getPermissions configKey="confluenceConfig">
	<spaceKey>SPK</spaceKey>
</confluence.getPermissions>

To get space level permissions, use confluence.getPermissions and specify the following properties. If successful, Confluence responds with the set of permissions for the space.

Properties
  • spaceKey : The ID of the space.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getPermissions(java.lang.String, java.lang.String)

Getting the permissions for user

getPermissionsForUser
<confluence.getPermissionsForUser configKey="confluenceConfig">
	<spaceKey>SPK</spaceKey>
	<userName>bob</userName>
</confluence.getPermissionsForUser>

To get user permissions, use confluence.getPermissionsForUser and specify the following properties. If successful, Confluence responds with the set of permissions for the user.

Properties
  • spaceKey : ID of the space.

  • userName : Registered username of the user

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getPermissionsForUser(java.lang.String, java.lang.String, java.lang.String)

Getting space level permissions

getSpaceLevelPermissions
<confluence.getSpaceLevelPermissions configKey="confluenceConfig" />

To get space level permissions, use confluence.getSpaceLevelPermissions and specify the following properties. If successful, Confluence responds with  the set of permissions of the space.

Properties
  • spaceKey : ID of the space.

  • username : Registered username of the user

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getSpaceLevelPermissions(java.lang.String)

Removing all the permissions for group

removeAllPermissionsForGroup
<confluence.removeAllPermissionsForGroup configKey="confluenceConfig">
	<groupname>engineering</groupname>
</confluence.removeAllPermissionsForGroup>

To remove all permissions from a group, use confluence.removeAllPermissionsForGroup and specify the following properties.

Properties
  • groupname : Group name of the group from which the permissions should be removed.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#removeAllPermissionsForGroup(java.lang.String, java.lang.String)

Removing anonymous permissions from space

removeAnonymousPermissionFromSpace
<confluence.removeAnonymousPermissionFromSpace configKey="confluenceConfig">
	<permission>VIEWSPACE</permission>
	<spaceKey>SPK</spaceKey>
</confluence.removeAnonymousPermissionFromSpace>

To remove anonymous permissions from a space, use confluence.removeAnonymousPermissionFromSpace and specify the following properties.

Properties
  • permission : The space permission to be added. Possible values are VIEWSPACEEDITSPACE, EXPORTPAGE,  SETPAGEPERMISSIONS,  REMOVEPAGE,  EDITBLOG,  REMOVEBLOG,  COMMENT,  REMOVECOMMENT,  CREATEATTACHMENT,  REMOVEATTACHMENT,  REMOVEMAIL,  EXPORTSPACE and SETSPACEPERMISSIONS.

  • spaceKey : The key of the space affected by this action.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#removeAnonymousPermissionFromSpace(java.lang.String, java.lang.String, java.lang.String)

Removing global permissions

removeGlobalPermission
<confluence.removeGlobalPermission configKey="confluenceConfig">
	<permission>VIEWSPACE</permission>
	<groupname>engineering</groupname>
</confluence.removeGlobalPermission>

To remove global permissions from a group, use confluence.removeGlobalPermission and specify the following properties.

Properties
  • permission : The Space Permission to add ( These value can only be VIEWSPACEEDITSPACE, EXPORTPAGE,  SETPAGEPERMISSIONS,  REMOVEPAGE,  EDITBLOG,  REMOVEBLOG,  COMMENT,  REMOVECOMMENT,  CREATEATTACHMENT,  REMOVEATTACHMENT,  REMOVEMAIL,  EXPORTSPACE  or  SETSPACEPERMISSIONS )

  • groupname : The name of the group

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#removeGlobalPermission(java.lang.String, java.lang.String, java.lang.String)

Removing permission from space

removePermissionFromSpace
<confluence.removePermissionFromSpace configKey="confluenceConfig">
	<permission>VIEWSPACE</permission>
	<remoteEntityName>bob</remoteEntityName>
	<spaceKey>spk</spaceKey>
</confluence.removePermissionFromSpace>

To remove permissions from a space, use confluence.removePermissionFromSpace and specify the following properties.

Properties
  • permission : The space permission to be added. Possible values are VIEWSPACEEDITSPACE, EXPORTPAGE,  SETPAGEPERMISSIONS,  REMOVEPAGE,  EDITBLOG,  REMOVEBLOG,  COMMENT,  REMOVECOMMENT,  CREATEATTACHMENT,  REMOVEATTACHMENT,  REMOVEMAIL,  EXPORTSPACE  and SETSPACEPERMISSIONS )

  • remoteEntityName : The name of the group or the user.

  • spaceKey : The key of the space affected by this action.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#removePermissionFromSpace(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

Working with Spaces

Operation Description
getSpace Returns a single space.
createSpace

Creates a new space. 

getSpaceInfoRetrieves information about a number of spaces.

Getting a space

getSpace
<confluence.getSpace configKey="confluenceConfig">
	<spaceKey>SPK</spaceKey>
</confluence.getSpace>

To get a particular space, use confluence.getSpace  and specify the following properties. If successful, Confluence responds with the responding space of the space key.

Properties
  • spaceKey : The key of the space.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getSpace(java.lang.String, java.lang.String)

Creating a new space

createSpace
<confluence.createSpace>
    <descriptionRepresentation>{$ctx:descriptionRepresentation}</descriptionRepresentation>
    <name>{$ctx:name}</name>
    <descriptionValue>{$ctx:descriptionValue}</descriptionValue>
	<key>{$ctx:key}</key>
</confluence.createSpace>

This operation creates a new space.

Properties
  • descriptionRepresentation : The representation of the description. e.g. plain
  • name : The name of the space.
  • descriptionValue : The description of the space.
  • key : The key of the space.
Related Confluence documentation

https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e453 

Retrieving information about a number of spaces

getSpaceInfo
<confluence.getSpaceInfo>
    <limit>{$ctx:limit}</limit>
    <start>{$ctx:start}</start>
    <expand>{$ctx:expand}</expand>
	<spaceKeys>{$ctx:spaceKeys}</spaceKeys>
</confluence.getSpaceInfo>

This operation retrieves information about a number of spaces.

Properties
  • limit : The limit of the number of spaces to return, this may be restricted by fixed system limits.
  • start : The start point of the collection to return.
  • expand : A comma separated list of properties to expand on the spaces.
  • spaceKeys : JSON string which contains the list of space keys.
Related Confluence documentation

https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e431 

Managing users

OperationDescription
addGroup Adds a new group.
addUser Adds a new user with the given password.
addUserToGroup Adds a user to a particular group.
changeMyPassword Changes the current user's password.
changeUserPassword Changes the specified user's password.
deactivateUser Deactivates the specified user.
getActiveUsers Returns all registered users.
getGroups Gets all the groups.
getUser Gets a single user.
getUserGroups Gets a user's current groups.
getUserInformation Retrieves user information.
removeGroup Removes a group.
removeUser Deletes a user.
removeUserFromGroup Removes a user from a group.

Adding a group

addGroup
<confluence.addGroup configKey="confluenceConfig">
	<group>engineering</group>
</confluence.addGroup>

To add a group, use confluence.addGroup and specify the following properties.

Properties
  • group : The name of the group

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#addGroup(java.lang.String, java.lang.String)

Adding a user

addUser
<confluence.addUser configKey="confluenceConfig">
	<email>bob@email.com</email>
	<fullname>bob</fullname>
	<name>bob</name>
	<url>http//:bob.com</url>
	<password>pwd</password>
</confluence.addUser>

To add an user, use confluence.addUser and specify the following properties.

Properties
  • email : The e-mail address of the user. This value should be a valid email address

  • fullname: The full name of the user.

  • name : The username of the user. This value should be unique.

  • url : The URL of the user.

  • password : The password of the user.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#addUser(java.lang.String, com.atlassian.confluence.rpc.soap.beans.RemoteUser, java.lang.String)

Adding a user to a group

addUserToGroup
<confluence.addUserToGroup configKey="confluenceConfig">
	<username>bob</username>
	<groupname>engineering</groupname>
</confluence.addUserToGroup>

To add a user to a particular group, use confluence.addUserToGroup and specify the following properties.

Properties
  • username : The username  of the user to be added to the group.

  • groupname : The group name.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#addUserToGroup(java.lang.String, java.lang.String, java.lang.String)

Changing current user’s password

changeMyPassword
<confluence.changeMyPassword configKey="confluenceConfig">
	<oldPass>pwd1</oldPass>
	<newPass>pwd2</newPass>
</confluence.changeMyPassword>

To change the password of the current user, use confluence.changeMyPassword and specify the following properties.

Properties
  • oldPass : Previous password of the user.

  • newPass : Current password of the user.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#changeMyPassword(java.lang.String, java.lang.String, java.lang.String)

Changing particular user’s password

changeUserPassword
<confluence.changeUserPassword configKey="confluenceConfig">
	<username>bob</username>
	<newPass>pwd@123</newPass>
</confluence.changeUserPassword>

To change the password of a particular user, use confluence.changeUserPassword and specify the following properties.

Properties
  • username : The username of the user

  • newPass : The new password

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#changeUserPassword(java.lang.String, java.lang.String, java.lang.String)

Deactivating a user profile

deactivateUser
<confluence.deactivateUser configKey="confluenceConfig">
	<username>bob</username>
</confluence.deactivateUser>

To deactivate the profile of a particular user, use confluence.deactivateUser and specify the following properties.

Properties
  • username  : The username of the user whose profile should be removed.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#deactivateUser(java.lang.String, java.lang.String)

Getting active users

getActiveUsers
<confluence.getActiveUsers configKey="confluenceConfig">
	<viewAll>true</viewAll>
</confluence.getActiveUsers>

To get the active users, use confluence.getActiveUsers and specify the following properties. If successful, Confluence responds with a list of active users.

Properties
  • viewAll : This determines whether all users should be shown. When the value is false, all the users in the Confluence Users group will be returned. If not, every registered user is returned.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getActiveUsers(java.lang.String, boolean)

Getting groups

getGroups
<confluence.getGroups configKey="confluenceConfig" />

To get the group list, use confluence.getGroups If successful, Confluence responds with a list of groups

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getGroups(java.lang.String)

Getting an user

getBlogEntries
<confluence.getUser configKey="confluenceConfig">
<username>bob</username>
</confluence.getUser>

To get an user, use confluence.getUser and specify the following properties. If successful, Confluence responds with the user information.

Properties
  • username : The username of the user

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getUser(java.lang.String, java.lang.String)

Getting user groups

getUserGroups
<confluence.getUserGroups configKey="confluenceConfig">
	<username>bob</username>
</confluence.getUserGroups>

To get the groups to which the user belongs, use confluence.getUserGroups and specify the following properties. If successful, Confluence responds with a list of groups t which the user belongs.

Properties
  • username : The username of the user

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getUserGroups(java.lang.String, java.lang.String)

Getting user information

getBlogEntries
<confluence.getUserInformation configKey="confluenceConfig">
	<username>bob</username>
</confluence.getUserInformation>

To get user information, use confluence.getUserInformation and specify the following properties. If successful, Confluence responds with the information of the user.

Properties
  • username : The username of the user

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#getUserInformation(java.lang.String, java.lang.String)

Removing a group

removeGroup
<confluence.removeGroup configKey="confluenceConfig">
	<groupname>engineering</groupname>
</confluence.removeGroup>

To remove a group, use confluence.removeGroup and specify the following properties.

Properties
  • groupname : The name of the group.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#removeGroup(java.lang.String, java.lang.String, java.lang.String)

Removing a user

removeUser
<confluence.removeUser configKey="confluenceConfig">
	<username>bob</username>
</confluence.removeUser>

To remove a user, use confluence.removeUser and specify the following properties.

Properties
  • username : The username of the user to be removed.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#removeUser(java.lang.String, java.lang.String)

Remove an user from a group

removeUserFromGroup
<confluence.removeUserFromGroup configKey="confluenceConfig">
	<username>bob</username>
	<groupname>engineering</groupname>
</confluence.removeUserFromGroup>

To remove an user from a group, use confluence.removeUserFromGroup and specify the following properties.

Properties
  • username : The username of the user to be removed.

  • groupname : The name of the group.

Related Confluence documentation

https://developer.atlassian.com/static/javadoc/confluence/4.2.13/reference/com/atlassian/confluence/rpc/soap/ConfluenceSoapService.html#removeUserFromGroup(java.lang.String, java.lang.String, java.lang.String)

Working with content

OperationDescription
getContent

Retrieves a piece of content. 

getContentChildrenRetrieves a map of the direct children of a piece of content.
listContentRetrieves a paginated list of content.
listContentCommentsRetrieves the comments of a content 
returnContentHistoryRetrieves the history of a particular piece of content.
searchFetches a list of content using the Confluence Query Language.
updateContentUpdates a piece of content, including changes to content status.

Retrieving a piece of content 

getContent
<confluence.getContent>
    <id>{$ctx:id}</id>
    <status>{$ctx:status}</status>
    <expand>{$ctx:expand}</expand>
	<version>{$ctx:version}</version>
</confluence.getContent>

This operation retrieves a piece of content.

Properties
  • id: The ID of the content.

  • status: List of content statuses to filter results on. Default value: [current].

  • expand : A comma separated list of properties to expand on the content.

  • version: Integer value of the content version to filter.

Related Confluence documentation

https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e751

Retrieving a map of the direct children of a piece of content

getContentChildren
<confluence.getContentChildren>
    <limit>{$ctx:limit}</limit>
    <id>{$ctx:id}</id>
    <parentVersion>{$ctx:parentVersion}</parentVersion>
    <start>{$ctx:start}</start>
	<expand>{$ctx:expand}</expand>
</confluence.getContentChildren>

This operation retrieves a map of the direct children of a piece of content.

Properties
  • limit : The limit of the number of items to return, this may be restricted by fixed system limits.

  • id : The ID of the content.

  • parentVersion : An int representing the version of the content to retrieve children. Default value is 0.
  • start : The start point of the collection to return.
  • expand : A comma separated list of properties to expand on the children.
Related Confluence documentation

https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e1172

Retrieving a paginated list of content

listContent
<confluence.listContent>
    <type>{$ctx:type}</type>
    <spaceKey>{$ctx:spaceKey}</spaceKey>
    <title>{$ctx:title}</title>
    <status>{$ctx:status}</status>
    <postingDay>{$ctx:postingDay}</postingDay>
    <expand>{$ctx:expand}</expand>
    <start>{$ctx:start}</start>
	<limit>{$ctx:limit}</limit>
</confluence.listContent>

This operation retrieves a paginated list of content.

Properties
  • type : The content type to return. Default value: page. Valid values: page, blog post.

  • spaceKey : The ID of the content.

  • title : The title of the page to find. Required for page type.
  • status : List of statuses the content to be found is in. Defaults to current is not specified.
  • postingDay : The posting day of the blog post. Required for blog post type. Format: yyyy-mm-dd.
  • expand : A comma separated list of properties to expand on the content. Default value: history,space,version.
  • start : The start point of the collection to return.
  • limit : The limit of the number of items to return, this may be restricted by fixed system limits.
Related Confluence documentation

 https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e700

Retrieving the comments of a content

listContentComments
<confluence.listContentComments>
    <limit>{$ctx:limit}</limit>
    <id>{$ctx:id}</id>
    <parentVersion>{$ctx:parentVersion}</parentVersion>
    <location>{$ctx:location}</location>
    <start>{$ctx:start}</start>
    <expand>{$ctx:expand}</expand>
	<depth>{$ctx:depth}</depth>
</confluence.listContentComments>

This operation retrieves the comments of a content.

Properties
  • limit : How many items should be returned after the start index.

  • id : The ID of the content to retrieve comments.

  • parentVersion : An int representing the version of the content to retrieve children for.

  • location : JSON string array containing the locations of the comments. Possible values are: 'inline', 'footer', 'resolved'.
  • start : The index of the first item within the result set that should be returned.
  • expand : A comma separated list of properties to expand on the children.
  • depth : The depth of the comments. Possible values are:  'ROOT only', 'all'.
Related Confluence documentation

https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e1247

Retrieving the history of a particular piece of content

returnContentHistory
<confluence.returnContentHistory>
    <id>{$ctx:id}</id>
	<expand>{$ctx:expand}</expand>
</confluence.returnContentHistory>

This operation retrieves the history of a particular piece of content.

Properties
  • id : The ID of the content.

  • expand : A comma separated list of properties to expand on the content. Default value: history,space,version.
Related Confluence documentation

https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e802

Fetching a list of content using the Confluence Query Language

search
<confluence.search>
    <limit>{$ctx:limit}</limit>
    <cqlContext>{$ctx:cqlContext}</cqlContext>
    <start>{$ctx:start}</start>
    <expand>{$ctx:expand}</expand>
	<cql>{$ctx:cql}</cql>
</confluence.search>

This operation fetches a list of content using the Confluence Query Language.

Properties
  • limit : The limit of the number of items to return, this may be restricted by fixed system limits.

  • cqlContext : The context to execute a CQL search in, this is the JSON serialized form of SearchContext.
  • start : The start point of the collection to return.
  • expand : A comma separated list of properties to expand on the content.
  • cql : A CQL query string to use to locate content.
Related Confluence documentation

https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e931

Updating a piece of content, including changes to content status

updateContent
<confluence.updateContent>
    <contentBody>{$ctx:contentBody}</contentBody>
    <contentId>{$ctx:contentId}</contentId>
    <title>{$ctx:title}</title>
	<existingStatus>{$ctx:existingStatus}</existingStatus>
    <newStatus>{$ctx:newStatus}</newStatus>
    <conflictPolicy>{$ctx:conflictPolicy}</conflictPolicy>
    <ancestors>{$ctx:ancestors}</ancestors>
    <type>{$ctx:type}</type>
	<versionNumber>{$ctx:versionNumber}</versionNumber>
</confluence.updateContent>

This operation updates a piece of content, including changes to content status.

Properties
  • contentBody : The body of the content.

  • contentId : The ID of the content to be updated.
  • title : Title of the content.
  • existingStatus : The existing status of the content to be updated.
  • newStatus : New status value to be change content status. Possible values are 'current' and 'trashed'.
  • conflictPolicy : The conflict policy of the content to be updated. Default value is 'abort'.
  • ancestors : To update a page and change its parent page, supply the ancestors property.
  • type : The type of the content.
  • versionNumber : Integer number of the version to be updated.
Related Confluence documentation

https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e889

Working with content properties

OperationDescription
createNewContentProperty

Creates a new content property. 

getContentPropertyRetrieves a content property. 
listContentPropertiesRetrieves a paginated list of content properties. 

Creating a new content property

createNewContentProperty
<confluence.createNewContentProperty>
    <id>{$ctx:id}</id>
    <value>{$ctx:value}</value>
	<key>{$ctx:key}</key>
</confluence.createNewContentProperty>

This operation creates a new content property.

Properties
  • id : The unique identifier of the content, to attach the property to.

  • value: The value of the content property.

  • key: The key of the content property.
Related Confluence documentation

https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e341

Retrieving a content property

getContentProperty
<confluence.getContentProperty>
    <id>{$ctx:id}</id>
    <expand>{$ctx:expand}</expand>
	<key>{$ctx:key}</key>
</confluence.getContentProperty>

This operation creates a new content property.

Properties
  • id : The unique identifier of the content which the property is attached to.

  • expand : A comma separated list of properties to expand on the content properties. Default value: version.

  • key : The key of the content property.

Related Confluence documentation

https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e249

Retrieving a paginated list of content properties

listContentProperties
<confluence.listContentProperties>
    <limit>{$ctx:limit}</limit>
    <id>{$ctx:id}</id>
    <start>{$ctx:start}</start>
	<expand>{$ctx:expand}</expand>
</confluence.listContentProperties>

This operation retrieves a paginated list of content properties.

Properties
  • limit    : The limit of the number of items to return, this may be restricted by fixed system limits.

  • id : The content to attach the property to.

  • start : The start point of the collection to return.

  • expand : A comma separated list of properties to expand on the content properties.

Related Confluence documentation

https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e163

Working with operations

OperationDescription
listOperationRestrictions

Retrieves info about all restrictions by operation.

Retrieving info about all restrictions by operation

listOperationRestrictions
<confluence.listOperationRestrictions>
    <id>{$ctx:id}</id>
	<expand>{$ctx:expand}</expand>
</confluence.listOperationRestrictions>

This operation retrieves information about all restrictions by operation.

Properties
  • id : The ID of the content.
  • expand: A comma separated list of properties to expand on the content properties. Default value is 'group'.
Related Confluence documentation

https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e389

Working with tasks

OperationDescription
getLongRunningTask

Retrieves information about a long-running task.

listLongRunningTasksRetrieves information about all tracked long-running tasks. 

Retrieving information about a long-running task

getLongRunningTask
<confluence.getLongRunningTask>
    <id>{$ctx:id}</id>
	<expand>{$ctx:expand}</expand>
</confluence.getLongRunningTask>

This operation retrieves information about a long-running task.

Properties
  • id: The key of the task to be returned.
  • expand : A comma separated list of properties to expand on the task.
Related Confluence documentation

https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e984

Retrieving information about all tracked long-running tasks

listLongRunningTasks
<confluence.listLongRunningTasks>
    <limit>{$ctx:limit}</limit>
    <start>{$ctx:start}</start>
	<expand>{$ctx:expand}</expand>
</confluence.listLongRunningTasks>

This operation retrieves information about all tracked long-running tasks.

Properties
  • limit : The limit of the number of items to return, this may be restricted by fixed system limits.
  • start : The start point of the collection to return.
  • expand : A comma separated list of properties to expand on the tasks.
Related Confluence documentation

https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e965 

Example

Following example shows how to make use of the Confluence connector.

Proxy Configuration
<proxy xmlns="http://ws.apache.org/ns/synapse" name="getSpace"
    statistics="disable" trace="disable" transports="https,http">
    <target>
        <inSequence>
            <log category="INFO" level="full" separator=","/>
			<property action="set" expression="json-eval($.username)"
                name="username" scope="default" type="STRING"/>
            <property action="set" expression="json-eval($.password)"
                name="password" scope="default" type="STRING"/>
            <property action="set" expression="json-eval($.uri)"
                name="uri" scope="default" type="STRING"/>
		            <property action="set" expression="json-eval($.spaceKey)"
                name="spaceKey" scope="default" type="STRING"/>
			<confluence.init>
                <username>{get-property('username')}</username>
                <password>{get-property('password')}</password>
                <uri>{get-property('uri')}</uri>
            </confluence.init>
            <confluence.getSpace>
                <spaceKey>{get-property('spaceKey')}</spaceKey>
            </confluence.getSpace>
            <respond/>
        </inSequence>
        <faultSequence/>
    </target>
</proxy>

When invoked with the request below, the above proxy will get the pages of the space.

Request
{
	"username":"admin",
	"password":"admin",
	"uri":"http://localhost:8090/rpc/soap-axis/confluenceservice-v2",
	"spaceKey":"SPACE"
}