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) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponsecontentsWithType(String spaceKey, String type, String depth, String expand, int start, int limit, javax.ws.rs.core.UriInfo uriInfo) createPrivateSpace(Space newSpace) createSpace(Space newSpace) javax.ws.rs.core.Responsejavax.ws.rs.core.Responsespaces(String spaceKey, List<String> spaceKeys, String type, String status, List<String> labelNames, Boolean favourite, Boolean hasRetentionPolicy, String expand, int offset, String afterOffset, int limit, javax.ws.rs.core.UriInfo uriInfo)
-
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
-
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("type") String type, @QueryParam("status") String status, @QueryParam("label") List<String> labelNames, @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)
-