|
All Versions
Click for all versions
Confluence 3.0 Documentation
|
On this page:
Introduction
Confluence provides remote APIs as both XML-RPC and SOAP. This document refers to the XML-RPC specification, see SOAP details below. XML-RPC and SOAP are both remote choices, as they have bindings for almost every language making them very portable.
Which should I use?
- SOAP is generally more useful from a strongly typed language (like Java or C#) but these require more setup.
- XML-RPC is easier to use from a scripting language (like Perl, Python, AppleScript etc) and hence is often quicker to use.
 | Looking for the JIRA remote APIs? They are here. |
XML-RPC Information
Some borrowed from the (VPWik specification):
- The URL for XML-RPC requests is http://<<confluence-install>>/rpc/xmlrpc .
- All XML-RPC methods must be prefixed by confluence1. - to indicate this is version 1 of the API. We might introduce another version in the future. For example to call the getPage method, the method name is confluence1.getPage .
- All keys in structs are case sensitive.
- All strings are decoded according to standard XML document encoding rules. Due to a bug in Confluence versions prior to 2.8, strings sent via XML-RPC are decoded using the JVM platform default encoding (CONF-10213) instead of the XML encoding.
- Confluence uses 64 big long values for things like object IDs, but XML-RPC's largest supported numeric type is int32. As such, all IDs and other long values must be converted to Strings when passed through XML-RPC API.
- Anywhere you see the word Vector, you can interchange it with "Array" or "List" depending on what language you prefer. This is the array data type as defined in the XML-RPC spec.
- Anywhere you see the word Hashtable, you can interchange it with "Struct" or "Dictionary" or "Map" depending on what language you prefer. This is the struct data type as defined in the XML-RPC spec.
- The default session lifetime is 30 minutes, but that can be controlled by the deployer from the applicationContext.xml file. This can be found in the /confluence/WEB-INF/lib/confluence-x.jar file.
SOAP Information
The SOAP API follows the same methods as below, except with typed objects (as SOAP allows for).
To find out more about the SOAP API, simply point your SOAP 'stub generator' at the WSDL file, located at http://<confluence-install>/rpc/soap-axis/confluenceservice-v1?wsdl .
For reference, the confluence.atlassian.com WSDL file is here.
The Confluence Command Line Interface is a good place to get a functioning client.
Remote Methods
Authentication Methods
- String login(String username, String password) - log in a user. Returns a String authentication token to be passed as authentication to all other remote calls. It's not bulletproof auth, but it will do for now. Must be called before any other method in a 'remote conversation'. From 1.3 onwards, you can supply an empty string as the token to be treated as being the anonymous user.
- boolean logout(String token) - remove this token from the list of logged in tokens. Returns true if the user was logged out, false if they were not logged in in the first place.
Administration
- String exportSite(String token, boolean exportAttachments) - exports a Confluence instance and returns a String holding the URL for the download. The boolean argument indicates whether or not attachments ought to be included in the export.
- ClusterInformation getClusterInformation(String token) - returns information about the cluster this node is part of.
- Vector getClusterNodeStatuses(String token) - returns a Vector of NodeStatus objects containing information about each node in the cluster.
General
- ServerInfo getServerInfo(String token) - retrieve some basic information about the server being connected to. Useful for clients that need to turn certain features on or off depending on the version of the server. (Since 1.0.3)
Spaces
Retrieval
- Vector getSpaces(String token) - returns all the SpaceSummaries that the current user can see.
- Space getSpace(String token, String spaceKey) - returns a single Space.
- String exportSpace(String token, String spaceKey, String exportType) - exports a space and returns a String holding the URL for the download. The export type argument indicates whether or not to export in XML, PDF, or HTML format - use "TYPE_XML", "TYPE_PDF", or "TYPE_HTML" respectively. Also, using "all" will select TYPE_XML.
Management
- Space addSpace(String token, Space space) - create a new space, passing in name, key and description.
- Boolean removeSpace(String token, String spaceKey) - remove a space completely.
- Space addPersonalSpace(String token, Space personalSpace, String userName) - add a new space as a personal space.
- boolean convertToPersonalSpace(String token, String userName, String spaceKey, String newSpaceName, boolean updateLinks) - convert an existing space to a personal space.
- Space storeSpace(String token, Space space) - create a new space if passing in a name, key and description or update the properties of an existing space. Only name, homepage or space group can be changed.
- boolean importSpace(String token, byte[] zippedImportData) - import a space into Confluence. Note that this uses a lot of memory - about 4 times the size of the upload. The data provided should be a zipped XML backup, the same as exported by Confluence.
Pages
Retrieval
- Vector getPages(String token, String spaceKey) - returns all the PageSummaries in the space. Doesn't include pages which are in the Trash. Equivalent to calling Space.getCurrentPages().
- Page getPage(String token, String pageId) - returns a single Page
- Page getPage(String token, String spaceKey, String pageTitle) - returns a single Page
- Vector getPageHistory(String token, String pageId) - returns all the PageHistorySummaries - useful for looking up the previous versions of a page, and who changed them.
Permissions
- Vector getContentPermissionSets(String token, String contentId) - returns all the page level permissions for this page as ContentPermissionSets
- Hashtable getContentPermissionSet(String token, String contentId, String permissionType) - returns the set of permissions on a page as a map of type to a list of ContentPermission, for the type of permission which is either 'View' or 'Edit'
- Boolean setContentPermissions(String token, String contentId, String permissionType, Vector permissions) - sets the page-level permissions for a particular permission type (either 'View' or 'Edit') to the provided vector of ContentPermissions. If an empty list of permissions are passed, all page permissions for the given type are removed. If the existing list of permissions are passed, this method does nothing.
Dependencies
- Vector getAttachments(String token, String pageId) - returns all the Attachments for this page (useful to point users to download them with the full file download URL returned).
- Vector getAncestors(String token, String pageId) - returns all the ancestors (as PageSummaries) of this page (parent, parent's parent etc).
- Vector getChildren(String token, String pageId) - returns all the direct children (as PageSummaries) of this page.
- Vector getDescendents(String token, String pageId) - returns all the descendents (as PageSummaries) of this page (children, children's children etc).
- Vector getComments(String token, String pageId) - returns all the comments for this page.
- Comment getComment(String token, String commentId) - returns an individual comment.
- Comment addComment(String token, Comment comment) - adds a comment to the page.
- boolean removeComment(String token, String commentId) - removes a comment from the page.
Management
- Page storePage(String token, Page page) - add or update a page. For adding, the Page given as an argument should have space, title and content fields at a minimum. For updating, the Page given should have id, space, title, content and version fields at a minimum. The parentId field is always optional. All other fields will be ignored.
- String renderContent(String token, String spaceKey, String pageId, String content) - returns the HTML rendered content for this page. If 'content' is provided, then that is rendered as if it were the body of the page (useful for a 'preview page' function). If it's not provided, then the existing content of the page is used instead (ie useful for 'view page' function).
- String renderContent(String token, String spaceKey, String pageId, String content, Hashtable parameters) - Like the above renderContent(), but you can supply an optional hash (map, dictionary, etc) containing additional instructions for the renderer. Currently, only one such parameter is supported:
- "style = clean" Setting the "style" parameter to "clean" will cause the page to be rendered as just a single block of HTML within a div, without the HTML preamble and stylesheet that would otherwise be added.
- void removePage(String token, String pageId) - remove a page
Attachments - new in version 2.0
Retrieval
- Attachment getAttachment(String token, String pageId, String fileName, String versionNumber) - get information about an attachment.
- byte[] getAttachmentData(String token, String pageId, String fileName, String versionNumber) - get the contents of an attachment.
|
To retrieve information or content from the current version of an attachment, use a 'versionNumber' of "0".
|
Management
- Attachment addAttachment(String token, long contentId, Attachment attachment, byte[] attachmentData) - add a new attachment to a content entity object. Note that this uses a lot of memory - about 4 times the size of the attachment. The 'long contentId' is actually a String pageId for XML-RPC.
- boolean removeAttachment(String token, String contentId, String fileName) - remove an attachment from a content entity object.
- boolean moveAttachment(String token, String originalContentId, String originalName, String newContentEntityId, String newName) - move an attachment to a different content entity object and/or give it a new name.
Blog Entries
- Vector getBlogEntries(String token, String spaceKey) - returns all the BlogEntrySummaries in the space.
- BlogEntry getBlogEntry(String token, String pageId) - returns a single BlogEntry.
- BlogEntry storeBlogEntry(String token, BlogEntry entry) - add or update a blog entry. For adding, the BlogEntry given as an argument should have space, title and content fields at a minimum. For updating, the BlogEntry given should have id, space, title, content and version fields at a minimum. All other fields will be ignored.
- BlogEntry getBlogEntryByDayAndTitle(String token, String spaceKey, int dayOfMonth, String postTitle) - Retrieves a blog post in the Space with the given spaceKey, with the title 'postTitle' and posted on the day 'dayOfMonth'.
Search
- Vector search(String token, String query, int maxResults) - return a list of SearchResults which match a given search query (including pages and other content types). This is the same as a performing a parameterised search (see below) with an empty parameter map.
- Vector search(String token, String query, Map parameters, int maxResults) - (since 1.3) like the previous search, but you can optionally limit your search by adding parameters to the parameter map. If you do not include a parameter, the default is used instead.
Parameters for Limiting Search Results
| key |
description |
values |
default |
| spaceKey |
search a single space |
(any valid space key) |
Search all spaces |
| type |
Limit the content types of the items to be returned in the search results. |
page
blogpost
mail
comment
attachment
spacedescription
personalinformation |
Search all types |
| modified |
Search recently modified content |
TODAY
YESTERDAY
LASTWEEK
LASTMONTH |
No limit |
| contributor |
The original creator or any editor of Confluence content. For mail, this is the person who imported the mail, not the person who sent the email message. |
Username of a Confluence user. |
Results are not filtered by contributor |
Security
- Vector 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").
- Vector getPermissionsForUser(String token, String spaceKey, String userName) - Returns a Vector of Strings representing the permissions the given user has for this space. (since 2.1.4)
- Vector getPagePermissions(String token, String pageId) - Returns a Vector of Permissions representing the permissions set on the given page.
- Vector getSpaceLevelPermissions(String token) - returns all of the space level permissions which may be granted. This is a list of possible permissions to use with addPermissionToSpace, below, not a list of current permissions on a Space.
- boolean addPermissionToSpace(String token, String permission, String remoteEntityName, String spaceKey) - Give the entity named remoteEntityName (either a group or a user) the permission permission on the space with the key spaceKey.
- boolean addPermissionsToSpace(String token, Vector permissions, String remoteEntityName, String spaceKey) - Give the entity named remoteEntityName (either a group or a user) the permissions permissions on the space with the key spaceKey.
- boolean removePermissionFromSpace(String token, String permission, String remoteEntityName, String spaceKey) - Remove the permission permission} from the entity named {{remoteEntityName (either a group or a user) on the space with the key spaceKey.
- boolean addAnonymousPermissionToSpace(String token, String permission, String spaceKey) - Give anonymous users the permission permission on the space with the key spaceKey. (since 2.0)
- boolean addAnonymousPermissionsToSpace(String token, Vector permissions, String spaceKey) - Give anonymous users the permissions permissions on the space with the key spaceKey. (since 2.0)
- boolean removeAnonymousPermissionFromSpace(String token, String permission,String spaceKey) - Remove the permission permission} from anonymous users on the space with the key {{spaceKey. (since 2.0)
- boolean removeAllPermissionsForGroup(String token, String groupname) - Remove all the global and space level permissions for groupname.
Space permissions
Names are as shown in Space Admin > Permissions. Values can be passed to security remote API methods above which take a space permission parameter.
| Permission name |
String value |
Description |
| View |
VIEWSPACE |
View all content in the space |
| Pages - Create |
EDITSPACE |
Create new pages and edit existing ones |
| Pages - Export |
EXPORTPAGE |
Export pages to PDF, Word |
| Pages - Restrict |
SETPAGEPERMISSIONS |
Set page-level permissions |
| Pages - Remove |
REMOVEPAGE |
Remove pages |
| News - Create |
EDITBLOG |
Create news items and edit existing ones |
| News - Remove |
REMOVEBLOG |
Remove news |
| Comments - Create |
COMMENT |
Add comments to pages or news in the space |
| Comments - Remove |
REMOVECOMMENT |
Remove the user's own comments |
| Attachments - Create |
CREATEATTACHMENT |
Add attachments to pages and news |
| Attachments - Remove |
REMOVEATTACHMENT |
Remove attachments |
| Mail - Remove |
REMOVEMAIL |
Remove mail |
| Space - Export |
EXPORTSPACE |
Export space to PDF, HTML or XML |
| Space - Admin |
SETSPACEPERMISSIONS |
Administer the space |
User Management
- User getUser(String token, String username) - get a single user
- void addUser(String token, User user, String password) - add a new user with the given password
- void addGroup(String token, String group) - add a new group
- Vector getUserGroups(String token, String username) - get a user's current groups
- void addUserToGroup(String token, String username, String groupname) - add a user to a particular group
- boolean removeUserFromGroup(String token, String username, String groupname) - remove a user from a group.
- boolean removeUser(String token, String username) - delete a user.
- boolean removeGroup(String token, String groupname, String defaultGroupName) - remove a group. If defaultGroupName is specified, users belonging to groupname will be added to defaultGroupName.
- Vector getGroups(String token) - gets all groups
- boolean hasUser(String token, String username) - checks if a user exists
- boolean hasGroup(String token, String groupname) - checks if a group exists
- boolean editUser(String token, RemoteUser remoteUser) - edits the details of a user
- boolean deactivateUser(String token, String username) - deactivates the specified user
- boolean reactivateUser(String token, String username) - reactivates the specified user
- Vector getActiveUsers(String token, boolean viewAll) - returns all registered users
- boolean setUserInformation(String token, UserInformation userInfo) - updates user information
- UserInformation getUserInformation(String token, String username) - Retrieves user information
- boolean changeMyPassword(String token, String oldPass, String newPass) - changes the current user's password
- boolean changeUserPassword(String token, String username, String newPass) - changes the specified user's password
- boolean addProfilePicture(String token, String userName, String fileName, String mimeType, byte[] pictureData) - add and set the profile picture for a user.
Labels
- Vector getLabelsById(String token, long objectId) - Returns all Labels for the given ContentEntityObject ID
- Vector getMostPopularLabels(String token, int maxCount) - Returns the most popular Labels for the Confluence instance, with a specified maximum number.
- Vector getMostPopularLabelsInSpace(String token, String spaceKey, int maxCount) - Returns the most popular Labels for the given spaceKey, with a specified maximum number of results.
- Vector getRecentlyUsedLabels(String token, int maxResults) - Returns the recently used Labels for the Confluence instance, with a specified maximum number of results.
- Vector getRecentlyUsedLabelsInSpace(String token, String spaceKey, int maxResults) - Returns the recently used Labels for the given spaceKey, with a specified maximum number of results.
- Vector getSpacesWithLabel(String token, String labelName) - Returns an array of Spaces that have been labelled with labelName.
- Vector getRelatedLabels(String token, String labelName, int maxResults) - Returns the Labels related to the given label name, with a specified maximum number of results.
- Vector getRelatedLabelsInSpace(String token, String labelName, String spaceKey, int maxResults) - Returns the Labels related to the given label name for the given spaceKey, with a specified maximum number of results.
- Vector getLabelsByDetail(String token, String labelName, String namespace, String spaceKey, String owner) - Retrieves the Labels matching the given labelName, namespace, spaceKey or owner.
- Vector getLabelContentById(String token, long labelId) - Returns the content for a given label ID
- Vector getLabelContentByName(String token, String labelName) - Returns the content for a given label name.
- Vector getLabelContentByObject(String token, Label labelObject) - Returns the content for a given Label object.
- Vector getSpacesContainingContentWithLabel(String token, String labelName) - Returns all Spaces that have content labelled with labelName.
- boolean addLabelByName(String token, String labelName, long objectId) - Adds label(s) to the object with the given ContentEntityObject ID. For multiple labels, labelName should be in the form of a space-separated or comma-separated string.
- boolean addLabelById(String token, long labelId, long objectId) - Adds a label with the given ID to the object with the given ContentEntityObject ID.
- boolean addLabelByObject(String token, Label labelObject, long objectId) - Adds the given label object to the object with the given ContentEntityObject ID.
- boolean addLabelByNameToSpace(String token, String labelName, String spaceKey) - Adds a label to the object with the given ContentEntityObject ID.
- boolean removeLabelByName(String token, String labelName, long objectId) - Removes the given label from the object with the given ContentEntityObject ID.
- boolean removeLabelById(String token, long labelId, long objectId) - Removes the label with the given ID from the object with the given ContentEntityObject ID.
- boolean removeLabelByObject(String token, Label labelObject, long objectId) - Removes the given label object from the object with the given ContentEntityObject ID.
- boolean removeLabelByNameFromSpace(String token, String labelName, String spaceKey) - Removes the given label from the given spaceKey.
Data Objects
Most returned structs have a summary and a detailed form:
- The summary form is a primary key (ie space key, page id) and a representative form (ie space name, page title)
- The detailed form will have all of the entity details as might be needed for the client.
Unless otherwise specified, all returned structs are in detailed form.
ServerInfo
| Key |
Type |
Value |
| majorVersion |
int |
the major version number of the Confluence instance |
| minorVersion |
int |
the minor version number of the Confluence instance |
| patchLevel |
int |
the patch-level of the Confluence instance |
| buildId |
String |
the build ID of the Confluence instance (usually a number) |
| developmentBuild |
Boolean |
Whether the build is a developer-only release or not |
| baseUrl |
String |
The base URL for the confluence instance |
Note: Version 1.0.3 of Confluence would be major-version: 1, minor-version: 0, patch-level: 3. Version 2.0 would have a patch-level of 0, even if it's not visible in the version number.
SpaceSummary
| Key |
Type |
Value |
| key |
String |
the space key |
| name |
String |
the name of the space |
| type |
String |
type of the space |
| url |
String |
the url to view this space online |
Space
| Key |
Type |
Value |
| key |
String |
the space key |
| name |
String |
the name of the space |
| url |
String |
the url to view this space online |
| homepage |
String |
the id of the space homepage |
| description |
String |
the HTML rendered space description |
PageSummary
| Key |
Type |
Value |
| id |
String |
the id of the page |
| space |
String |
the key of the space that this page belongs to |
| parentId |
String |
the id of the parent page |
| title |
String |
the title of the page |
| url |
String |
the url to view this page online |
| locks |
int |
the number of locks current on this page |
Page
| Key |
Type |
Value |
| id |
String |
the id of the page |
| space |
String |
the key of the space that this page belongs to |
| parentId |
String |
the id of the parent page |
| title |
String |
the title of the page |
| url |
String |
the url to view this page online |
| version |
int |
the version number of this page |
| content |
String |
the page content |
| created |
Date |
timestamp page was created |
| creator |
String |
username of the creator |
| modified |
Date |
timestamp page was modified |
| modifier |
String |
username of the page's last modifier |
| homePage |
Boolean |
whether or not this page is the space's homepage |
| locks |
int |
the number of locks current on this page |
| contentStatus |
String |
status of the page (eg. current or deleted) |
| current |
Boolean |
whether the page is current and not deleted |
PageHistorySummary
| Key |
Type |
Value |
| id |
String |
the id of the historical page |
| version |
int |
the version of this historical page |
| modifier |
String |
the user who made this change |
| modified |
Date |
timestamp change was made |
| versionComment |
String |
the comment made when the version was changed |
BlogEntrySummary
| Key |
Type |
Value |
| id |
String |
the id of the blog entry |
| space |
String |
the key of the space that this blog entry belongs to |
| title |
String |
the title of the blog entry |
| url |
String |
the url to view this blog entry online |
| locks |
int |
the number of locks current on this page |
| publishDate |
Date |
the date the blog post was published |
BlogEntry
| Key |
Type |
Value |
| id |
String |
the id of the blog entry |
| space |
String |
the key of the space that this blog entry belongs to |
| title |
String |
the title of the page |
| url |
String |
the url to view this blog entry online |
| version |
int |
the version number of this blog entry |
| content |
String |
the blog entry content |
| locks |
int |
the number of locks current on this page |
RSS Feed
| Key |
Type |
Value |
| url |
String |
the URL of the RSS feed |
| title |
String |
the feed's title |
Search Result
| Key |
Type |
Value |
| title |
String |
the feed's title |
| url |
String |
the remote URL needed to view this search result online |
| excerpt |
String |
a short excerpt of this result if it makes sense |
| type |
String |
the type of this result - page, comment, spacedesc, attachment, userinfo, blogpost |
| id |
String |
the long ID of this result (if the type has one) |
Attachment
| Key |
Type |
Value |
| id |
String |
numeric id of the attachment |
| pageId |
String |
page ID of the attachment |
| title |
String |
title of the attachment |
| fileName |
String |
file name of the attachment (Required) |
| fileSize |
String |
numeric file size of the attachment in bytes |
| contentType |
String |
mime content type of the attachment (Required) |
| created |
Date |
creation date of the attachment |
| creator |
String |
creator of the attachment |
url |
String |
url to download the attachment online |
comment |
String |
comment for the attachment (Required) |
Comment
| Key |
Type |
Value |
| id |
String |
numeric id of the comment |
| pageId |
String |
page ID of the comment |
| title |
String |
title of the comment |
| content |
String |
notated content of the comment (use renderContent to render) |
| url |
String |
url to view the comment online |
| created |
Date |
creation date of the attachment |
| creator |
String |
creator of the attachment |
User
| Key |
Type |
Value |
| name |
String |
the username of this user |
| fullname |
String |
the full name of this user |
| email |
String |
the email address of this user |
| url |
String |
the url to view this user online |
ContentPermission
| Key |
Type |
Value |
| type |
String |
The type of permission. One of 'View' or 'Edit' |
| userName |
String |
The username of the user who is permitted to see or edit the content. Null if this is a group permission. |
| groupName |
String |
The name of the group who is permitted to see or edit the content. Null if this is a user permission. |
ContentPermissionSet
| Key |
Type |
Value |
| type |
String |
The type of permission. One of 'View' or 'Edit' |
| contentPermissions |
List |
The permissions. Each item is a ContentPermission. |
Label
| Key |
Type |
Value |
| name |
String |
the nameof the label |
| owner |
String |
the username of the owner |
| namespace |
String |
the namespace of the label |
| id |
String |
the ID of the label |
UserInformation
| Key |
Type |
Value |
| username |
String |
the username of this user |
| content |
String |
the user description |
| creatorName |
String |
the creator of the user |
| lastModifierName |
String |
the url to view this user online |
| version |
int |
the version |
id |
String |
the ID of the user |
creationDate |
Date |
the date the user was created |
| lastModificationDate |
Date |
the date the user was last modified |
ClusterInformation
| Key |
Type |
Value |
| isRunning |
boolean |
true if this node is part of a cluster. |
| name |
String |
the name of the cluster. |
| memberCount |
int |
the number of nodes in the cluster, including this node (this will be zero if this node is not clustered.) |
| description |
String |
a description of the cluster. |
| multicastAddress |
String |
the address that this cluster uses for multicasr communication. |
| multicastPort |
String |
the port that this cluster uses for multicast communication. |
NodeStatus
| Key |
Type |
Value |
| nodeId |
int |
an integer uniquely identifying the node within the cluster. |
jvmStats |
Map |
a Map containing attributes about the JVM memory usage of node. Keys are "total.memory", "free.memory", "used.memory". |
| props |
Map |
a Map containing attributes of the node. Keys are "system.date", "system.time", "system.favourite.colour", "java.version", "java.vendor",
"jvm.version", "jvm.vendor", "jvm.implemtation.version", "java.runtime", "java.vm", "user.name.word", "user.timezone",
"operating.system", "os.architecture", "fs.encoding". |
| buildStats |
Map |
a Map containing attributes of the build of Confluence running on the node. Keys are "confluence.home", "system.uptime", "system.version",
"build.number". |
Script Examples
The Confluence Extension space contains various examples of scripts
Changelog
Confluence 2.9
- Search: Removed option 'all' in table of content types and changed the default to 'All'. If you need to search for all types, simply omit the 'type' restriction.
- Search: Added option 'contributor' to the table of filter options.
2.3
- Added getClusterInformation and getClusterNodeStatuses.
2.2
- Added addPersonalSpace, convertToPersonalSpace and addProfilePicture.
2.1.4
- Added getPermissionsForUser.
2.0
- Updated getLocks() to getPagePermissions()
- Added addAttachment, getAttachment, getAttachmentData, removeAttachment and moveAttachment methods to allow remote attachment handling. Note that adding large attachments with this API uses a lot of memory during the addAttachment operation.
- Added addAnonymousPermissionToSpace, addAnonymousPermissionsToSpace and removeAnonymousPermissionFromSpace.
- Added the addComment and removeComment methods for comment manipulation.
- Added hasGroup and hasUser methods to determine if a group or user exists.
- Added editUser method.
- Added ability to deactivate and reactivate users.
- Added getActiveUsers method to retrieve a user list.
- Added ability to change the user password.
- Added ability to retrieve and modify user information.
- Added ability to retrieve, add and remove labels.
- Added getBlogEntryByDayAndTitle
1.4
- Added new exportSpace and exportSite methods to build exports of an individual space or an entire Confluence instance and return with a URL leading to the download.
- Added new getChildren and getDescendents methods to get the direct children and all descendents of a given page.
- Added new getAncestors method to get the ancestors of a given page.
- Removed the old getLocks as locks are superceded by page level permissions.
- Added new getPagePermissions method to retrieve page level permissions.
- Added new removeUser, removeGroup, removeAllPermissionsForGroup, addUserToGroup and removeUserFromGroup methods.
- Added new addPermissionToSpace method.
- Added new Permission data object.
- Added new getSpaceLevelPermissions method.
1.3
- Added new getPage method which retrieves a page by space key and page title.
- Added new removeSpace method to remove an entire space.
- Added ability to limit search by parameters.
- Allow anonymous access.
1.2
- renderContent takes an optional hashtable for rendering hints, the only one supported right now is "style=clean"
1.1
- getLocks gives you back a list of any locks that apply to a given page
- added a locks field to the various Page structs containing a count of any applicable page-level locks
- CRUD methods added for blog-posts
1.0.3
- getServerInfo gives you some basic information about the server version CONF1123
- storePage now allows you to change the page's name (incoming links are all renamed) CONF-974
- storePage now reliably allows you to re-parent pages
- WSDL now respects the server's configured base URL, allowing it to work on proxy-hosted servers CONF-1088
RELATED TOPICS
|
Comments (258)
Apr 01, 2004
Anonymous says:
Does this interoperate with JSPWiki & VoodooPad's XML-RPC interfaces ?Does this interoperate with JSPWiki & VoodooPad's XML-RPC interfaces ?
Nov 04, 2004
Mike Cannon-Brookes says:
No, it doesn't interroperate with either. The JSPWiki interface is too primitive...No, it doesn't interroperate with either. The JSPWiki interface is too primitive to do all the things we need, and VoodooPad now integrates with the Confluence APIs AFAIK.
Jul 21, 2005
Anonymous says:
Any way to change a user's password via remote API?Any way to change a user's password via remote API?
Jul 21, 2005
David Loeng says:
No. Not at the moment.No. Not at the moment.
Nov 24, 2005
Jeremy Higgs says:
As of Confluence 2.0, it is possible to change a user's password via the Remote ...As of Confluence 2.0, it is possible to change a user's password via the Remote API.
To change your password, use the following method:
To change another user's password (requires admin permission), use the following method:
Aug 08, 2008
Cameron Christensen says:
I'm wondering if there is a module or setting to provide a secure password mode....I'm wondering if there is a module or setting to provide a secure password mode. As of now, using the xmlrpc interface, usernames and passwords are sent plain text. (!)
Nov 22, 2005
Björn Feustel says:
I've pulled my hair out to get the addAttachement method working. The signature ...I've pulled my hair out to get the addAttachement method working. The signature above is wrong, because it now has four parameters. The second one (content id) is missing.
It would be great if the confluence xml-rpc service would support server introspection via system.listMethods so one could use tools like xml-rpc-api2txt to get the actual interface description.
Nov 22, 2005
Daniel Ostermeier says:
Hi Björn, I have created CONF-4712 to look into solving the remote api document...Hi Björn,
I have created CONF-4712 to look into solving the remote api documentation problem once and for all. Please add any comments to this issue.
Regards,
-Daniel
Nov 22, 2005
Daniel Ostermeier says:
While I'm on the topic, CONF-4714 fixes this inconsistency.While I'm on the topic, CONF-4714 fixes this inconsistency.
Jan 25, 2006
Eric Sorenson says:
OK, that's what I'm using now. I'll verify that it's getting passed properly, bu...OK, that's what I'm using now. I'll verify that it's getting passed properly, but thanks for the sanity-check.
Jun 01, 2006
Malcolm Wotton says:
I'm trying to extend Confluence.pm to handle this and I can't get the sig to mat...I'm trying to extend Confluence.pm to handle this and I can't get the sig to match. what should the last byte[] be passed as (in perl) I've tried a string and an array and get the following errors:
REMOTE ERROR: java.lang.NoSuchMethodException: $Proxy40.addAttachment(java.lang.String, java.lang.String, java.util.Hashtable, java.util.Vector)
And
REMOTE ERROR: java.lang.NoSuchMethodException: $Proxy40.addAttachment(java.lang.String, java.util.Hashtable, java.lang.String)
Any thoughts?
Nov 23, 2005
Dan says:
Hi, How do I set a permission on a page? I know I can getPagePermission() but i...Hi,
How do I set a permission on a page? I know I can getPagePermission() but i don't see a setPagePermission()
thanks
Dan
Nov 24, 2005
Jeremy Higgs says:
Hi Dan, Currently, there is no way to set page permissions via the Remote API. ...Hi Dan,
Currently, there is no way to set page permissions via the Remote API. We have an issue for this at CONF-3908, which you can follow if you want.
Jeremy.
Nov 29, 2005
David Peterson [CustomWare] says:
Any chance of the Confluence data types in the Remote Methods section being link...Any chance of the Confluence data types in the Remote Methods section being linked to their description further down the page? E.g:
That would make it much simpler to read the docs, rather than scrolling at random...
And if you're feeling really generous, the data type description could link back to methods which make use of it also
Dec 06, 2005
Charles Miller says:
Good idea, David. I've filed this as CONF-4848Good idea, David. I've filed this as CONF-4848
Dec 15, 2005
Ben Walding says:
The documentation for lastModified as part of the search method should also note...The documentation for lastModified as part of the search method should also note that it is legal to use the 2w, 1d, 3h notations.
Jan 19, 2006
Bob Swift says:
exportSpace and exportSite are nice but would be more useful if they could also ...exportSpace and exportSite are nice but would be more useful if they could also be restored (restoreSpace, restoreSite).
Oct 31, 2008
Matt Ryall (Atlassian) says:
The importSpace method has existed in the remote API since 2.4, but was not prev...The importSpace method has existed in the remote API since 2.4, but was not previously documented. I've added it above.
Jan 27, 2006
Thomas Van de Velde says:
I've been able to call the String exportSpace(String token, String spaceKey, Str...I've been able to call the String exportSpace(String token, String spaceKey, String exportType) method and get a String representation for the download url. However when I try to download, I get a 403 error. Any solution for this? Thanks
java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:8080/download/temp\export_01272006_164839\ds-20060127-16_48_41.zip
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1149)
Jan 29, 2006
Jeremy Higgs says:
Hi Thomas, If you change the backslashes in the URL to forward slashes, does it...Hi Thomas,
If you change the backslashes in the URL to forward slashes, does it work? How have you defined your confluence.home directory?
Jeremy
Feb 14, 2006
Roshan Gunoo says:
I tried with HttpClient and it work, on the default install we have to initiated...I tried with HttpClient and it work, on the default install we have to initiated a login since the LoginFilter will kick you out if you don't.
HttpClient client = new HttpClient();
HttpState initialState = new HttpState();
Cookie mycookie = new Cookie("localhost", "mycookie", "download", "/", null, false);
initialState.addCookie(mycookie);
initialState.setCookiePolicy(CookiePolicy.RFC2109);
client.setConnectionTimeout(30000);
client.setState(initialState);
PostMethod post = new PostMethod("http://localhost:8081/confluence/login.action");
post.addParameter("os_username", "admin");
post.addParameter("os_password", "*****");
Feb 14, 2006
Tom Davies says:
Certainly you can 'screen scrape' Confluence using HttpClient, but the value of ...Certainly you can 'screen scrape' Confluence using HttpClient, but the value of the remote interface is that it is documented, so you don't need to examine Confluence's HTML, which may change without warning at any time.
Feb 15, 2006
Charles Miller says:
Try adding ?os_username=your_username&os_password=your_password onto the end...Try adding ?os_username=your_username&os_password=your_password onto the end of the URL. That will log you in at the same time as you are downloading the file.
Feb 18, 2006
Bob Swift says:
I had same problem and adding the user name and password didn't help. java.io.I...I had same problem and adding the user name and password didn't help.
java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost/download/temp/Test-20060218-22_41_43.zip?os_username=automation&os_password=xxxxx
Feb 20, 2006
Matt Ryall (Atlassian) says:
Thanks, Bob. I've replicated this problem. I've raised CONF-5533 to get it fixe...Thanks, Bob. I've replicated this problem.
I've raised CONF-5533 to get it fixed.
Feb 21, 2006
Bob Swift says:
Matt, thanks for fixing this. I will check it out when 2.1.5 is available.Matt, thanks for fixing this. I will check it out when 2.1.5 is available.
Feb 15, 2006
benjamin klatt says:
Is there anyway to remotly add external content to the search index to make it a...Is there anyway to remotly add external content to the search index to make it also available in the confluence internal search?
Feb 15, 2006
Matt Ryall (Atlassian) says:
At the moment, no. But there's a feature request to allow indexing of external c...At the moment, no. But there's a feature request to allow indexing of external content in Confluence: CONF-1436
Once that is implemented in Confluence, I imagine it won't be hard to provide a remote API.
Feb 23, 2006
justin says:
ChangeMyPassword seen to have the same functionality as changeUserPassword...ChangeMyPassword seen to have the same functionality as changeUserPassword, is this a bug??
Feb 23, 2006
Tom Davies says:
changeMyPassword can be used by any user to change their own password, while cha...changeMyPassword can be used by any user to change their own password, while changeUserPassword is used by an administrator to change any user's password.
Feb 23, 2006
justin says:
I mean I get error when i try to do the following Stri...I mean I get error when i try to do the following
String token = confluenceSoapService.login("aa","222222");
successful get token
confluenceSoapService.changeMyPassword(token, "222222","222222")
error
but if I login as a adminsitrator user token I can do the following
confluenceSoapService.changeMyPassword(token, "aa","333333")
password successful change
Feb 26, 2006
Jeremy Higgs says:
Hi Justin, Can you post the error you're getting when you call changeMyPassword...Hi Justin,
Can you post the error you're getting when you call changeMyPassword? You may want to create a support request at http://support.atlassian.com/, where we can discuss it privately.
Jeremy
Apr 03, 2006
Cheryl Chase says:
RE: getAttachment(String token, String pageId, String fileName, String versionNu...RE: getAttachment(String token, String pageId, String fileName, String versionNumber)
If you provide a version of 0 or less, you'll get the most recent version of the attachment.
May 12, 2006
David Blevins says:
I've created a Java client for the Confluence XMLRPC that is strongly typed and ...I've created a Java client for the Confluence XMLRPC that is strongly typed and open source so it can be included in other open source and proprietary projects.
Example: http://docs.codehaus.org/display/SWIZZLE/Swizzle+Confluence
Library: http://repository.codehaus.org/org/codehaus/swizzle/swizzle-confluence/
Javadoc: http://swizzle.codehaus.org/swizzle-confluence/
Source: http://cvs.codehaus.org/viewrep/swizzle/trunk/swizzle-confluence/
Mar 07, 2007
Maik Vogel says:
hello, when i try to use this: Confluence _confluence = new Confluence(_endp...hello,
when i try to use this:
Confluence _confluence = new Confluence(_endpoint);
_confluence.login(_username, _password);
at runtime i became:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xmlrpc/XmlRpcClient
at org.codehaus.swizzle.confluence.Confluence.<init>(Confluence.java:33)
how can i fix this? i downloaded the apache xmlrpcclient, too, but no change.
plz help
Mar 07, 2007
Maik Vogel says:
have just fixed it myself look at: http://confluence.atlassian.com/display/JIRA/...have just fixed it myself
look at:
http://confluence.atlassian.com/display/JIRA/JIRA+Plugin+Development+Kit
May 21, 2007
Lars Bjerges says:
Hi I have tried to use the addAttachment method and get: Avoiding obscuring pr...Hi
I have tried to use the addAttachment method and get:
My code looks like this:
It seems that the error has something to do with:
org.apache.xmlrpc.XmlRpcException: Unsupported Java type: class java.lang.Long
and that points to the first parameter "tContentid" that, I assume, would be the ID of the page that the attachment should be attached to. In all other referencet to that ID it is represented as a String. How come?
Mar 27, 2008
Bob Swift says:
Haven't looked at your details, but this API works - see Confluence Command Line...Haven't looked at your details, but this API works - see Confluence Command Line Interface
Jun 20, 2008
Anonymous says:
Hi, I am getting the same error now. Have you figured out what's the prob...Hi,
I am getting the same error now. Have you figured out what's the problem? What is your solution? Thanks.
Jun 04, 2006
James Mortimer says:
Has anyone successfully used the Metadata-Plugin api extension? From Perl? /** ...Has anyone successfully used the Metadata-Plugin api extension? From Perl?
Jul 20, 2006
steffenj says:
Is it possible via remote API to set a list of users (or a single user or usergr...Is it possible via remote API to set a list of users (or a single user or usergroup) to receive e-mail notifications for a specific page or space?
We would like people to automatically receive e-mails for the spaces/pages they should be tracking but without having everyone to set the notifications for themselves (error-prone, especially if we keep adding important spaces/pages they would have to do this every time).
Jul 20, 2006
Tom Davies says:
This isn't possible at present. You can add a feature request at http://jira.atl...This isn't possible at present. You can add a feature request at http://jira.atlassian.com
The closest thing to what you want is to get each user to subscribe to an RSS feed for content with a particular label (e.g. their username), and to add the appropriate labels via the remote interface.
Jul 20, 2006
Varindarpal Bhaura says:
There seems to be a problem with the API as it does not seem to recognise the us...There seems to be a problem with the API as it does not seem to recognise the username if the username is a number.
I have created a user called anothertest using the API, then i assigned it to a group. All worked
I then created a user called 12345689, this worked, however when trying to allocate this to a group it return undef?
From within Confluence searching for the user 123456789 returned the correct user.
Any ideas?
Jul 20, 2006
Tom Davies says:
Hi Varindarpal, Please open a support request at http://support.atlassian.com, ...Hi Varindarpal,
Please open a support request at http://support.atlassian.com, and include the source code of the client you have written.
Thanks,
Tom
Aug 07, 2006
Varindarpal Bhaura says:
is there a way of getting all the users in a particular group?is there a way of getting all the users in a particular group?
Aug 08, 2006
Ivan Benko says:
Hi Varindarpal, Looking at the available remote API, User Management section, I...Hi Varindarpal,
Looking at the available remote API, User Management section, I do not see any possible way of doing so.
Could you please raise support request :
https://support.atlassian.com
Thanks,
Ivan
Aug 15, 2006
Amit Kumar says:
Is it possible to change user login?Is it possible to change user login?
Aug 15, 2006
Charles Miller says:
I'm not sure I understand the question. Could you explain exactly what you're tr...I'm not sure I understand the question. Could you explain exactly what you're trying to achieve?
You can log in as a different identity in the remote API just by calling the login method with a different username, and using the new token it returns.
Sep 18, 2006
David Jennings says:
Is there an XMLRPC interface to Export Page? (not Export Space)Is there an XMLRPC interface to Export Page? (not Export Space)
Sep 18, 2006
Ivan Benko says:
Hi David, No there is no interface to export a page. This functionality is not ...Hi David,
No there is no interface to export a page. This functionality is not directly supported in the UI either.
Thanks,
Iva
Sep 28, 2006
Stefan Kreutter says:
You wrote: This functionality is not directly supported in the UI either. Sure?...You wrote: This functionality is not directly supported in the UI either.
Sure? What about the little icon
at the top right of the page? It does exactly that: exporting a page to PDF.
I'm currently looking for a possibility to export certain pages to PDF using an ant script or task. I failed to pass login information with a HTTP-request (I don't have cookies in ant). Jira supports login information passed as URL parameters: os_username and os_password but this seems not to work with Confluence.
Any ideas?
Oct 27, 2006
Garnet R. Chaney says:
Page storePage(String token, Page page) - add or update a page. For adding, ...Page storePage(String token, Page page) - add or update a page. For adding, the Page given as an argument should have space, title and content fields at a minimum. For updating, the Page given should have id, space, title, content and version fields at a minimum. The parentId field is always optional. All other fields will be ignored.
I need to programmatically add new pages and their revisions, and get the proper date and times (from the past) assigned to the updates. For example:
AddPage Foo "12-17-2005" Revision 1
AddPage Foo "1-15-2006" Revision 2
AddPage Foo "10-26-2006" Revision 3
Will this be possible, or will setting the date field when I call StorePage be ignored?
Nov 01, 2006
Stefan says:
hi, is there a "getting started" guide for XML-RPC development? thanks!hi,
is there a "getting started" guide for XML-RPC development?
thanks!
Feb 19, 2007
Alexander Johannesen says:
I'm trying to find a way to either a) get the password of a user (for emails of ...I'm trying to find a way to either a) get the password of a user (for emails of type 'forgotten password'), or b) a function in either Confluence or JIRA to send the user his/hers credentials. I can't seem to find neither?
Feb 19, 2007
Charles Miller says:
Alexander: Passwords are hashed before they are store in Confluence. The only wa...Alexander: Passwords are hashed before they are store in Confluence. The only way to get a "forgotten password" email is to change the password with changeUserPassword to some known value and send them that in the mail.
Confluence's mail-sending API is not exposed in the Remote API. We didn't think it was necessary.
Feb 19, 2007
Alexander Johannesen says:
Ok. Does my luck change if I say we manage our users in JIRA?Ok. Does my luck change if I say we manage our users in JIRA?
Feb 21, 2007
Mei Yan Chan says:
Hi Alexander, The passwords are also hashed in JIRA. Thus, it is still not poss...Hi Alexander,
The passwords are also hashed in JIRA. Thus, it is still not possible.
Regards,
Mei
Feb 23, 2007
Alexander Johannesen says:
Notice that I'm more converned about a way to mail my users their credentials mo...Notice that I'm more converned about a way to mail my users their credentials more than actually getting the password. I find it quite bizzarro that there is no such thing in neither API. Another problem is the lack of documentation for most of the remote function calls (Confluence); why are there no examples of anything? I'm having a hard time trying to work out how to set users permissions to spaces; not a single example. Has anyone done this?
Feb 19, 2007
Alexander Johannesen says:
I may add that the time of your server seems botched and in need of a shave.I may add that the time of your server seems botched and in need of a shave.
Feb 21, 2007
Don Willis says:
Hi Alexander, The time on the server seems accurate to me. Do you still see a ...Hi Alexander,
The time on the server seems accurate to me. Do you still see a problem with it? If so what? Is it an exact number of hours out? Have you set the timezone in your profile?
Feb 19, 2007
Garnet R. Chaney says:
Need a way to only allow certain users, or certain groups of users, to use the A...Need a way to only allow certain users, or certain groups of users, to use the API. We would like to manage our wiki through the API with the use of some external scripts, without throwing the API open to all our users. There are too many possibilities for unapproved users to accidentally do denial of service attacks using the API.
Feb 22, 2007
David Loeng says:
Please file this as an improvement or feature request at http://jira.atlassian.c...Please file this as an improvement or feature request at http://jira.atlassian.com.
If your users wanted to, they could DOS your site through the web not just through the remote API.
Cheers,
Dave
Feb 19, 2007
Garnet R. Chaney says:
We have getPagePermissions(Token, Page.id), but it seems that setPagePermissio...We have getPagePermissions(Token, Page.id), but it seems that setPagePermissions has been forgotten from this list.... Is there some other way to set page level permissions from the API?
Feb 22, 2007
David Loeng says:
An improvement request has be filed for this already: http://jira.atlassian.co...An improvement request has be filed for this already:
http://jira.atlassian.com/browse/CONF-3908
Please watch this issue to track its progress.
Cheers,
Dave
Mar 20, 2007
Bob Swift says:
addLabelByName(String token, String labelName, long objectId) seems to accept a ...addLabelByName(String token, String labelName, long objectId) seems to accept a labelName that contains a blank separated list of names and adds all of these. Not sure if this is the way it is suppose to happen or just an accident. Please clarify the documentation.
Apr 03, 2007
John Moiraskik says:
Hi, the method getActiveUsers does only return 100 external users maximum. Does...Hi,
the method getActiveUsers does only return 100 external users maximum. Does anyone know why?
Apr 03, 2007
Agnes Ro says:
I believe that may be a bug: http://jira.atlassian.com/browse/CONF-7903I believe that may be a bug: http://jira.atlassian.com/browse/CONF-7903
Jul 26, 2008
sue spence says:
..
Jan 13
Anton Prevosti says:
Hi John, Did you ever solve this problem? I am facing the same issue but with a...Hi John,
Did you ever solve this problem? I am facing the same issue but with a maximum of 1000 users. I think it might be related to the users cache which is set to 1000.
Apr 04, 2007
lars mueller says:
if i try to get a Page with any "special characters" like ä ü ö ß in the title I...if i try to get a Page with any "special characters" like ä ü ö ß in the title I get an error:
Content-Length header value was wrong, fixed at /usr/lib/perl5/vendor_perl/5.8.5/LWP/Protocol/http.pm line 188.
!!
any chance to use pages containing such characters?
Apr 04, 2007
Charles Miller says:
Sounds like Perl's Unicode handling is broken.Sounds like Perl's Unicode handling is broken.
Apr 17, 2007
lars mueller says:
so, you are able to create a site in you space thats called eg. "Über" ?so, you are able to create a site in you space thats called eg. "Über" ?
May 10, 2007
Mei Yan Chan says:
Hi Lars, I was able to create a space named 'Über' by declaring the following v...Hi Lars,
I was able to create a space named 'Über' by declaring the following value in my Perl script:
$spaceName = "\x{DC}ber";Can you please give that a try and let me know how it goes?
Regards,
Mei
Jun 13, 2007
lars mueller says:
I may was a little bit inaccurate, i dont want to create a space with these char...I may was a little bit inaccurate, i dont want to create a space with these characters in, i wanted to create a page. I found out that the same error occurs if there is a character like 'öüäß' within the content of the page.
Same happens if i try your version.
Perhabs you can post the relevant code passages of you script?
Mine looks like this:
I also tried to utf8 encode the content, which also didnt work.
Jun 14, 2007
Mei Yan Chan says:
Hi Lars, This is the following code that I have used: #!/usr/bin/perl us...Hi Lars,
This is the following code that I have used:
#!/usr/bin/perl use SOAP::Lite; use Data::Dumper; my $soap = SOAP::Lite->proxy("http://xxx/confluence/rpc/soap-axis/confluenceservice-v1?wsdl"); my $auth = $soap->login("xxx", "xxx"); $pageName = "\x{DC}ber"; print "\n"; print "Creating page: $pageName\n"; $page = $soap->storePage($auth->result(), {"space" => SOAP::Data->type(string => "TEST"), "title" => SOAP::Data->type(string => $pageName), "content" => SOAP::Data->type(string => "This is the content"), "parentId" => SOAP::Data->type(long => 524290) # Parent of the page. } );Please note that I am using SOAP::Lite for Perl. Hope this helps.
Regards,
Mei
Oct 07, 2008
Erkki Aalto says:
Hi, I have an authentication problem with a script like yours: $client = SOAP...Hi,
I have an authentication problem with a script like yours:
$client = SOAP::Lite->proxy("http://nautawiki.it.helsinki.fi/rpc/soap-axis/confluenceservice-v1?wsdl");
$token = $client->login(CONFLUENCE_USERNAME,CONFLUENCE_PASSWORD);
In the debugger i get this:
no element found
yF6MYIk5XO at user.pl line 14
at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 3481
SOAP::Lite::_ANON_[/usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm:3481]('SOAP::Lite=HASH(0xa033cbc)', 'no element found\x
SOAP::Lite::call('SOAP::Lite=HASH(0xa033cbc)', 'login', 'admin', 'xxx') called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 3629
SOAP::Lite::_ANON_[/usr/lib/perl5/vendor\_perl/5.8.8/SOAP/Lite.pm:3633]('SOAP::Lite=HASH(0xa033cbc)', 'admin','xxx') called at user.pl line 14
The confluence i using shibboleth authentication (this might be important).
Have you any idea about what is going wrong?
Apr 08, 2008
Anonymous says:
I ran across the very same problem. $page = $wiki->getPage($space, $title) ...I ran across the very same problem.
$page = $wiki->getPage($space, $title) or die "Cant get Page: $?\n";
$wiki->updatePage($page) or die "Can't store Page: $?\n";
And even though I don't change anything I get this error message:
Content-Length header value was wrong, fixed at /usr/local/lib/perl5/site_perl/5.8.8/LWP/Protocol/http.pm line 189.
I suppose no one found a solution yet.
Oct 31, 2008
Anonymous says:
You need to call pack on the content. Something like this should work: $conten...You need to call pack on the content.
Something like this should work:
$content = pack 'U0A', $content;*
This will allow you to pass UTF-8 content via the interface. NOTE: This only seems to work via SOAP. I couldn't get it to work via XML-RPC.
Hope this helps someone out!
Apr 24, 2007
Christoph Gerstle says:
Hi! I want to add a new(!) "Label" i.e. "Swing" to a given page i.e. "P...Hi!
I want to add a new(!) "Label" i.e. "Swing" to a given page i.e. "Project 2"... I think the two possibilities are
I tried first addLabelByObject,
the "Object Label" has
which are necessary for my case?
Thank you!
May 02, 2007
Liip AG says:
For remote user authentication we'd like to use getUserGroups on a per user base...For remote user authentication we'd like to use getUserGroups on a per user base. Unfortunately this only works with users, which have admin access, but not for others. Is this on purpose or a bug?
We do basically the following (in PHP pseudo code):
$this->client = new SoapClient($this->wsdlurl);
$this->token = $this->client->login($username,$password);
$this->groups = $this->client->getUserGroups($this->token,$username);
if now $username is an admin user, that works perfectly, if it's not an admin user, we do get a
"com.atlassian.confluence.rpc.NotPermittedException: You don't have administration permission."
exception. But if I log into confluence with a non-admin user, this user can see his own groups, therefore it looks like a bug to me (and if you think so too, I can add it into your Jira)
Tested with Confluence 2.4.2 btw
And here's a little text about what we try to do : http://devblog.flux-cms.org/archive/2007/05/02/flux-cms-confluence-auth-module.html
May 14, 2007
Mei Yan Chan says:
Hi Christian, This behavior is actually implemented on purpose in order to be c...Hi Christian,
This behavior is actually implemented on purpose in order to be consistent with the functionality within the UI since it requires admin rights to retrieve user groups. Hence, this should also be applicable for remote access.
If you wish to make do without the authentication, I would suggest you to write a RPC plugin instead. If you need further help or guidance on the implementation, the forum will be the place for such discussion as there may be other users who have developed it before.
Regards,
Mei
May 14, 2007
Liip AG says:
Mei: thanks fot the answer. We now check if a user has access to a particular sp...Mei: thanks fot the answer. We now check if a user has access to a particular space, which works quite well for our needs as well and which is possible with the existing remote API
Jul 10, 2007
john martin says:
I'm not having any luck with renaming a page. What am I doing wrong? I make a...I'm not having any luck with renaming a page. What am I doing wrong?
I get:
The storePage works fine if the title does not change. I am using the perl module and my server is 2.3.3
Jul 11, 2007
Mei Yan Chan says:
Hi John, Would it be possible for you to provide a sample of the code that you ...Hi John,
Would it be possible for you to provide a sample of the code that you use to rename a page? It would be appreciated if you can create a support request at the following link and as it will be easier for us to follow up. Thanks.
Regards,
Mei
Jul 11, 2007
john martin says:
thanks, Mei, I opened a ticket here. It turns out that the problem is not the...thanks, Mei, I opened a ticket here.
It turns out that the problem is not the title change alone, but trying to change both the title and contents at the same time.
Jul 20, 2007
Peter Vanags says:
Is there any way to flag a page update as a "minor change" like you can in the G...Is there any way to flag a page update as a "minor change" like you can in the GUI?
I'm writing a tool that makes bulk changes to many pages at once using this API, and it's annoying for all of them to move to the top of the Recently Updated list in the dashboard.
Jul 23, 2007
Fennie Ng says:
Hi Peter, I believe your needs have been addressed in the CONF-5725. Feel free ...Hi Peter,
I believe your needs have been addressed in the CONF-5725. Feel free to cast your vote to the improvement request and add yourself as a watcher to get its updates.
Regards,
Fennie.
Aug 08, 2007
Mathew Lam says:
Is there any method like getPermissionsForUser, but for the group? If not, can ...Is there any method like getPermissionsForUser, but for the group?
If not, can we get something like getPermissionsForGroup?
Aug 09, 2007
Mei Yan Chan says:
Hi Mathew, The method getPermissionForGroup is not available at the moment. In ...Hi Mathew,
The method getPermissionForGroup is not available at the moment. In order to include this method in the Remote API, you will need to extend the current class for ConfluenceSoapServiceDelegator.java.
Regards,
Mei
Aug 09, 2007
Mathew Lam says:
When using the storePage method, it works fine when I only update the content, b...When using the storePage method, it works fine when I only update the content, but when I try to update the Title AND Content, or just the Title, it doesn't work. Any ideas why?
That's the general code. When I try to update JUST the title:
And when I try to update both the title and content:
Aug 10, 2007
Catalin Hritcu says:
I think the specification should be updated to take the changes in CONF-2414 int...I think the specification should be updated to take the changes in CONF-2414 into account. As far as I know, now there are no methods returning void; all of them are returning boolean now.
BTW. This this sort of documentation should be automatically generated from the code.
Aug 14, 2007
Sarah Maddox [Atlassian Technical Writer] says:
Hi Catalin Thank you for pointing this out. I have raised a JIRA issue and we'll...Hi Catalin
Thank you for pointing this out. I have raised a JIRA issue and we'll tackle it as soon as possible.
Cheers – Sarah
Aug 14, 2007
Inderveer Singh says:
I am also having the same issue as Mathew is having. org.apache.xmlrpc.XmlRpcEx...I am also having the same issue as Mathew is having.
org.apache.xmlrpc.XmlRpcException: java.lang.Exception: com.atlassian.confluence.core.persistence.confluence.StaleObjectStateException: The version of the object to be saved was more than the previous version! this is not happening all the times.
Its just that it happens whenever the new deployment is done and settings to point to project code webservice changes.
Aug 14, 2007
Fennie Ng says:
Hi Inderveer, Could you please raise a support ticket for this issue so that we...Hi Inderveer,
Could you please raise a support ticket for this issue so that we can follow up from there? Alternatively, you may want to direct your questions to our forum as there might be other user/developers who have already implemented it and should be able to share their ideas with you.
Thank you.
Regards,
Fennie.
Aug 30, 2007
Omar Abdul Baki says:
Hello, Im having trouble with the storeBlogEntry function. The wsdl specifies t...Hello,
Im having trouble with the storeBlogEntry function. The wsdl specifies that the storeBlogEntryRequest message takes 2 parameters, a string(login token) followed by a RemoteBlogEntry. RemoteBlogEntry contains the following fields as specified by the wsdl:
However, Im getting "HTTP 500 Internal Server Error", when I send the storeBlogEntryRequest message with the above data type. Is there some error in the wsdl that I can perhaps correct myself? The reason I suspect so is because the BlogEntry type has the following fields (the locks field doesn't exist in the wsdl):
Sep 03, 2007
Choy Li Tham says:
Hi Omar, Could you please create a support issue on our support system at http:...Hi Omar,
Could you please create a support issue on our support system at http://support.atlassian.com with the following information:
We will respond as promptly as possible.
Alternatively, you may want to direct your questions to our forum pertaining to the problem you are having as there might be developers/users should be able to share their idea with you.
Regards,
Choy Li
Sep 21, 2007
Omar Abdul Baki says:
Sorry there was no problem. The problem was on my part. I didnt know that the ab...Sorry there was no problem. The problem was on my part. I didnt know that the above API is for the XML-RPC remote API. I thought the SOAP and XML-RPC specs were the same.
Oct 04, 2007
Jane Rhoden says:
I am having trouble using the API to sign in, my Java code is resulting in the f...I am having trouble using the API to sign in, my Java code is resulting in the following soap message:
"http://schemas.xmlsoap.org/soap/envelope/"> blahblahblahblahAnd the result is "Wrong password mate.", when I know that it is the right password. What am I doing wrong, this is what the server is responding with:
soapenv:Server.userException com.atlassian.confluence.rpc.AuthenticationFailedException: Wrong password mate. "http://rpc.confluence.atlassian.com" xsi:type="ns1:AuthenticationFailedException"/>"http://xml.apache.org/axis/">kjgkjhgjkhgThis is a snip of the code:
I have tried adding the variable "user" as above, and have also tried "username", both to no effect.
I have also tried naming the paramters as in0/in1 instead of username/password. This still results in an invalid password response.
Oct 04, 2007
Mei Yan Chan says:
Hi Jane, I would advise you to raise this in our forum or mailing list. Thanks....Hi Jane,
I would advise you to raise this in our forum or mailing list. Thanks.
Regards,
Mei
Oct 07, 2007
Jane Rhoden says:
I have had no reply about the SOAP API on the mailing list or forum. Is the SOAP...I have had no reply about the SOAP API on the mailing list or forum. Is the SOAP API still supported? (I have noticed some funny things like the input/output parameters not having variable names but are in0,in1,in2, etc.. very odd for a WSDL file).
Oct 09, 2007
Mei Yan Chan says:
Hi Jane, SOAP API such as pointers to method usage is supported but not the ful...Hi Jane,
SOAP API such as pointers to method usage is supported but not the full coding support. However, we will help to take a look at your code if you can also raise it in our support system at:
This will allow an easier way to trace and correspond with you via the issue ticket than having long threads of replies here. Please try to explain what you were trying to achieve in the support ticket and from there we will look into it. Thanks.
Regards,
Mei
Oct 05, 2007
Russ Freeman says:
Hi there Currently running 2.5.4. I'm using renderContent() to pull down a pag...Hi there
Currently running 2.5.4.
I'm using renderContent() to pull down a page but all text is centered (in IE6). I'm puzzled
as the stylesheet is standard and looks ok when rendered inside. Looking at the stylesheet, I assume it is due to this:-
body { margin: 0px; padding: 0px; text-align: center; background-color: #f0f0f0; }I assume this must either be a FAQ or something fixed post 2.5.4. (I've searched the KB with no avail).
Thanks
Russ Freeman
Oct 05, 2007
James Mortimer says:
I've also noticed this in the TimTam exclipse plugin for confluence a long time ...I've also noticed this in the TimTam exclipse plugin for confluence a long time ago. I guess not too many people use the renderContent() api call, as I don't think this has been raised as an issue. You could try raising it there. http://jira.atlassian.com/secure/BrowseProject.jspa?id=10470
Oct 08, 2007
Steven Kusters says:
I see you can search for a page within a space. Is it possible to search for a p...I see you can search for a page within a space. Is it possible to search for a page by specifying the parent page you want to search within?
Oct 08, 2007
Tony Cheah Tong Nyee says:
Hi Steven, I am not aware of the method available for this. Additionally, Confl...Hi Steven,
I am not aware of the method available for this. Additionally, Confluence does not support searching for content within a parent page. However, we are ware of such needs and have an open feature request being raised here:
If you are keen on the feature, feel free to cast your vote to increase its popularity and add yourself as a watcher for future updates.
Cheers,
Tony
Oct 30, 2007
Harikrishnan says:
Currently the search method returns type,id,title.url and excerpt as a result.&n...Currently the search method returns type,id,title.url and excerpt as a result. I want the date modified also be part of the result.. How to change the current implementation of confluence ? Is this a big change or a small one? pls assist me on this..
-Hari
Oct 30, 2007
Mei Yan Chan says:
Hi Harikrishnan, Unfortunately, Confluence doesn't return the date modified val...Hi Harikrishnan,
Unfortunately, Confluence doesn't return the date modified value. However, I would advice you to raise a feature request at the issue tracker http://jira.atlassian.com.
Regards,
Mei
Oct 31, 2007
Harikrishnan says:
Thx for your reply.. Actually we bought the licensed version of confluenc...Thx for your reply..
Actually we bought the licensed version of confluence for our corporate use. So we have complete source code. Is there any chance implement this functionality on our own?
-Hari
Oct 31, 2007
Mei Yan Chan says:
Hi Harikrishnan, Yes it is possible to write your own functionality. You might ...Hi Harikrishnan,
Yes it is possible to write your own functionality. You might need to write your own plugin, please refer to the following link regarding RPC plugins:
The full source to the Confluence remote API plugin can be found in the Confluence distribution under plugins/confluencerpc.
Alternatively,I would advice you to direct your questions to our forum and mailing list as there might be other user/developers who have already implemented it and should be able to share their ideas with you.
Regards,
Mei
Nov 16, 2007
prabhahar says:
Hi Bob, This client jar file seems to be old. I am using confluence 2.5.3. Pleas...Hi Bob, This client jar file seems to be old. I am using confluence 2.5.3. Please provide me the steps to generate soap stb jar file. I have gone thru readme.txt in the jar file. It says I need to use maven to generate jar file. Unfortunately I am getting error while running maven. I have attached error message below. Please help me to generate jar file. I hope once I get the jar file it is pretty strightforward to use API.
C:\confluence-testing\trunk> maven plugin:download -Dmaven.repo.remote=http://www.ibiblio.org/maven/
-DartifactId=maven-axis-plugin -DgroupId=atlassian -Dversion=0.7AXIS1.3
__ __
| \/ |_ _Apache_ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|| |_,|_/__|||_| v. 1.1
DEPRECATED: the default goal should be specified in the <build> section of project.xml instead of ma
ven.xml
Trying to get missing dependencies (and updated snapshots) required by Confluence SOAP client for Co
nfluence 2.2.9:
- Attempting to download axis:axis:1.3:jar from http://www.ibiblio.org/maven/
Error retrieving artifact from [http://www.ibiblio.org/maven/]: org.apache.maven.wagon.TransferFaile
dException: www.ibiblio.org
- Attempting to download axis:axis-jaxrpc:1.3:jar from http://www.ibiblio.org/maven/
Error retrieving artifact from [http://www.ibiblio.org/maven/]: org.apache.maven.wagon.TransferFaile
dException: www.ibiblio.org
- Attempting to download axis:axis-saaj:1.3:jar from http://www.ibiblio.org/maven/
Error retrieving artifact from [http://www.ibiblio.org/maven/]: org.apache.maven.wagon.TransferFaile
dException: www.ibiblio.org
- Attempting to download axis:axis-wsdl4j:1.5.1:jar from http://www.ibiblio.org/maven/
Error retrieving artifact from [http://www.ibiblio.org/maven/]: org.apache.maven.wagon.TransferFaile
dException: www.ibiblio.org
- Attempting to download axis:axis-ant:1.3:jar from http://www.ibiblio.org/maven/
Error retrieving artifact from [http://www.ibiblio.org/maven/]: org.apache.maven.wagon.TransferFaile
dException: www.ibiblio.org
- Attempting to download commons-logging:commons-logging:1.0.4:jar from http://www.ibiblio.org/maven
/
Error retrieving artifact from [http://www.ibiblio.org/maven/]: org.apache.maven.wagon.TransferFaile
dException: www.ibiblio.org
- Attempting to download commons-discovery:commons-discovery:0.2:jar from http://www.ibiblio.org/mav
en/
Error retrieving artifact from [http://www.ibiblio.org/maven/]: org.apache.maven.wagon.TransferFaile
dException: www.ibiblio.org
- Attempting to download activation:activation:1.0.2:jar from http://www.ibiblio.org/maven/
Error retrieving artifact from [http://www.ibiblio.org/maven/]: org.apache.maven.wagon.TransferFaile
dException: www.ibiblio.org
- Attempting to download javamail:javamail:1.3.2:jar from http://www.ibiblio.org/maven/
Error retrieving artifact from [http://www.ibiblio.org/maven/]: org.apache.maven.wagon.TransferFaile
dException: www.ibiblio.org
- Attempting to download JSAP:JSAP:2.0b:jar from http://www.ibiblio.org/maven/
Error retrieving artifact from [http://www.ibiblio.org/maven/]: org.apache.maven.wagon.TransferFaile
dException: www.ibiblio.org
-------------------------------------------------------------------------------
>> The build cannot continue because of the following unsatisfied dependencies:
- axis:axis:1.3:jar
- axis:axis-jaxrpc:1.3:jar
- axis:axis-saaj:1.3:jar
- axis:axis-wsdl4j:1.5.1:jar
- axis:axis-ant:1.3:jar
- commons-logging:commons-logging:1.0.4:jar
- commons-discovery:commons-discovery:0.2:jar
- activation:activation:1.0.2:jar
- javamail:javamail:1.3.2:jar
- JSAP:JSAP:2.0b:jar
-------------------------------------------------------------------------------
BUILD FAILED
-------------------------------------------------------------------------------
Mar 18, 2008
Jeremy Largman says:
You can dowload all the dependencies from http://repository.atlassian.com, excep...You can dowload all the dependencies from http://repository.atlassian.com, except I had to do get jsap manually and put it in my .maven repository.
Nov 22, 2007
Ming Li says:
addLabelByName(String token, String labelName, long objectId) treats a space-...addLabelByName(String token, String labelName, long objectId) treats a space-separated string as multi-labels.
My question is how we can add a label whose name contains space, e.g., we want to add a label called 'user password' to a page by using remote API, how can I do it?
addLabelByName(String token, String labelName, long objectId) simply add two labels - 'user' and 'password' in this case now, but what I want is adding one label - 'user password'. Is it possible to obtain by using remote API?
Nov 22, 2007
Anonymous says:
As currently implemented, Confluence labels can not contain spaces.As currently implemented, Confluence labels can not contain spaces.
Dec 11, 2007
Anonymous says:
As far as 2.6.2 seems to be concerned, there seems to be a typo in the homepage ...As far as 2.6.2 seems to be concerned, there seems to be a typo in the homepage property of Space, which should really be homePage with a capital P.
Dec 12, 2007
Jinwoo Min says:
Hi, Confluence 2.7 SOAP API is broken. AXIS error Sorry, something seem...Hi,
Confluence 2.7 SOAP API is broken.
You can check this from http://confluence.atlassian.com/rpc/soap-axis/confluenceservice-v1?wsdl.
Dec 13, 2007
Ming Giet Chong says:
Hi Jinwoo, Thanks for reporting this issue. However, I have raised a bug reques...Hi Jinwoo,
Thanks for reporting this issue. However, I have raised a bug request at the following link:
Feel free to put the comment and add yourself as a watcher there so that you will be notified for future updates.
Regards,
MG
Dec 17, 2007
Joe Travaglini says:
I am doing some dev work using the APIs, namely for searching the wiki. I ...I am doing some dev work using the APIs, namely for searching the wiki. I am able to search for content successfully, but I am not able to do pagination through the API.
The API spec above seems to have a parameter to control the page size (i.e. number of results returned) for a query, but does *not* seem to have a page offset (i.e. to do a subsequent search to get results 11-20, if the page size is 10). It also doesn't seem to return the total number of results found.
Strangely, both of the above (total hits and page offset) are features supported in the native application search functionality.
Has anyone run into this issue? Any solution? Any other ideas?
Thanks
Dec 18, 2007
Mei Yan Chan says:
Hi Joe, I have created a feature improvement on your behalf and it's currently ...Hi Joe,
I have created a feature improvement on your behalf and it's currently being tracked at:
Feel free to edit the issue to truly reflect your needs and add yourself as a watcher for future updates. This feature does come in handy, but do note that it may be too taxing on the application as it will have to process the searches, thus, causing it to run out of memory. It's best that the method call be done during non-peak hours or when there aren't many processes being executed.
Regards,
Mei
Feb 12, 2008
Jeff Turner says:
It appears that the XML-RPC interface does not support creating pages. The SOAP ...It appears that the XML-RPC interface does not support creating pages. The SOAP interface does (by overloading storePage).
If this is the case, it should either be fixed, or XML-RPC's inferiority documented so people don't waste time on it.
Feb 14, 2008
Rob Whitney says:
I can easily create new pages in a space using the XML-RPC interface. I'd now l...I can easily create new pages in a space using the XML-RPC interface. I'd now like to create a page based on a template (global or otherwise). Is there a way?
Feb 14, 2008
Choy Li Tham says:
Hi Rob, I would suggest you to post your queries to our forum or mailing list. ...Hi Rob,
I would suggest you to post your queries to our forum or mailing list. From there, others developer/user who have experience should be able to share their ideas with you.
Regards,
Choy Li
Mar 21, 2008
Anton Prevosti says:
Hi, calling the method byte[] getAttachmentData(String token, String pageId, S...Hi,
calling the method
byte[] getAttachmentData(String token, String pageId, String fileName, String versionNumber)
with versionNumber = page.getId();
is causing the following Exception:
com.atlassian.confluence.rpc.RemoteException: No attachment on content with id 32787, name 'excelspreadsheet.xls' and version 60 exists
However, if I hard code the versionNumber and set it to 0 or 1, it works.
What am I doing wrong?
Mar 21, 2008
David Peterson [CustomWare] says:
I think you'll find that the version number here is for the attachment, not the ...I think you'll find that the version number here is for the attachment, not the page. So, if you provide '0' as the version number it will get the most recent attachment version, otherwise it will try to get the version you specify.
Mar 26, 2008
Anton Prevosti says:
Thanks! Still I find it strange that the methods byte[] getAttachmentData(...Thanks!
Still I find it strange that the methods
byte[] getAttachmentData(String token, String pageId, String fileName, String versionNumber)
Attachment getAttachment(String token, String pageId, String fileName, String versionNumber)
require to specify the versionNumber of the attachment since the API doesn't seem to have a method to get its available versions.
Mar 24, 2008
Jonathan Simonoff says:
Is there a way to add a change comment when you update a page? (This apparently...Is there a way to add a change comment when you update a page?
(This apparently is a different set of comments from the comments that are described on this page--those are page comments, and adding those works fine. The kind of comment I need to add is the one that appears on the History page, associated with a version.)
Apr 01, 2008
Ming Giet Chong says:
Hi Jonathan, This feature is not supported in Confluence currently. However, th...Hi Jonathan,
This feature is not supported in Confluence currently. However, there is an improvement request being raised at:
Please cast your vote and add yourself as a watcher for future updates. Thanks.
Regards,
MG
Jul 24, 2008
Mick Monaghan says:
I presume this also means that there is currently no way to read version comment...I presume this also means that there is currently no way to read version comments through the API? [as opposed write a version comment]
Jul 25, 2008
Ming Giet Chong says:
Hi Mick, Yes, this feature is not available in Confluence remote API currently....Hi Mick,
Yes, this feature is not available in Confluence remote API currently. Hence, I would suggest you to follow up the issue from the improvement request http://jira.atlassian.com/browse/CONF-4288. Thanks.
Regards,
MG
Mar 26, 2008
Tony.Liu says:
I have a question is that if I use the confuence remote api to do something on c...I have a question is that if I use the confuence remote api to do something on commercial software,It will be cognizanced as a tortious action? I have found the xwiki xml-rpc is based on confluence remote api, why xwiki has the admit to use the confluence remote api ? or it's means that the confluence remote api is a open rpc api for use?
Mar 30, 2008
Tony.Liu says:
I have a quesiton about remote api, I use the REST method to call the confluence...I have a quesiton about remote api, I use the REST method to call the confluence1.storePage api, the postData I defined is postData: "<?xml version=\"1.0\"?><methodCall><methodName>confluence1.storePage</methodName><params><param><value><string>rG8HNXJq6kJOI64LjP5RcRjIibi2OHwjAGEybPJzqOd4QLDwRZNAMs9ndQA458KqI50bQU7tCwyvA5Eif2AI54fYafMfrRBNPDCNC8RoknmBSTG4APhE7qTL6FIfcVQg</string></value></param><param><value><Page><id></id><space>csico</space><parentId></parentId><title>sports</title><url></url><version></version><content>the nba's real-time data is supported by csico</content><created></created><creator></creator><modified></modified><modifier></modifier><homePage></homePage><locks></locks><contentStatus></contentStatus><current></current></Page></value></param></params></methodCall>", The response is <?xml version="1.0" encoding="ISO-8859-1"?><methodResponse><fault><value><struct><member><name>faultCode
</name><value><i4>0</i4></value></member><member><name>faultString</name><value>Failed to parse XML-RPC
request: Unknown type: Page</value></member></struct></value></fault></methodResponse>, it's said unknown type:Page.
anybody can explain the reason of this case?