Confluence Cloud SOAP API migration guide

Confluence’s SOAP, JSON-RPC and XML-RPC APIs were deprecated with the release of Confluence 5.5 back in 2014. However, we never actually removed them from the product. While they continue to work today, Confluence Cloud will be officially removing these APIs as of March 29th, 2019.

Most current RPC methods have REST API equivalents. This document is a method-by-method migration guide that covers the methods that are currently still in use today.

Administration

SOAP Method Recommended REST resource
getServerInfo(String token) /wiki/rest/api/settings/systemInfo

Method: GET

Attachments

SOAP Method Recommended REST resource
addAttachment(String token, long contentId, Attachment attachment, byte[] attachmentData) /wiki/rest/api/content/{id}/child/attachment

Method: PUT
getAttachment(String token, String pageId, String fileName, String versionNumber) /wiki/rest/api/content/{id}/child/attachment

Method: GET
getAttachmentData(String token, String pageId, String fileName, String versionNumber) /wiki/rest/api/content/{id}

Method: GET

Provided by the “download” link in the “_links” attribute
removeAttachment(String token, String contentId, String fileName) /wiki/rest/api/content/{id}

Method: DELETE
getAttachments(String token, String pageId) /wiki/rest/api/content/{id}/child/attachment

Method: GET

Labels

SOAP Method Recommended REST resource
getLabelsById(String token, long objectId) /wiki/rest/api/content/{id}/label

Method: GET
addLabelByName(String token, String labelName, long objectId) /wiki/rest/api/content/{id}/label

Method: POST

Notifications and Watchers

SOAP Method Recommended REST resource
getWatchersForPage(String token, long pageId) /wiki/rest/api/content/{id}/notification/child-created

Method: GET
isWatchingPage(String token, long pageId, String username) /wiki/rest/api/user/watch/content/{id}

Method: GET

Pages and Content

SOAP Method Recommended REST resource
getPage(String token, String spaceKey, String pageTitle) /wiki/rest/api/content

Method: GET
getPages(String token, String spaceKey) /wiki/rest/api/content

Method: GET
getPage(String token, Long pageId) /wiki/rest/api/content

Method: GET
getPageHistory(String token, String pageId) /wiki/rest/api/content

Method: GET
movePage(String token, String sourcePageId, String targetPageId, String position) Currently no replacement at time of writing.
removePage(String token, String pageId) /wiki/rest/api/content/{id}

Method: DELETE
removePageVersionById(String token, String historicalPageId) /wiki/rest/api/content/{id}

Method: DELETE
removePageVersionByVersion(String token, String pageId, int version) /wiki/rest/api/content/{id}/version/{versionNumber}

Method: DELETE
storePage(String token, Page page) /wiki/rest/api/content/{id}

Method: PUT
setContentPermissions(String token, String contentId, String permissionType, Vector permissions) /wiki/rest/api/content/{id}/restriction

Method: PUT
getContentPermissionSet(String token, String contentId, String permissionType) /wiki/rest/api/content/{id}/restriction

Method: GET

Spaces

SOAP Method Recommended REST resource
getPermissions(String token, String spaceKey) /wiki/rest/api/space/{spaceKey}

Method: GET
getSpacePermissionSets(String token, String spaceKey) /wiki/rest/api/space/{spaceKey}

Method: GET
getSpacePermissionSet(String token, String spaceKey, String permissionType) /wiki/rest/api/space/{spaceKey}

Method: GET
getSpaceLevelPermissions(String token) /wiki/rest/api/space/{spaceKey}

Method: GET
addPermissionToSpace(String token, String permission, String remoteEntityName, String spaceKey) /wiki/rest/api/space/{spaceKey}

Method: PUT
addPermissionsToSpace(String token, Vector permissions, String remoteEntityName, String spaceKey) /wiki/rest/api/space/{spaceKey}

Method: PUT
removePermissionFromSpace(String token, String permission, String remoteEntityName, String spaceKey) /wiki/rest/api/space/{spaceKey}

Method: PUT
getTrashContents(String token, String spaceKey, int offset, int count) /wiki/rest/api/content

Method: GET

with relevant spaceKey parameter, and status=trashed
purgeFromTrash(String token, String spaceKey, long contentId) /wiki/rest/api/content/{id}

Method: DELETE
emptyTrash(String token, String spaceKey) Two calls:
1. /wiki/rest/api/content
  a. Method: GET
  b. Using relevant spacekey
2. /wiki/rest/api/content/{id}
  a. Method: DELETE
getSpaces(String token) /wiki/rest/api/space

Method: GET
getSpace(String token, String spaceKey) /wiki/rest/api/space/{spaceKey}

Method: GET
addSpace(String token, Space space) /wiki/rest/api/space/_private

Method: POST
storeSpace(String token, Space space) /wiki/rest/api/space/{spaceKey}

Method: PUT

Users

Confluence does not support user management via API. All SOAP methods that create/update/remove users currently do not function, and there is no intention to offer a replacement.

However, the following read operations do have replacements:

SOAP Method Recommended REST resource
getUser(String token, String username) /wiki/rest/api/user

Method: GET
getUserByName(String token, String username) /wiki/rest/api/user

Method: GET
getUserByKey(String token, String userKey) /wiki/rest/api/user

Method: GET
getUserGroups(String token, String username) /wiki/rest/api/user/memberof

Method: GET
getGroups(String token) /wiki/rest/api/group

Method: GET

Need a helping hand?

For development help and tips, head over to the Developer Community to ask questions, find answers, and connect with others that are also building on the Confluence API.