Interface SheetResources


  • public interface SheetResources

    This interface provides methods to access Sheet resources.

    Thread Safety: Implementation of this interface must be thread safe.

    • Method Detail

      • listSheets

        PagedResult<Sheet> listSheets​(java.util.EnumSet<SourceInclusion> includes,
                                      PaginationParameters pagination,
                                      java.util.Date modifiedSince)
                               throws SmartsheetException

        List all sheets.

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

        Parameters:
        includes - the source inclusion
        pagination - the object containing the pagination parameters
        modifiedSince - restrict results to sheets modified on or after this date
        Returns:
        A list of all sheets (note that an empty list will be returned if there are none).
        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
      • listOrganizationSheets

        @Deprecated(since="2.0.0",
                    forRemoval=true)
        PagedResult<Sheet> listOrganizationSheets​(PaginationParameters parameters)
                                           throws SmartsheetException
        Deprecated, for removal: This API element is subject to removal in a future version.
        As of release 2.0. Please use UserResources instead

        List all sheets in the organization.

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

        Parameters:
        parameters - the object containing the pagination parameters
        Returns:
        the list of all sheets (note that an empty list will be returned if there are none)
        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
      • getSheet

        Sheet getSheet​(long id,
                       java.util.EnumSet<SheetInclusion> includes,
                       java.util.EnumSet<ObjectExclusion> excludes,
                       java.util.Set<java.lang.Long> rowIds,
                       java.util.Set<java.lang.Integer> rowNumbers,
                       java.util.Set<java.lang.Long> columnIds,
                       java.lang.Integer pageSize,
                       java.lang.Integer page)
                throws SmartsheetException

        Get a sheet.

        It mirrors to the following Smartsheet REST API method: GET /sheet/{id}

        Parameters:
        id - the id of the sheet
        includes - used to specify the optional objects to include.
        columnIds - the column ids
        excludes - the exclude parameters
        page - the page number
        pageSize - the page size
        rowIds - the row ids
        rowNumbers - the row numbers
        Returns:
        the sheet resource (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
        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
      • getSheet

        Sheet getSheet​(long id,
                       java.util.EnumSet<SheetInclusion> includes,
                       java.util.EnumSet<ObjectExclusion> excludes,
                       java.util.Set<java.lang.Long> rowIds,
                       java.util.Set<java.lang.Integer> rowNumbers,
                       java.util.Set<java.lang.Long> columnIds,
                       java.lang.Integer pageSize,
                       java.lang.Integer page,
                       java.lang.Integer ifVersionAfter)
                throws SmartsheetException

        Get a sheet.

        It mirrors to the following Smartsheet REST API method: GET /sheet/{id}

        Parameters:
        id - the id of the sheet
        includes - used to specify the optional objects to include.
        columnIds - the column ids
        excludes - the exclude parameters
        page - the page number
        pageSize - the page size
        rowIds - the row ids
        rowNumbers - the row numbers
        ifVersionAfter - only fetch Sheet if more recent version available
        Returns:
        the sheet resource (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
        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
      • getSheet

        Sheet getSheet​(long id,
                       java.util.EnumSet<SheetInclusion> includes,
                       java.util.EnumSet<ObjectExclusion> excludes,
                       java.util.Set<java.lang.Long> rowIds,
                       java.util.Set<java.lang.Integer> rowNumbers,
                       java.util.Set<java.lang.Long> columnIds,
                       java.lang.Integer pageSize,
                       java.lang.Integer page,
                       java.lang.Integer ifVersionAfter,
                       java.lang.Integer level)
                throws SmartsheetException

        Get a sheet.

        It mirrors to the following Smartsheet REST API method: GET /sheet/{id}

        Parameters:
        id - the id of the sheet
        includes - used to specify the optional objects to include.
        columnIds - the column ids
        excludes - the exclude parameters
        page - the page number
        pageSize - the page size
        rowIds - the row ids
        rowNumbers - the row numbers
        ifVersionAfter - only fetch Sheet if more recent version available
        level - compatibility level
        Returns:
        the sheet resource (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
        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
      • getSheet

        Sheet getSheet​(long sheetId)
                throws SmartsheetException

        Get sheet by ID. Load all row and column data

        Parameters:
        sheetId - id of the sheet to fetch
        Returns:
        the sheet resource (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
        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
      • getSheetAsExcel

        void getSheetAsExcel​(long id,
                             java.io.OutputStream outputStream)
                      throws SmartsheetException

        Get a sheet as an Excel file.

        It mirrors to the following Smartsheet REST API method: GET /sheet/{id} with "application/vnd.ms-excel" Accept HTTP header

        Parameters:
        id - the id of the sheet
        outputStream - the output stream to which the Excel file will be written.
        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
      • getSheetAsCSV

        void getSheetAsCSV​(long id,
                           java.io.OutputStream outputStream)
                    throws SmartsheetException

        Get a sheet as an Excel file.

        It mirrors to the following Smartsheet REST API method: GET /sheet/{id} with "application/vnd.ms-excel" Accept HTTP header

        Parameters:
        id - the id of the sheet
        outputStream - the output stream to which the Excel file will be written.
        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
      • getSheetAsPDF

        void getSheetAsPDF​(long id,
                           java.io.OutputStream outputStream,
                           PaperSize paperSize)
                    throws SmartsheetException

        Get a sheet as a PDF file.

        It mirrors to the following Smartsheet REST API method: GET /sheet/{id} with "application/pdf" Accept HTTP header

        Parameters:
        id - the id of the sheet
        outputStream - the output stream to which the PDF file will be written.
        paperSize - the paper size
        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
      • createSheet

        Sheet createSheet​(Sheet sheet)
                   throws SmartsheetException

        Create a sheet in default "Sheets" collection.

        It mirrors to the following Smartsheet REST API method: POST /sheets

        Parameters:
        sheet - the sheet to created
        Returns:
        the created sheet
        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
      • createSheetFromTemplate

        Sheet createSheetFromTemplate​(Sheet sheet,
                                      java.util.EnumSet<SheetTemplateInclusion> includes)
                               throws SmartsheetException

        Create a sheet (from existing sheet or template) in default "Sheets" collection.

        It mirrors to the following Smartsheet REST API method: POST /sheets

        Parameters:
        sheet - the sheet to create
        includes - used to specify the optional objects to include.
        Returns:
        the created sheet
        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
      • importCsv

        Sheet importCsv​(java.lang.String file,
                        java.lang.String sheetName,
                        java.lang.Integer headerRowIndex,
                        java.lang.Integer primaryColumnIndex)
                 throws SmartsheetException

        Imports a sheet.

        It mirrors to the following Smartsheet REST API method: POST /sheets/import

        Parameters:
        file - path to the CSV file
        sheetName - destination sheet name
        headerRowIndex - index (0 based) of row to be used for column names
        primaryColumnIndex - index (0 based) of primary column
        Returns:
        the created sheet
        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
      • importXlsx

        Sheet importXlsx​(java.lang.String file,
                         java.lang.String sheetName,
                         java.lang.Integer headerRowIndex,
                         java.lang.Integer primaryColumnIndex)
                  throws SmartsheetException

        Imports a sheet.

        It mirrors to the following Smartsheet REST API method: POST /sheets/import

        Parameters:
        file - path to the XLSX file
        sheetName - destination sheet name
        headerRowIndex - index (0 based) of row to be used for column names
        primaryColumnIndex - index (0 based) of primary column
        Returns:
        the created sheet
        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
      • createSheetInFolder

        Sheet createSheetInFolder​(long folderId,
                                  Sheet sheet)
                           throws SmartsheetException

        Create a sheet in given folder.

        It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets

        Parameters:
        folderId - the folder id
        sheet - the sheet to create
        Returns:
        the created sheet
        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
      • createSheetInFolderFromTemplate

        Sheet createSheetInFolderFromTemplate​(long folderID,
                                              Sheet sheet,
                                              java.util.EnumSet<SheetTemplateInclusion> includes)
                                       throws SmartsheetException

        Create a sheet (from existing sheet or template) in given folder.

        It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets

        Parameters:
        folderID - the folder id
        sheet - the sheet to create
        includes - used to specify the optional objects to include.
        Returns:
        the created sheet
        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
      • importCsvInFolder

        Sheet importCsvInFolder​(long folderID,
                                java.lang.String file,
                                java.lang.String sheetName,
                                java.lang.Integer headerRowIndex,
                                java.lang.Integer primaryColumnIndex)
                         throws SmartsheetException

        Imports a sheet in given folder.

        It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets/import

        Parameters:
        folderID - the folder id
        file - path to the CSV file
        sheetName - destination sheet name
        headerRowIndex - index (0 based) of row to be used for column names
        primaryColumnIndex - index (0 based) of primary column
        Returns:
        the created sheet
        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
      • importXlsxInFolder

        Sheet importXlsxInFolder​(long folderId,
                                 java.lang.String file,
                                 java.lang.String sheetName,
                                 java.lang.Integer headerRowIndex,
                                 java.lang.Integer primaryColumnIndex)
                          throws SmartsheetException

        Imports a sheet in given folder.

        It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets/import

        Parameters:
        folderId - the folder id
        file - path to the XLSX file
        sheetName - destination sheet name
        headerRowIndex - index (0 based) of row to be used for column names
        primaryColumnIndex - index (0 based) of primary column
        Returns:
        the created sheet
        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
      • createSheetInWorkspace

        Sheet createSheetInWorkspace​(long workspaceId,
                                     Sheet sheet)
                              throws SmartsheetException

        Create a sheet in given workspace.

        It mirrors to the following Smartsheet REST API method: POST /workspace/{workspaceId}/sheets

        Parameters:
        workspaceId - the workspace id
        sheet - the sheet to create
        Returns:
        the created sheet
        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
      • createSheetInWorkspaceFromTemplate

        Sheet createSheetInWorkspaceFromTemplate​(long workspaceId,
                                                 Sheet sheet,
                                                 java.util.EnumSet<SheetTemplateInclusion> includes)
                                          throws SmartsheetException

        Create a sheet (from existing sheet or template) in given workspace.

        It mirrors to the following Smartsheet REST API method: POST /workspaces/{workspaceId}/sheets

        Parameters:
        workspaceId - the workspace id
        sheet - the sheet to create
        includes - used to specify the optional objects to include
        Returns:
        the created sheet
        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
      • importCsvInWorkspace

        Sheet importCsvInWorkspace​(long workspaceId,
                                   java.lang.String file,
                                   java.lang.String sheetName,
                                   java.lang.Integer headerRowIndex,
                                   java.lang.Integer primaryColumnIndex)
                            throws SmartsheetException

        Imports a sheet in given workspace.

        It mirrors to the following Smartsheet REST API method: POST /workspaces/{workspaceId}/sheets/import

        Parameters:
        workspaceId - the workspace id
        file - path to the CSV file
        sheetName - destination sheet name
        headerRowIndex - index (0 based) of row to be used for column names
        primaryColumnIndex - index (0 based) of primary column
        Returns:
        the created sheet
        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
      • importXlsxInWorkspace

        Sheet importXlsxInWorkspace​(long workspaceId,
                                    java.lang.String file,
                                    java.lang.String sheetName,
                                    java.lang.Integer headerRowIndex,
                                    java.lang.Integer primaryColumnIndex)
                             throws SmartsheetException

        Imports a sheet in given workspace.

        It mirrors to the following Smartsheet REST API method: POST /workspaces/{workspaceId}/sheets/import

        Parameters:
        workspaceId - the workspace id
        file - path to the XLSX file
        sheetName - destination sheet name
        headerRowIndex - index (0 based) of row to be used for column names
        primaryColumnIndex - index (0 based) of primary column
        Returns:
        the created sheet
        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
      • deleteSheet

        void deleteSheet​(long id)
                  throws SmartsheetException

        Delete a sheet.

        It mirrors to the following Smartsheet REST API method: DELETE /sheet{id}

        Parameters: - id : the ID of the sheet

        Returns: None

        Parameters:
        id - the id
        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
      • getSheetVersion

        int getSheetVersion​(long id)
                     throws SmartsheetException

        Get a sheet version.

        It mirrors to the following Smartsheet REST API method: GET /sheet/{id}/version

        Parameters:
        id - the id
        Returns:
        the sheet version (note that if there is no such resource, this method will throw ResourceNotFoundException)
        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
      • sendSheet

        void sendSheet​(long id,
                       SheetEmail email)
                throws SmartsheetException

        Send a sheet as a PDF attachment via email to the designated recipients.

        It mirrors to the following Smartsheet REST API method: POST /sheet/{sheetId}/emails

        Parameters:
        id - the id
        email - the email
        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

        SheetPublish getPublishStatus​(long id)
                               throws SmartsheetException

        Get the status of the Publish settings of the sheet, including the URLs of any enabled publishings.

        It mirrors to the following Smartsheet REST API method: GET /sheet/{sheetId}/publish

        Parameters:
        id - the id
        Returns:
        the publish status (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null)
        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
      • updatePublishStatus

        SheetPublish updatePublishStatus​(long id,
                                         SheetPublish publish)
                                  throws SmartsheetException

        Sets the publish status of a sheet and returns the new status, including the URLs of any enabled publishings.

        It mirrors to the following Smartsheet REST API method: PUT /sheet/{sheetId}/publish

        Parameters:
        id - the id
        publish - the SheetPublish object limited.
        Returns:
        the update SheetPublish object (note that if there is no such resource, this method will throw a ResourceNotFoundException rather than returning null).
        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
      • copySheet

        Sheet copySheet​(long sheetId,
                        ContainerDestination containerDestination,
                        java.util.EnumSet<SheetCopyInclusion> includes)
                 throws SmartsheetException

        Creates a copy of the specified sheet.

        It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/copy

        Exceptions: IllegalArgumentException : if folder is null InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is any problem with the REST API authorization(access token) ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) SmartsheetRestException : if there is any other REST API related error occurred during the operation SmartsheetException : if there is any other error occurred during the operation

        Parameters:
        sheetId - the sheet id
        containerDestination - describes the destination container
        includes - optional parameters to include
        Returns:
        the sheet
        Throws:
        SmartsheetException - the smartsheet exception
      • copySheet

        Sheet copySheet​(long sheetId,
                        ContainerDestination containerDestination,
                        java.util.EnumSet<SheetCopyInclusion> includes,
                        java.util.EnumSet<CopyExclusion> excludes)
                 throws SmartsheetException

        Creates a copy of the specified sheet.

        It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/copy

        Exceptions: IllegalArgumentException : if folder is null InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is any problem with the REST API authorization(access token) ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) SmartsheetRestException : if there is any other REST API related error occurred during the operation SmartsheetException : if there is any other error occurred during the operation

        Parameters:
        sheetId - the sheet id
        containerDestination - describes the destination container
        includes - optional parameters to include
        excludes - optional parameters to exclude
        Returns:
        the sheet
        Throws:
        SmartsheetException - the smartsheet exception
      • moveSheet

        Sheet moveSheet​(long sheetId,
                        ContainerDestination containerDestination)
                 throws SmartsheetException

        Moves the specified Sheet to another location.

        It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/move

        Exceptions: IllegalArgumentException : if folder is null InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is any problem with the REST API authorization(access token) ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) SmartsheetRestException : if there is any other REST API related error occurred during the operation SmartsheetException : if there is any other error occurred during the operation

        Parameters:
        sheetId - the folder id
        containerDestination - describes the destination container
        Returns:
        the sheet
        Throws:
        SmartsheetException - the smartsheet exception
      • createUpdateRequest

        @Deprecated(since="2.0.0",
                    forRemoval=true)
        UpdateRequest createUpdateRequest​(long sheetId,
                                          MultiRowEmail email)
                                   throws SmartsheetException
        Deprecated, for removal: This API element is subject to removal in a future version.
        As of release 2.0. Please use SheetUpdateRequestResources instead.

        Creates an Update Request for the specified Row(s) within the Sheet.

        It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/updaterequests

        Exceptions: - IllegalArgumentException : if any argument is null - InvalidRequestException : if there is any problem with the REST API request - AuthorizationException : if there is any problem with the REST API authorization(access token) - ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - SmartsheetRestException : if there is any other REST API related error occurred during the operation - SmartsheetException : if there is any other error occurred during the operation

        Parameters:
        sheetId - the sheet id
        email - the email
        Returns:
        the update request object
        Throws:
        SmartsheetException - the smartsheet exception
      • sortSheet

        Sheet sortSheet​(long sheetId,
                        SortSpecifier sortSpecifier)
                 throws SmartsheetException

        Sort a sheet according to the sort criteria.

        It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/sort

        Parameters:
        sheetId - the sheet id
        sortSpecifier - the sort criteria
        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
      • sortSheet

        Sheet sortSheet​(long sheetId,
                        SortSpecifier sortSpecifier,
                        java.lang.Integer level)
                 throws SmartsheetException

        Sort a sheet according to the sort criteria.

        It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/sort

        Parameters:
        sheetId - the sheet id
        sortSpecifier - the sort criteria
        level - compatibility level
        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 Sheet resources.

        Returns:
        the share resources object
      • rowResources

        SheetRowResources rowResources()

        Return the SheetRowResources object that provides access to Row resources associated with Sheet resources.

        Returns:
        the sheet row resources
      • columnResources

        SheetColumnResources columnResources()

        Return the SheetColumnResources object that provides access to Column resources associated with Sheet resources.

        Returns:
        the sheet column resources
      • attachmentResources

        SheetAttachmentResources attachmentResources()

        Return the AttachmentResources object that provides access to attachment resources associated with Sheet resources.

        Returns:
        the associated attachment resources
      • discussionResources

        SheetDiscussionResources discussionResources()

        Return the SheetDiscussionResources object that provides access to discussion resources associated with Sheet resources.

        Returns:
        the associated discussion resources
      • commentResources

        SheetCommentResources commentResources()

        Return the SheetCommentResources object that provides access to discussion resources associated with Sheet resources.

        Returns:
        the associated comment resources
      • updateRequestResources

        SheetUpdateRequestResources updateRequestResources()

        Return the SheetUpdateRequestResources object that provides access to update request resources associated with Sheet resources.

        Returns:
        the associated update request resources
      • filterResources

        SheetFilterResources filterResources()

        Return the SheetFilterResources object that provides access to sheet filter resources associated with Sheet resources.

        Returns:
        the associated sheet filter resources
      • automationRuleResources

        SheetAutomationRuleResources automationRuleResources()

        Return the SheetAutomationRuleResources object that provides access to automation rule resources associated with Sheet resources.

        Returns:
        the associated automation rule resources
      • crossSheetReferenceResources

        SheetCrossSheetReferenceResources crossSheetReferenceResources()

        Return the CrossSheetReferenceResources object that provides access to cross sheet reference resources associated with Sheet resources.

        Returns:
        the associated cross sheet reference resources
      • summaryResources

        SheetSummaryResources summaryResources()
        Return the SheetSummaryResources object that provides access to the sheet summary resources associated with the Sheet resources.
        Returns:
        the sheet summary resources