Class SpacePropertyResource


  • @PublicApi
    public class SpacePropertyResource
    extends Object

    A REST resource for manipulating space properties.

    Space properties are a key / value store of properties attached to a Space. The key is a string, and the value is a JSON object.

    Since:
    5.9
    • Method Detail

      • get

        public PageResponse<JsonSpaceProperty> get​(String spaceKey,
                                                   String expand,
                                                   int start,
                                                   int limit,
                                                   @Context
                                                   javax.ws.rs.core.UriInfo uriInfo)
                                            throws ServiceException

        Returns a paginated list of space properties.

        Example request URI:

        • http://example.com/confluence/rest/api/space/TST/property?expand=space,version
        Parameters:
        spaceKey - the space to find properties under. Required.
        expand - a comma separated list of properties to expand on the space properties. Default value: version.
        start - the start point of the collection to return
        limit - the limit of the number of items to return, this may be restricted by fixed system limits
        uriInfo - (injected) information about the request URI
        Returns:
        a JSON representation of the space properties, or a 404 NOT FOUND if there is no space with the given key or if the user is not permitted.
        Throws:
        ServiceException
      • get

        public JsonSpaceProperty get​(String spaceKey,
                                     String propertyKey,
                                     String expand)
                              throws ServiceException

        Returns a space property.

        Example request URI:

        • http://example.com/confluence/rest/api/space/TST/property/example-property-key?expand=space,version
        Parameters:
        spaceKey - the space to find the property under. Required.
        propertyKey - the key of the space property. Required.
        expand - a comma separated list of properties to expand on the space properties. Default value: version.
        Returns:
        a JSON representation of the space property, or a 404 NOT FOUND if there is no space with the given key, or no property with the given key, or if the user is not permitted.
        Throws:
        ServiceException
      • delete

        public javax.ws.rs.core.Response delete​(String spaceKey,
                                                String propertyKey)
                                         throws ServiceException

        Deletes a space property.

        Parameters:
        spaceKey - the key of the space
        propertyKey - the key of the property
        Throws:
        ServiceException