public class SpaceResource extends Object
Constructor and Description |
---|
SpaceResource(SpaceService spaceService,
RestNavigationService navigationService) |
Modifier and Type | Method and Description |
---|---|
Map<ContentType,RestList<Content>> |
contents(String spaceKey,
String depth,
String expand,
int start,
int limit)
Returns the content in this given space
|
RestList<Content> |
contentsWithType(String spaceKey,
String type,
String depth,
String expand,
int start,
int limit,
javax.ws.rs.core.UriInfo uriInfo)
Returns the content in this given space with the given type
|
Space |
createPrivateSpace(Space newSpace)
Creates a new private Space, viewable only by its creator.
|
Space |
createSpace(Space newSpace)
Creates a new Space.
|
javax.ws.rs.core.Response |
delete(String spaceKey)
Deletes a Space.
|
Space |
space(String spaceKey,
String expand)
Returns information about a space.
|
PageResponse<Space> |
spaces(String spaceKey,
List<String> spaceKeys,
String type,
String status,
List<String> labelNames,
Boolean favourite,
String expand,
int offset,
String afterOffset,
int limit,
javax.ws.rs.core.UriInfo uriInfo)
Returns information about a number of spaces.
|
Space |
update(String spaceKey,
Space space)
Updates a Space.
|
public SpaceResource(SpaceService spaceService, RestNavigationService navigationService)
@PublicApi public Space createSpace(Space newSpace) throws ServiceException
The incoming Space does not include an id, but must include a Key and Name, and should include a Description.
newSpace
- the space to be createdServiceException
@PublicApi public Space createPrivateSpace(Space newSpace) throws ServiceException
The incoming Space does not include an id, but must include a Key and Name, and should include a Description.
newSpace
- the space to be createdServiceException
@PublicApi public Space update(String spaceKey, Space space) throws ServiceException
Updates a Space.
Currently only the Space name, description and homepage can be updated.
spaceKey
- the key of the space to updatespace
- the space being updatedServiceException
@PublicApi public javax.ws.rs.core.Response delete(String spaceKey) throws ServiceException, URISyntaxException
Deletes a Space.
The space is deleted in a long running task, so the space cannot be considered deleted when this resource returns. Clients can follow the status link in the response and poll it until the task completes.
spaceKey
- the key of the space to deleteServiceException
URISyntaxException
@PublicApi public Space space(String spaceKey, String expand)
Returns information about a space.
Example request URI(s):
http://example.com/confluence/rest/api/space/TST?expand=description
spaceKey
- a string containing the key of the spaceexpand
- a comma separated list of properties to expand on the spaceServiceException
@PublicApi public PageResponse<Space> spaces(String spaceKey, List<String> spaceKeys, String type, String status, List<String> labelNames, Boolean favourite, String expand, int offset, String afterOffset, int limit, @Context javax.ws.rs.core.UriInfo uriInfo) throws ServiceException
Returns information about a number of spaces.
Example request URI(s):
http://example.com/confluence/rest/api/space?spaceKey=TST&spaceKey=ds
spaceKeys
- a list of space keysstatus
- filter the list of spaces returned by status (current, archived)type
- filter the list of spaces returned by type (global, personal)labelNames
- filter the list of spaces returned by labelfavourite
- filter the list of spaces returned by favouritesfavouriteUserKey
- the key of the user whose favourites to filter by. Leave blank for the current userexpand
- a comma separated list of properties to expand on the spacesoffset
- the start point of the collection to returnlimit
- the limit of the number of spaces to return, this may be restricted by fixed system limitsuriInfo
- (injected) information about the request URIServiceException
@PublicApi public Map<ContentType,RestList<Content>> contents(String spaceKey, String depth, String expand, int start, int limit) throws ServiceException
Returns the content in this given space
Example request URI(s):
http://example.com/confluence/rest/api/space/TEST/content?expand=history
spaceKey
- a string containing the key of the spacedepth
- a string indicating if all content, or just the root content of the space is returned. Default value: all
. Valid values: all, root
.expand
- a comma separated list of properties to expand on each piece of content retrievedstart
- the start point of the collection to returnlimit
- the limit of the number of labels to return, this may be restricted by fixed system limitsServiceException
@PublicApi public RestList<Content> contentsWithType(String spaceKey, String type, String depth, String expand, int start, int limit, @Context javax.ws.rs.core.UriInfo uriInfo) throws ServiceException
Returns the content in this given space with the given type
Example request URI(s):
http://example.com/confluence/rest/api/space/TEST/content/page?expand=history
spaceKey
- a string containing the key of the spacetype
- the type of content to return with the space. Valid values: page, blogpost
.depth
- a string indicating if all content, or just the root content of the space is returned. Default value: all
. Valid values: all, root
.expand
- a comma separated list of properties to expand on each piece of content retrievedstart
- the start point of the collection to returnlimit
- the limit of the number of labels to return, this may be restricted by fixed system limitsuriInfo
- (injected) information about the request URIServiceException
Copyright © 2003–2018 Atlassian. All rights reserved.