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.
- 1 Connecting to Confluence
- 2 Working with administrative operations
- 3 Working with attachments
- 4 Working with blogs
- 5 Working with general operations
- 6 Working with labels
- 7 Adding a list of labels to the specified content
- 8 Working with pages
- 9 Changing permissions
- 10 Working with Spaces
- 11 Managing users
- 12 Working with content
- 13 Working with content properties
- 14 Working with operations
- 15 Working with tasks
- 16 Example
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
Operation | Description |
|---|---|
Exports a Confluence instance and returns a string holding the URL for the download. | |
Returns information about the cluster to which this node belongs. | |
Returns a vector of | |
Returns |
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)
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
ClusterNodeStatuses
<confluence.getClusterNodeStatuses configKey="confluenceConfig"/> To get cluster note status, use confluence.getClusterNodeStatus. If successful, Confluence responds with node status.
Related Confluence documentation
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
Working with attachments
Operation | Description |
|---|---|
Retrieves a paginated list of attachment content entities within a single container. | |
Gets the contents of an attachment. | |
Removes an attachment from a content entity object. |
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
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 theContentEntityObjectthe 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 aversionNumber0
Related Confluence documentation
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 theContentEntityObjectto which the attachment belongs.fileName: The name of the attachment.
Related Confluence documentation
Working with blogs
Operation | Description |
|---|---|
Returns all the summaries in the space. | |
Returns a single entry |
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
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
Working with general operations
Operation | Description |
|---|---|
Retrieves some basic information about the server to which the connection is made. |
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
Working with labels
Operation | Description |
|---|---|
Adds a label to the object with the given ContentEntityObject ID. | |
Returns the content for a given label name. | |
Returns the most popular labels for the Confluence instance with a specified maximum number. | |
Returns the recently used labels for the Confluence instance with a specified maximum number of results. | |
Returns an array of spaces that have been labelled with labelName. | |
Adds a list of labels to the specified content. | |
Retrieves the list of labels on a piece of content. | |
Deletes labels to the specified content. |
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
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
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
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
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
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
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
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
Operation | Description |
|---|---|
Moves the position of a page in the hierarchy. | |
Moves a page to the top level of the target space. | |
Removes a page. | |
Returns all the page level permissions for this page as content permission sets. | |
Returns a single page | |
Returns all the summaries in the space. |
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.