Interface SightResources


  • public interface SightResources
    • Method Detail

      • listSights

        PagedResult<Sight> listSights​(PaginationParameters paging,
                                      java.util.Date modifiedSince)
                               throws SmartsheetException

        Gets the list of all Sights where the User has access.

        It mirrors to the following Smartsheet REST API method: GET /sights

        Parameters:
        paging - the pagination parameters
        modifiedSince - include sights modified on or after this date
        Returns:
        IndexResult object containing an array of Sight objects limited to the following attributes: id, name, accessLevel, permalink, createdAt, modifiedAt.
        Throws:
        java.lang.IllegalArgumentException - if any argument is null or empty string
        InvalidRequestException - if there is any problem with the REST API request
        AuthorizationException - if there is any problem with the REST API authorization (access token)
        ResourceNotFoundException - if the resource cannot be found
        ServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)
        SmartsheetException - if there is any other error during the operation
      • getSight

        Sight getSight​(long sightId)
                throws SmartsheetException

        Get a specified Sight.

        It mirrors to the following Smartsheet REST API method: GET /sights/{sightId}

        Parameters:
        sightId - the Id of the Sight
        Returns:
        the Sight resource.
        Throws:
        java.lang.IllegalArgumentException - if any argument is null or empty string
        InvalidRequestException - if there is any problem with the REST API request
        AuthorizationException - if there is any problem with the REST API authorization (access token)
        ResourceNotFoundException - if the resource cannot be found
        ServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)
        SmartsheetException - if there is any other error during the operation
      • getSight

        Sight getSight​(long sightId,
                       java.lang.Integer level)
                throws SmartsheetException

        Get a specified Sight.

        It mirrors to the following Smartsheet REST API method: GET /sights/{sightId}

        Parameters:
        sightId - the Id of the Sight
        level - compatibility level
        Returns:
        the Sight resource.
        Throws:
        java.lang.IllegalArgumentException - if any argument is null or empty string
        InvalidRequestException - if there is any problem with the REST API request
        AuthorizationException - if there is any problem with the REST API authorization (access token)
        ResourceNotFoundException - if the resource cannot be found
        ServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)
        SmartsheetException - if there is any other error during the operation
      • getSight

        Sight getSight​(long sightId,
                       java.util.EnumSet<SightInclusion> includes,
                       java.lang.Integer level)
                throws SmartsheetException

        Get a specified Sight.

        It mirrors to the following Smartsheet REST API method: GET /sights/{sightId}

        Parameters:
        sightId - the Id of the Sight
        level - compatibility level
        Returns:
        the Sight resource.
        Throws:
        java.lang.IllegalArgumentException - if any argument is null or empty string
        InvalidRequestException - if there is any problem with the REST API request
        AuthorizationException - if there is any problem with the REST API authorization (access token)
        ResourceNotFoundException - if the resource cannot be found
        ServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)
        SmartsheetException - if there is any other error during the operation
      • updateSight

        Sight updateSight​(Sight sight)
                   throws SmartsheetException

        Get a specified Sight.

        It mirrors to the following Smartsheet REST API method: PUT /sights/{sightId}

        Parameters:
        sight - - the Sight to update
        Returns:
        the updated Sight resource.
        Throws:
        java.lang.IllegalArgumentException - if any argument is null or empty string
        InvalidRequestException - if there is any problem with the REST API request
        AuthorizationException - if there is any problem with the REST API authorization (access token)
        ResourceNotFoundException - if the resource cannot be found
        ServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)
        SmartsheetException - if there is any other error during the operation
      • deleteSight

        void deleteSight​(long sightId)
                  throws SmartsheetException

        Delete a specified Sight.

        It mirrors to the following Smartsheet REST API method: DELETE /sights/{sightId}

        Parameters:
        sightId - the Id of the Sight
        Throws:
        java.lang.IllegalArgumentException - if any argument is null or empty string
        InvalidRequestException - if there is any problem with the REST API request
        AuthorizationException - if there is any problem with the REST API authorization (access token)
        ResourceNotFoundException - if the resource cannot be found
        ServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)
        SmartsheetException - if there is any other error during the operation
      • copySight

        Sight copySight​(long sightId,
                        ContainerDestination destination)
                 throws SmartsheetException

        Creates s copy of the specified Sight.

        It mirrors to the following Smartsheet REST API method: POST /sights/{sightId}/copy

        Parameters:
        sightId - the Id of the Sight
        destination - the destination to copy to
        Returns:
        the newly created Sight resource.
        Throws:
        java.lang.IllegalArgumentException - if any argument is null or empty string
        InvalidRequestException - if there is any problem with the REST API request
        AuthorizationException - if there is any problem with the REST API authorization (access token)
        ResourceNotFoundException - if the resource cannot be found
        ServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)
        SmartsheetException - if there is any other error during the operation
      • moveSight

        Sight moveSight​(long sightId,
                        ContainerDestination destination)
                 throws SmartsheetException

        Creates s copy of the specified Sight.

        It mirrors to the following Smartsheet REST API method: POST /sights/{sightId}/move

        Parameters:
        sightId - the Id of the Sight
        destination - the destination to copy to
        Returns:
        the newly created Sight resource.
        Throws:
        java.lang.IllegalArgumentException - if any argument is null or empty string
        InvalidRequestException - if there is any problem with the REST API request
        AuthorizationException - if there is any problem with the REST API authorization (access token)
        ResourceNotFoundException - if the resource cannot be found
        ServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)
        SmartsheetException - if there is any other error during the operation
      • getPublishStatus

        SightPublish getPublishStatus​(long sightId)
                               throws SmartsheetException

        Get the publish status of a Sight.

        It mirrors to the following Smartsheet REST API method: POST /sights/{sightId}/publish

        Parameters:
        sightId - the Id of the Sight
        Returns:
        the Sight's publish status.
        Throws:
        java.lang.IllegalArgumentException - if any argument is null or empty string
        InvalidRequestException - if there is any problem with the REST API request
        AuthorizationException - if there is any problem with the REST API authorization (access token)
        ResourceNotFoundException - if the resource cannot be found
        ServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)
        SmartsheetException - if there is any other error during the operation
      • setPublishStatus

        SightPublish setPublishStatus​(long sightId,
                                      SightPublish sightPublish)
                               throws SmartsheetException

        Sets the publish status of a Sight and returns the new status, including the URLs of any enabled publishing.

        It mirrors to the following Smartsheet REST API method: PUT /sights/{sightId}/publish

        Parameters:
        sightId - the Id of the Sight
        sightPublish - the SightPublish object containing publish status
        Returns:
        the Sight's publish status.
        Throws:
        java.lang.IllegalArgumentException - if any argument is null or empty string
        InvalidRequestException - if there is any problem with the REST API request
        AuthorizationException - if there is any problem with the REST API authorization (access token)
        ResourceNotFoundException - if the resource cannot be found
        ServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)
        SmartsheetException - if there is any other error during the operation
      • shareResources

        ShareResources shareResources()

        Return the ShareResources object that provides access to share resources associated with Sight resources.

        Returns:
        the associated share resources