public class

ContentResource

extends AbstractResource
java.lang.Object
   ↳ com.atlassian.confluence.plugins.rest.resources.AbstractResource
     ↳ com.atlassian.confluence.plugins.rest.resources.ContentResource

Class Overview

Rest resource for accessing Confluence content. Currently supports only read access for pages, blogs and comments.

Summary

[Expand]
Inherited Fields
From class com.atlassian.confluence.plugins.rest.resources.AbstractResource
Public Constructors
ContentResource(UserAccessor userAccessor, RestContentManager restContentManager, SpacePermissionManager spacePermissionManager)
Public Methods
Response get()
Returns HTTP 404 (not found) as there is no content to return if no ID is passed.
Response getAttachments(Long id, String startIndexString, String maxResultsString, Set<String> mime, Set<String> nice)
Returns the attachments for a given resource.
Response getContent(Long id)
Returns the content for the given ID.@return
[Expand]
Inherited Methods
From class com.atlassian.confluence.plugins.rest.resources.AbstractResource
From class java.lang.Object

Public Constructors

public ContentResource (UserAccessor userAccessor, RestContentManager restContentManager, SpacePermissionManager spacePermissionManager)

Public Methods

public Response get ()

Returns HTTP 404 (not found) as there is no content to return if no ID is passed. @return

public Response getAttachments (Long id, String startIndexString, String maxResultsString, Set<String> mime, Set<String> nice)

Returns the attachments for a given resource. The results are ordered by the creation date.

Parameters
id ID of resource (such as a page or blog post)
startIndexString Index of first item (inclusive) to return.
maxResultsString Maximum number of items to return. Default is 50.
Returns
  • attachmentEntityList

public Response getContent (Long id)

Returns the content for the given ID.@return