java.lang.Object
com.atlassian.confluence.plugins.restapi.resources.SpaceResource

@Consumes("application/json") @Produces("application/json") @Path("/space") public class SpaceResource extends Object
REST wrapper for the SpaceService.
  • Constructor Details

  • Method Details

    • createSpace

      @PublicApi @POST @Consumes("application/json") public Space createSpace(Space newSpace) throws ServiceException
      Throws:
      ServiceException
    • createPrivateSpace

      @PublicApi @POST @Path("_private") @Consumes("application/json") public Space createPrivateSpace(Space newSpace) throws ServiceException
      Throws:
      ServiceException
    • createPersonalSpace

      @PublicApi @POST @Path("personal") @Consumes("application/json") public Space createPersonalSpace(PersonalSpaceDetailsForCreation newSpaceDetail) throws ServiceException
      Throws:
      ServiceException
    • update

      @PublicApi @PUT @Path("/{spaceKey}") @Consumes("application/json") public Space update(@PathParam("spaceKey") String spaceKey, Space space) throws ServiceException
      Throws:
      ServiceException
    • delete

      @PublicApi @DELETE @Path("/{spaceKey}") @Consumes("application/json") public javax.ws.rs.core.Response delete(@PathParam("spaceKey") String spaceKey) throws ServiceException, URISyntaxException
      Throws:
      ServiceException
      URISyntaxException
    • space

      @PublicApi @GET @Path("{spaceKey}") public Space space(@PathParam("spaceKey") String spaceKey, @QueryParam("expand") @DefaultValue("") String expand)
    • spaces

      @PublicApi @GET public PageResponse<Space> spaces(@QueryParam("spaceKeySingle") String spaceKey, @QueryParam("spaceKey") List<String> spaceKeys, @QueryParam("spaceId") List<String> spaceIds, @QueryParam("type") String type, @QueryParam("status") String status, @QueryParam("label") List<String> labelNames, @QueryParam("contentLabel") List<String> contentLabelNames, @QueryParam("favourite") Boolean favourite, @QueryParam("hasRetentionPolicy") Boolean hasRetentionPolicy, @QueryParam("expand") @DefaultValue("") String expand, @QueryParam("start") int offset, String afterOffset, @QueryParam("limit") @DefaultValue("25") int limit, @Context javax.ws.rs.core.UriInfo uriInfo) throws ServiceException
      Throws:
      ServiceException
    • contents

      @PublicApi @GET @Path("{spaceKey}/content") public Map<ContentType,RestList<Content>> contents(@PathParam("spaceKey") String spaceKey, @QueryParam("depth") @DefaultValue("all") String depth, @QueryParam("expand") @DefaultValue("") String expand, @QueryParam("start") int start, @QueryParam("limit") @DefaultValue("25") int limit) throws ServiceException
      Throws:
      ServiceException
    • contentsWithType

      @PublicApi @GET @Path("{spaceKey}/content/{type}") public RestList<Content> contentsWithType(@PathParam("spaceKey") String spaceKey, @PathParam("type") String type, @QueryParam("depth") @DefaultValue("all") String depth, @QueryParam("expand") @DefaultValue("") String expand, @QueryParam("start") int start, @QueryParam("limit") @DefaultValue("25") int limit, @Context javax.ws.rs.core.UriInfo uriInfo) throws ServiceException
      Throws:
      ServiceException
    • archive

      @PUT @Path("/{spaceKey}/archive") @Consumes("application/json") public javax.ws.rs.core.Response archive(@PathParam("spaceKey") String spaceKey)
    • restore

      @PUT @Path("/{spaceKey}/restore") @Consumes("application/json") public javax.ws.rs.core.Response restore(@PathParam("spaceKey") String spaceKey)
    • trash

      @PublicApi @DELETE @Path("/{spaceKey}/trash") @Consumes("application/json") public javax.ws.rs.core.Response trash(@PathParam("spaceKey") String spaceKey) throws ServiceException
      Throws:
      ServiceException
    • contentsWithType

      @PublicApi @GET @Path("{spaceKey}/trash") public RestList<Content> contentsWithType(@PathParam("spaceKey") String spaceKey, @QueryParam("expand") @DefaultValue("ancestors,container,space,metadata") String expand, @QueryParam("limit") @DefaultValue("25") int limit, @QueryParam("cursor") String cursor, @Context javax.ws.rs.core.UriInfo uriInfo) throws ServiceException
      Throws:
      ServiceException