Class SpaceResource
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 Summary
ConstructorsConstructorDescriptionSpaceResource(SpaceService spaceService, RestNavigationService navigationService, ContentTrashService contentTrashService) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponsecontentsWithType(String spaceKey, String expand, int limit, String cursor, javax.ws.rs.core.UriInfo uriInfo) contentsWithType(String spaceKey, String type, String depth, String expand, int start, int limit, javax.ws.rs.core.UriInfo uriInfo) createPersonalSpace(PersonalSpaceDetailsForCreation newSpaceDetail) createPrivateSpace(Space newSpace) createSpace(Space newSpace) javax.ws.rs.core.Responsejavax.ws.rs.core.Responsespaces(String spaceKey, List<String> spaceKeys, List<String> spaceIds, String type, String status, List<String> labelNames, List<String> contentLabelNames, Boolean favourite, Boolean hasRetentionPolicy, String expand, int offset, String afterOffset, int limit, javax.ws.rs.core.UriInfo uriInfo) javax.ws.rs.core.Response
-
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:
ServiceExceptionURISyntaxException
-
space
-
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
-