Class DbxUserFilesRequests


  • public class DbxUserFilesRequests
    extends java.lang.Object
    Routes in namespace "files".
    • Constructor Detail

      • DbxUserFilesRequests

        public DbxUserFilesRequests​(DbxRawClientV2 client)
    • Method Detail

      • alphaGetMetadata

        @Deprecated
        public Metadata alphaGetMetadata​(java.lang.String path)
                                  throws AlphaGetMetadataErrorException,
                                         DbxException
        Deprecated.
        use getMetadata(String) instead.
        Returns the metadata for a file or folder. This is an alpha endpoint compatible with the properties API.

        Note: Metadata for the root folder is unsupported.

        The default values for the optional request parameters will be used. See AlphaGetMetadataBuilder for more details.

        Parameters:
        path - The path of a file or folder on Dropbox. Must match pattern "(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)" and not be null.
        Returns:
        Metadata for a file or folder.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        AlphaGetMetadataErrorException
        DbxException
      • alphaGetMetadataBuilder

        @Deprecated
        public AlphaGetMetadataBuilder alphaGetMetadataBuilder​(java.lang.String path)
        Deprecated.
        use getMetadata(String) instead.
        Returns the metadata for a file or folder. This is an alpha endpoint compatible with the properties API. Note: Metadata for the root folder is unsupported.
        Parameters:
        path - The path of a file or folder on Dropbox. Must match pattern "(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)" and not be null.
        Returns:
        Request builder for configuring request parameters and completing the request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • alphaUpload

        @Deprecated
        public AlphaUploadUploader alphaUpload​(java.lang.String path)
                                        throws DbxException
        Deprecated.
        use alphaUpload(String) instead.
        Create a new file with the contents provided in the request. Note that this endpoint is part of the properties API alpha and is slightly different from upload(String).

        Do not use this to upload a file larger than 150 MB. Instead, create an upload session with uploadSessionStart(boolean).

        The default values for the optional request parameters will be used. See AlphaUploadBuilder for more details.

        Parameters:
        path - Path in the user's Dropbox to save the file. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        Returns:
        Uploader used to upload the request body and finish request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DbxException
      • alphaUploadBuilder

        @Deprecated
        public AlphaUploadBuilder alphaUploadBuilder​(java.lang.String path)
        Deprecated.
        use alphaUpload(String) instead.
        Create a new file with the contents provided in the request. Note that this endpoint is part of the properties API alpha and is slightly different from upload(String). Do not use this to upload a file larger than 150 MB. Instead, create an upload session with uploadSessionStart(boolean).
        Parameters:
        path - Path in the user's Dropbox to save the file. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        Returns:
        Uploader builder for configuring request parameters and instantiating an uploader.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • copyV2

        public RelocationResult copyV2​(java.lang.String fromPath,
                                       java.lang.String toPath)
                                throws RelocationErrorException,
                                       DbxException
        Copy a file or folder to a different location in the user's Dropbox.

        If the source path is a folder all its contents will be copied.

        The default values for the optional request parameters will be used. See CopyV2Builder for more details.

        Parameters:
        fromPath - Path in the user's Dropbox to be copied or moved. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        toPath - Path in the user's Dropbox that is the destination. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        RelocationErrorException
        DbxException
      • copyV2Builder

        public CopyV2Builder copyV2Builder​(java.lang.String fromPath,
                                           java.lang.String toPath)
        Copy a file or folder to a different location in the user's Dropbox. If the source path is a folder all its contents will be copied.
        Parameters:
        fromPath - Path in the user's Dropbox to be copied or moved. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        toPath - Path in the user's Dropbox that is the destination. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        Returns:
        Request builder for configuring request parameters and completing the request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • copy

        @Deprecated
        public Metadata copy​(java.lang.String fromPath,
                             java.lang.String toPath)
                      throws RelocationErrorException,
                             DbxException
        Deprecated.
        Copy a file or folder to a different location in the user's Dropbox.

        If the source path is a folder all its contents will be copied.

        The default values for the optional request parameters will be used. See CopyBuilder for more details.

        Parameters:
        fromPath - Path in the user's Dropbox to be copied or moved. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        toPath - Path in the user's Dropbox that is the destination. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        Returns:
        Metadata for a file or folder.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        RelocationErrorException
        DbxException
      • copyBuilder

        @Deprecated
        public CopyBuilder copyBuilder​(java.lang.String fromPath,
                                       java.lang.String toPath)
        Deprecated.
        Copy a file or folder to a different location in the user's Dropbox. If the source path is a folder all its contents will be copied.
        Parameters:
        fromPath - Path in the user's Dropbox to be copied or moved. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        toPath - Path in the user's Dropbox that is the destination. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        Returns:
        Request builder for configuring request parameters and completing the request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • copyBatchV2

        public RelocationBatchV2Launch copyBatchV2​(java.util.List<RelocationPath> entries)
                                            throws DbxApiException,
                                                   DbxException
        Copy multiple files or folders to different locations at once in the user's Dropbox.

        This route will replace copyBatch:1. The main difference is this route will return status for each entry, while copyBatch:1 raises failure if any entry fails.

        This route will either finish synchronously, or return a job ID and do the async copy job in background. Please use copyBatchCheckV2(String) to check the job status.

        The autorename request parameter will default to false (see copyBatchV2(List,boolean)).

        Parameters:
        entries - List of entries to be moved or copied. Each entry is RelocationPath. Must contain at least 1 items, not contain a null item, and not be null.
        Returns:
        Result returned by copyBatchV2(List,boolean) or moveBatchV2(List) that may either launch an asynchronous job or complete synchronously.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DbxApiException
        DbxException
      • copyBatchV2

        public RelocationBatchV2Launch copyBatchV2​(java.util.List<RelocationPath> entries,
                                                   boolean autorename)
                                            throws DbxApiException,
                                                   DbxException
        Copy multiple files or folders to different locations at once in the user's Dropbox.

        This route will replace copyBatch:1. The main difference is this route will return status for each entry, while copyBatch:1 raises failure if any entry fails.

        This route will either finish synchronously, or return a job ID and do the async copy job in background. Please use copyBatchCheckV2(String) to check the job status.

        Parameters:
        entries - List of entries to be moved or copied. Each entry is RelocationPath. Must contain at least 1 items, not contain a null item, and not be null.
        autorename - If there's a conflict with any file, have the Dropbox server try to autorename that file to avoid the conflict.
        Returns:
        Result returned by copyBatchV2(List,boolean) or moveBatchV2(List) that may either launch an asynchronous job or complete synchronously.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DbxApiException
        DbxException
      • copyBatch

        @Deprecated
        public RelocationBatchLaunch copyBatch​(java.util.List<RelocationPath> entries)
                                        throws DbxApiException,
                                               DbxException
        Deprecated.
        Copy multiple files or folders to different locations at once in the user's Dropbox.

        If RelocationBatchArg.getAllowSharedFolder() is false, this route is atomic. If one entry fails, the whole transaction will abort. If RelocationBatchArg.getAllowSharedFolder() is true, atomicity is not guaranteed, but it allows you to copy the contents of shared folders to new locations.

        This route will return job ID immediately and do the async copy job in background. Please use copyBatchCheck:1 to check the job status.

        The default values for the optional request parameters will be used. See CopyBatchBuilder for more details.

        Parameters:
        entries - List of entries to be moved or copied. Each entry is RelocationPath. Must contain at least 1 items, not contain a null item, and not be null.
        Returns:
        Result returned by copyBatch(List) or moveBatch(List) that may either launch an asynchronous job or complete synchronously.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DbxApiException
        DbxException
      • copyBatchBuilder

        @Deprecated
        public CopyBatchBuilder copyBatchBuilder​(java.util.List<RelocationPath> entries)
        Deprecated.
        Copy multiple files or folders to different locations at once in the user's Dropbox. If RelocationBatchArg.getAllowSharedFolder() is false, this route is atomic. If one entry fails, the whole transaction will abort. If RelocationBatchArg.getAllowSharedFolder() is true, atomicity is not guaranteed, but it allows you to copy the contents of shared folders to new locations. This route will return job ID immediately and do the async copy job in background. Please use copyBatchCheck:1 to check the job status.
        Parameters:
        entries - List of entries to be moved or copied. Each entry is RelocationPath. Must contain at least 1 items, not contain a null item, and not be null.
        Returns:
        Request builder for configuring request parameters and completing the request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • copyBatchCheck

        @Deprecated
        public RelocationBatchJobStatus copyBatchCheck​(java.lang.String asyncJobId)
                                                throws PollErrorException,
                                                       DbxException
        Deprecated.
        Returns the status of an asynchronous job for copyBatch:1. If success, it returns list of results for each entry.
        Parameters:
        asyncJobId - Id of the asynchronous job. This is the value of a response returned from the method that launched the job. Must have length of at least 1 and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        PollErrorException
        DbxException
      • createFolderV2

        public CreateFolderResult createFolderV2​(java.lang.String path,
                                                 boolean autorename)
                                          throws CreateFolderErrorException,
                                                 DbxException
        Create a folder at a given path.
        Parameters:
        path - Path in the user's Dropbox to create. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)" and not be null.
        autorename - If there's a conflict, have the Dropbox server try to autorename the folder to avoid the conflict.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        CreateFolderErrorException
        DbxException
      • createFolder

        @Deprecated
        public FolderMetadata createFolder​(java.lang.String path,
                                           boolean autorename)
                                    throws CreateFolderErrorException,
                                           DbxException
        Deprecated.
        Create a folder at a given path.
        Parameters:
        path - Path in the user's Dropbox to create. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)" and not be null.
        autorename - If there's a conflict, have the Dropbox server try to autorename the folder to avoid the conflict.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        CreateFolderErrorException
        DbxException
      • createFolderBatch

        public CreateFolderBatchLaunch createFolderBatch​(java.util.List<java.lang.String> paths)
                                                  throws DbxApiException,
                                                         DbxException
        Create multiple folders at once.

        This route is asynchronous for large batches, which returns a job ID immediately and runs the create folder batch asynchronously. Otherwise, creates the folders and returns the result synchronously for smaller inputs. You can force asynchronous behaviour by using the CreateFolderBatchArg.getForceAsync() flag. Use createFolderBatchCheck(String) to check the job status.

        The default values for the optional request parameters will be used. See CreateFolderBatchBuilder for more details.

        Parameters:
        paths - List of paths to be created in the user's Dropbox. Duplicate path arguments in the batch are considered only once. Must not contain a null item and not be null.
        Returns:
        Result returned by createFolderBatch(List) that may either launch an asynchronous job or complete synchronously.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DbxApiException
        DbxException
      • createFolderBatchBuilder

        public CreateFolderBatchBuilder createFolderBatchBuilder​(java.util.List<java.lang.String> paths)
        Create multiple folders at once. This route is asynchronous for large batches, which returns a job ID immediately and runs the create folder batch asynchronously. Otherwise, creates the folders and returns the result synchronously for smaller inputs. You can force asynchronous behaviour by using the CreateFolderBatchArg.getForceAsync() flag. Use createFolderBatchCheck(String) to check the job status.
        Parameters:
        paths - List of paths to be created in the user's Dropbox. Duplicate path arguments in the batch are considered only once. Must not contain a null item and not be null.
        Returns:
        Request builder for configuring request parameters and completing the request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • createFolderBatchCheck

        public CreateFolderBatchJobStatus createFolderBatchCheck​(java.lang.String asyncJobId)
                                                          throws PollErrorException,
                                                                 DbxException
        Returns the status of an asynchronous job for createFolderBatch(List). If success, it returns list of result for each entry.
        Parameters:
        asyncJobId - Id of the asynchronous job. This is the value of a response returned from the method that launched the job. Must have length of at least 1 and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        PollErrorException
        DbxException
      • deleteV2

        public DeleteResult deleteV2​(java.lang.String path)
                              throws DeleteErrorException,
                                     DbxException
        Delete the file or folder at a given path.

        If the path is a folder, all its contents will be deleted too.

        A successful response indicates that the file or folder was deleted. The returned metadata will be the corresponding FileMetadata or FolderMetadata for the item at time of deletion, and not a DeletedMetadata object.

        Parameters:
        path - Path in the user's Dropbox to delete. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DeleteErrorException
        DbxException
      • deleteV2

        public DeleteResult deleteV2​(java.lang.String path,
                                     java.lang.String parentRev)
                              throws DeleteErrorException,
                                     DbxException
        Delete the file or folder at a given path.

        If the path is a folder, all its contents will be deleted too.

        A successful response indicates that the file or folder was deleted. The returned metadata will be the corresponding FileMetadata or FolderMetadata for the item at time of deletion, and not a DeletedMetadata object.

        Parameters:
        path - Path in the user's Dropbox to delete. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        parentRev - Perform delete if given "rev" matches the existing file's latest "rev". This field does not support deleting a folder. Must have length of at least 9 and match pattern "[0-9a-f]+".
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DeleteErrorException
        DbxException
      • delete

        @Deprecated
        public Metadata delete​(java.lang.String path)
                        throws DeleteErrorException,
                               DbxException
        Deprecated.
        Delete the file or folder at a given path.

        If the path is a folder, all its contents will be deleted too.

        A successful response indicates that the file or folder was deleted. The returned metadata will be the corresponding FileMetadata or FolderMetadata for the item at time of deletion, and not a DeletedMetadata object.

        Parameters:
        path - Path in the user's Dropbox to delete. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        Returns:
        Metadata for a file or folder.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DeleteErrorException
        DbxException
      • delete

        @Deprecated
        public Metadata delete​(java.lang.String path,
                               java.lang.String parentRev)
                        throws DeleteErrorException,
                               DbxException
        Deprecated.
        Delete the file or folder at a given path.

        If the path is a folder, all its contents will be deleted too.

        A successful response indicates that the file or folder was deleted. The returned metadata will be the corresponding FileMetadata or FolderMetadata for the item at time of deletion, and not a DeletedMetadata object.

        Parameters:
        path - Path in the user's Dropbox to delete. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        parentRev - Perform delete if given "rev" matches the existing file's latest "rev". This field does not support deleting a folder. Must have length of at least 9 and match pattern "[0-9a-f]+".
        Returns:
        Metadata for a file or folder.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DeleteErrorException
        DbxException
      • deleteBatch

        public DeleteBatchLaunch deleteBatch​(java.util.List<DeleteArg> entries)
                                      throws DbxApiException,
                                             DbxException
        Delete multiple files/folders at once.

        This route is asynchronous, which returns a job ID immediately and runs the delete batch asynchronously. Use deleteBatchCheck(String) to check the job status.

        Parameters:
        entries - Must not contain a null item and not be null.
        Returns:
        Result returned by deleteBatch(List) that may either launch an asynchronous job or complete synchronously.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DbxApiException
        DbxException
      • deleteBatchCheck

        public DeleteBatchJobStatus deleteBatchCheck​(java.lang.String asyncJobId)
                                              throws PollErrorException,
                                                     DbxException
        Returns the status of an asynchronous job for deleteBatch(List). If success, it returns list of result for each entry.
        Parameters:
        asyncJobId - Id of the asynchronous job. This is the value of a response returned from the method that launched the job. Must have length of at least 1 and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        PollErrorException
        DbxException
      • download

        public DbxDownloader<FileMetadata> download​(java.lang.String path)
                                             throws DownloadErrorException,
                                                    DbxException
        Download a file from a user's Dropbox.
        Parameters:
        path - The path of the file to download. Must match pattern " (/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)" and not be null.
        Returns:
        Downloader used to download the response body and view the server response.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DownloadErrorException
        DbxException
      • download

        public DbxDownloader<FileMetadata> download​(java.lang.String path,
                                                    java.lang.String rev)
                                             throws DownloadErrorException,
                                                    DbxException
        Download a file from a user's Dropbox.
        Parameters:
        path - The path of the file to download. Must match pattern " (/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)" and not be null.
        rev - Please specify revision in the path argument to download(String,String) instead. Must have length of at least 9 and match pattern "[0-9a-f]+".
        Returns:
        Downloader used to download the response body and view the server response.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DownloadErrorException
        DbxException
      • downloadBuilder

        public DownloadBuilder downloadBuilder​(java.lang.String path)
        Download a file from a user's Dropbox.
        Parameters:
        path - The path of the file to download. Must match pattern " (/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)" and not be null.
        Returns:
        Downloader builder for configuring the request parameters and instantiating a downloader.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • downloadZip

        public DbxDownloader<DownloadZipResult> downloadZip​(java.lang.String path)
                                                     throws DownloadZipErrorException,
                                                            DbxException
        Download a folder from the user's Dropbox, as a zip file. The folder must be less than 20 GB in size and have fewer than 10,000 total files. The input cannot be a single file. Any single file must be less than 4GB in size.
        Parameters:
        path - The path of the folder to download. Must match pattern "(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)" and not be null.
        Returns:
        Downloader used to download the response body and view the server response.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DownloadZipErrorException
        DbxException
      • downloadZipBuilder

        public DownloadZipBuilder downloadZipBuilder​(java.lang.String path)
        Download a folder from the user's Dropbox, as a zip file. The folder must be less than 20 GB in size and have fewer than 10,000 total files. The input cannot be a single file. Any single file must be less than 4GB in size.
        Parameters:
        path - The path of the folder to download. Must match pattern "(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)" and not be null.
        Returns:
        Downloader builder for configuring the request parameters and instantiating a downloader.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • exportBuilder

        public ExportBuilder exportBuilder​(java.lang.String path)
        Export a file from a user's Dropbox. This route only supports exporting files that cannot be downloaded directly and whose ExportResult.getFileMetadata() has ExportInfo.getExportAs() populated.
        Parameters:
        path - The path of the file to be exported. Must match pattern "(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)" and not be null.
        Returns:
        Downloader builder for configuring the request parameters and instantiating a downloader.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • getFileLockBatch

        public LockFileBatchResult getFileLockBatch​(java.util.List<LockFileArg> entries)
                                             throws LockFileErrorException,
                                                    DbxException
        Return the lock metadata for the given list of paths.
        Parameters:
        entries - List of 'entries'. Each 'entry' contains a path of the file which will be locked or queried. Duplicate path arguments in the batch are considered only once. Must not contain a null item and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        LockFileErrorException
        DbxException
      • getMetadata

        public Metadata getMetadata​(java.lang.String path)
                             throws GetMetadataErrorException,
                                    DbxException
        Returns the metadata for a file or folder.

        Note: Metadata for the root folder is unsupported.

        The default values for the optional request parameters will be used. See GetMetadataBuilder for more details.

        Parameters:
        path - The path of a file or folder on Dropbox. Must match pattern "(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)" and not be null.
        Returns:
        Metadata for a file or folder.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        GetMetadataErrorException
        DbxException
      • getMetadataBuilder

        public GetMetadataBuilder getMetadataBuilder​(java.lang.String path)
        Returns the metadata for a file or folder. Note: Metadata for the root folder is unsupported.
        Parameters:
        path - The path of a file or folder on Dropbox. Must match pattern "(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)" and not be null.
        Returns:
        Request builder for configuring request parameters and completing the request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • getPreview

        public DbxDownloader<FileMetadata> getPreview​(java.lang.String path)
                                               throws PreviewErrorException,
                                                      DbxException
        Get a preview for a file.

        Currently, PDF previews are generated for files with the following extensions: .ai, .doc, .docm, .docx, .eps, .gdoc, .gslides, .odp, .odt, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .rtf.

        HTML previews are generated for files with the following extensions: .csv, .ods, .xls, .xlsm, .gsheet, .xlsx.

        Other formats will return an unsupported extension error.

        Parameters:
        path - The path of the file to preview. Must match pattern " (/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)" and not be null.
        Returns:
        Downloader used to download the response body and view the server response.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        PreviewErrorException
        DbxException
      • getPreview

        public DbxDownloader<FileMetadata> getPreview​(java.lang.String path,
                                                      java.lang.String rev)
                                               throws PreviewErrorException,
                                                      DbxException
        Get a preview for a file.

        Currently, PDF previews are generated for files with the following extensions: .ai, .doc, .docm, .docx, .eps, .gdoc, .gslides, .odp, .odt, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .rtf.

        HTML previews are generated for files with the following extensions: .csv, .ods, .xls, .xlsm, .gsheet, .xlsx.

        Other formats will return an unsupported extension error.

        Parameters:
        path - The path of the file to preview. Must match pattern " (/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)" and not be null.
        rev - Please specify revision in the path argument to getPreview(String,String) instead. Must have length of at least 9 and match pattern "[0-9a-f]+".
        Returns:
        Downloader used to download the response body and view the server response.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        PreviewErrorException
        DbxException
      • getPreviewBuilder

        public GetPreviewBuilder getPreviewBuilder​(java.lang.String path)
        Get a preview for a file. Currently, PDF previews are generated for files with the following extensions: .ai, .doc, .docm, .docx, .eps, .gdoc, .gslides, .odp, .odt, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .rtf. HTML previews are generated for files with the following extensions: .csv, .ods, .xls, .xlsm, .gsheet, .xlsx. Other formats will return an unsupported extension error.
        Parameters:
        path - The path of the file to preview. Must match pattern " (/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)" and not be null.
        Returns:
        Downloader builder for configuring the request parameters and instantiating a downloader.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • getTemporaryLink

        public GetTemporaryLinkResult getTemporaryLink​(java.lang.String path)
                                                throws GetTemporaryLinkErrorException,
                                                       DbxException
        Get a temporary link to stream content of a file. This link will expire in four hours and afterwards you will get 410 Gone. This URL should not be used to display content directly in the browser. The Content-Type of the link is determined automatically by the file's mime type.
        Parameters:
        path - The path to the file you want a temporary link to. Must match pattern " (/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)" and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        GetTemporaryLinkErrorException
        DbxException
      • getTemporaryUploadLink

        public GetTemporaryUploadLinkResult getTemporaryUploadLink​(CommitInfo commitInfo)
                                                            throws DbxApiException,
                                                                   DbxException
        Get a one-time use temporary upload link to upload a file to a Dropbox location.

        This endpoint acts as a delayed upload(String). The returned temporary upload link may be used to make a POST request with the data to be uploaded. The upload will then be perfomed with the CommitInfo previously provided to getTemporaryUploadLink(CommitInfo,double) but evaluated only upon consumption. Hence, errors stemming from invalid CommitInfo with respect to the state of the user's Dropbox will only be communicated at consumption time. Additionally, these errors are surfaced as generic HTTP 409 Conflict responses, potentially hiding issue details. The maximum temporary upload link duration is 4 hours. Upon consumption or expiration, a new link will have to be generated. Multiple links may exist for a specific upload path at any given time.

        The POST request on the temporary upload link must have its Content-Type set to "application/octet-stream".

        Example temporary upload link consumption request:

        curl -X POST https://content.dropboxapi.com/apitul/1/bNi2uIYF51cVBND

        --header "Content-Type: application/octet-stream"

        --data-binary @local_file.txt

        A successful temporary upload link consumption request returns the content hash of the uploaded data in JSON format.

        Example succesful temporary upload link consumption response:

        {"content-hash": "599d71033d700ac892a0e48fa61b125d2f5994"}

        An unsuccessful temporary upload link consumption request returns any of the following status codes:

        HTTP 400 Bad Request: Content-Type is not one of application/octet-stream and text/plain or request is invalid.

        HTTP 409 Conflict: The temporary upload link does not exist or is currently unavailable, the upload failed, or another error happened.

        HTTP 410 Gone: The temporary upload link is expired or consumed.

        Example unsuccessful temporary upload link consumption response:

        Temporary upload link has been recently consumed.

        The duration request parameter will default to 14400.0 (see getTemporaryUploadLink(CommitInfo,double)).

        Parameters:
        commitInfo - Contains the path and other optional modifiers for the future upload commit. Equivalent to the parameters provided to upload(String). Must not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DbxApiException
        DbxException
      • getTemporaryUploadLink

        public GetTemporaryUploadLinkResult getTemporaryUploadLink​(CommitInfo commitInfo,
                                                                   double duration)
                                                            throws DbxApiException,
                                                                   DbxException
        Get a one-time use temporary upload link to upload a file to a Dropbox location.

        This endpoint acts as a delayed upload(String). The returned temporary upload link may be used to make a POST request with the data to be uploaded. The upload will then be perfomed with the CommitInfo previously provided to getTemporaryUploadLink(CommitInfo,double) but evaluated only upon consumption. Hence, errors stemming from invalid CommitInfo with respect to the state of the user's Dropbox will only be communicated at consumption time. Additionally, these errors are surfaced as generic HTTP 409 Conflict responses, potentially hiding issue details. The maximum temporary upload link duration is 4 hours. Upon consumption or expiration, a new link will have to be generated. Multiple links may exist for a specific upload path at any given time.

        The POST request on the temporary upload link must have its Content-Type set to "application/octet-stream".

        Example temporary upload link consumption request:

        curl -X POST https://content.dropboxapi.com/apitul/1/bNi2uIYF51cVBND

        --header "Content-Type: application/octet-stream"

        --data-binary @local_file.txt

        A successful temporary upload link consumption request returns the content hash of the uploaded data in JSON format.

        Example succesful temporary upload link consumption response:

        {"content-hash": "599d71033d700ac892a0e48fa61b125d2f5994"}

        An unsuccessful temporary upload link consumption request returns any of the following status codes:

        HTTP 400 Bad Request: Content-Type is not one of application/octet-stream and text/plain or request is invalid.

        HTTP 409 Conflict: The temporary upload link does not exist or is currently unavailable, the upload failed, or another error happened.

        HTTP 410 Gone: The temporary upload link is expired or consumed.

        Example unsuccessful temporary upload link consumption response:

        Temporary upload link has been recently consumed.

        Parameters:
        commitInfo - Contains the path and other optional modifiers for the future upload commit. Equivalent to the parameters provided to upload(String). Must not be null.
        duration - How long before this link expires, in seconds. Attempting to start an upload with this link longer than this period of time after link creation will result in an error. Must be greater than or equal to 60.0 and be less than or equal to 14400.0.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DbxApiException
        DbxException
      • getThumbnail

        public DbxDownloader<FileMetadata> getThumbnail​(java.lang.String path)
                                                 throws ThumbnailErrorException,
                                                        DbxException
        Get a thumbnail for an image.

        This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif and bmp. Photos that are larger than 20MB in size won't be converted to a thumbnail.

        The default values for the optional request parameters will be used. See GetThumbnailBuilder for more details.

        Parameters:
        path - The path to the image file you want to thumbnail. Must match pattern " (/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)" and not be null.
        Returns:
        Downloader used to download the response body and view the server response.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        ThumbnailErrorException
        DbxException
      • getThumbnailBuilder

        public GetThumbnailBuilder getThumbnailBuilder​(java.lang.String path)
        Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif and bmp. Photos that are larger than 20MB in size won't be converted to a thumbnail.
        Parameters:
        path - The path to the image file you want to thumbnail. Must match pattern " (/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)" and not be null.
        Returns:
        Downloader builder for configuring the request parameters and instantiating a downloader.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • getThumbnailV2

        public DbxDownloader<PreviewResult> getThumbnailV2​(PathOrLink resource)
                                                    throws ThumbnailV2ErrorException,
                                                           DbxException
        Get a thumbnail for a file.

        The default values for the optional request parameters will be used. See DbxUserGetThumbnailV2Builder for more details.

        Parameters:
        resource - Information specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path. Must not be null.
        Returns:
        Downloader used to download the response body and view the server response.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        ThumbnailV2ErrorException
        DbxException
      • getThumbnailV2Builder

        public DbxUserGetThumbnailV2Builder getThumbnailV2Builder​(PathOrLink resource)
        Get a thumbnail for a file.
        Parameters:
        resource - Information specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path. Must not be null.
        Returns:
        Downloader builder for configuring the request parameters and instantiating a downloader.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • getThumbnailBatch

        public GetThumbnailBatchResult getThumbnailBatch​(java.util.List<ThumbnailArg> entries)
                                                  throws GetThumbnailBatchErrorException,
                                                         DbxException
        Get thumbnails for a list of images. We allow up to 25 thumbnails in a single batch.

        This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif and bmp. Photos that are larger than 20MB in size won't be converted to a thumbnail.

        Parameters:
        entries - List of files to get thumbnails. Must not contain a null item and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        GetThumbnailBatchErrorException
        DbxException
      • listFolder

        public ListFolderResult listFolder​(java.lang.String path)
                                    throws ListFolderErrorException,
                                           DbxException
        Starts returning the contents of a folder. If the result's ListFolderResult.getHasMore() field is true, call listFolderContinue(String) with the returned ListFolderResult.getCursor() to retrieve more entries.

        If you're using ListFolderArg.getRecursive() set to true to keep a local cache of the contents of a Dropbox account, iterate through each entry in order and process them as follows to keep your local state in sync:

        For each FileMetadata, store the new entry at the given path in your local state. If the required parent folders don't exist yet, create them. If there's already something else at the given path, replace it and remove all its children.

        For each FolderMetadata, store the new entry at the given path in your local state. If the required parent folders don't exist yet, create them. If there's already something else at the given path, replace it but leave the children as they are. Check the new entry's FolderSharingInfo.getReadOnly() and set all its children's read-only statuses to match.

        For each DeletedMetadata, if your local state has something at the given path, remove it and all its children. If there's nothing at the given path, ignore this entry.

        Note: RateLimitError may be returned if multiple listFolder(String) or listFolderContinue(String) calls with same parameters are made simultaneously by same API app for same user. If your app implements retry logic, please hold off the retry until the previous request finishes.

        The default values for the optional request parameters will be used. See ListFolderBuilder for more details.

        Parameters:
        path - A unique identifier for the file. Must match pattern " (/(.|[\\r\\n])*)?|id:.*|(ns:[0-9]+(/.*)?)" and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        ListFolderErrorException
        DbxException
      • listFolderBuilder

        public ListFolderBuilder listFolderBuilder​(java.lang.String path)
        Starts returning the contents of a folder. If the result's ListFolderResult.getHasMore() field is true, call listFolderContinue(String) with the returned ListFolderResult.getCursor() to retrieve more entries. If you're using ListFolderArg.getRecursive() set to true to keep a local cache of the contents of a Dropbox account, iterate through each entry in order and process them as follows to keep your local state in sync: For each FileMetadata, store the new entry at the given path in your local state. If the required parent folders don't exist yet, create them. If there's already something else at the given path, replace it and remove all its children. For each FolderMetadata, store the new entry at the given path in your local state. If the required parent folders don't exist yet, create them. If there's already something else at the given path, replace it but leave the children as they are. Check the new entry's FolderSharingInfo.getReadOnly() and set all its children's read-only statuses to match. For each DeletedMetadata, if your local state has something at the given path, remove it and all its children. If there's nothing at the given path, ignore this entry. Note: RateLimitError may be returned if multiple listFolder(String) or listFolderContinue(String) calls with same parameters are made simultaneously by same API app for same user. If your app implements retry logic, please hold off the retry until the previous request finishes.
        Parameters:
        path - A unique identifier for the file. Must match pattern " (/(.|[\\r\\n])*)?|id:.*|(ns:[0-9]+(/.*)?)" and not be null.
        Returns:
        Request builder for configuring request parameters and completing the request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • listFolderGetLatestCursorBuilder

        public ListFolderGetLatestCursorBuilder listFolderGetLatestCursorBuilder​(java.lang.String path)
        A way to quickly get a cursor for the folder's state. Unlike listFolder(String), listFolderGetLatestCursor(String) doesn't return any entries. This endpoint is for app which only needs to know about new files and modifications and doesn't need to know about files that already exist in Dropbox.
        Parameters:
        path - A unique identifier for the file. Must match pattern " (/(.|[\\r\\n])*)?|id:.*|(ns:[0-9]+(/.*)?)" and not be null.
        Returns:
        Request builder for configuring request parameters and completing the request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • listFolderLongpoll

        public ListFolderLongpollResult listFolderLongpoll​(java.lang.String cursor,
                                                           long timeout)
                                                    throws ListFolderLongpollErrorException,
                                                           DbxException
        A longpoll endpoint to wait for changes on an account. In conjunction with listFolderContinue(String), this call gives you a low-latency way to monitor an account for file changes. The connection will block until there are changes available or a timeout occurs. This endpoint is useful mostly for client-side apps. If you're looking for server-side notifications, check out our webhooks documentation.
        Parameters:
        cursor - A cursor as returned by listFolder(String) or listFolderContinue(String). Cursors retrieved by setting ListFolderArg.getIncludeMediaInfo() to true are not supported. Must have length of at least 1 and not be null.
        timeout - A timeout in seconds. The request will block for at most this length of time, plus up to 90 seconds of random jitter added to avoid the thundering herd problem. Care should be taken when using this parameter, as some network infrastructure does not support long timeouts. Must be greater than or equal to 30 and be less than or equal to 480.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        ListFolderLongpollErrorException
        DbxException
      • listRevisions

        public ListRevisionsResult listRevisions​(java.lang.String path)
                                          throws ListRevisionsErrorException,
                                                 DbxException
        Returns revisions for files based on a file path or a file id. The file path or file id is identified from the latest file entry at the given file path or id. This end point allows your app to query either by file path or file id by setting the mode parameter appropriately.

        In the ListRevisionsMode.PATH (default) mode, all revisions at the same file path as the latest file entry are returned. If revisions with the same file id are desired, then mode must be set to ListRevisionsMode.ID. The ListRevisionsMode.ID mode is useful to retrieve revisions for a given file across moves or renames.

        The default values for the optional request parameters will be used. See ListRevisionsBuilder for more details.

        Parameters:
        path - The path to the file you want to see the revisions of. Must match pattern "/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/.*)?)" and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        ListRevisionsErrorException
        DbxException
      • listRevisionsBuilder

        public ListRevisionsBuilder listRevisionsBuilder​(java.lang.String path)
        Returns revisions for files based on a file path or a file id. The file path or file id is identified from the latest file entry at the given file path or id. This end point allows your app to query either by file path or file id by setting the mode parameter appropriately. In the ListRevisionsMode.PATH (default) mode, all revisions at the same file path as the latest file entry are returned. If revisions with the same file id are desired, then mode must be set to ListRevisionsMode.ID. The ListRevisionsMode.ID mode is useful to retrieve revisions for a given file across moves or renames.
        Parameters:
        path - The path to the file you want to see the revisions of. Must match pattern "/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/.*)?)" and not be null.
        Returns:
        Request builder for configuring request parameters and completing the request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • lockFileBatch

        public LockFileBatchResult lockFileBatch​(java.util.List<LockFileArg> entries)
                                          throws LockFileErrorException,
                                                 DbxException
        Lock the files at the given paths. A locked file will be writable only by the lock holder. A successful response indicates that the file has been locked. Returns a list of the locked file paths and their metadata after this operation.
        Parameters:
        entries - List of 'entries'. Each 'entry' contains a path of the file which will be locked or queried. Duplicate path arguments in the batch are considered only once. Must not contain a null item and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        LockFileErrorException
        DbxException
      • moveV2

        public RelocationResult moveV2​(java.lang.String fromPath,
                                       java.lang.String toPath)
                                throws RelocationErrorException,
                                       DbxException
        Move a file or folder to a different location in the user's Dropbox.

        If the source path is a folder all its contents will be moved.

        Note that we do not currently support case-only renaming.

        The default values for the optional request parameters will be used. See MoveV2Builder for more details.

        Parameters:
        fromPath - Path in the user's Dropbox to be copied or moved. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        toPath - Path in the user's Dropbox that is the destination. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        RelocationErrorException
        DbxException
      • moveV2Builder

        public MoveV2Builder moveV2Builder​(java.lang.String fromPath,
                                           java.lang.String toPath)
        Move a file or folder to a different location in the user's Dropbox. If the source path is a folder all its contents will be moved. Note that we do not currently support case-only renaming.
        Parameters:
        fromPath - Path in the user's Dropbox to be copied or moved. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        toPath - Path in the user's Dropbox that is the destination. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        Returns:
        Request builder for configuring request parameters and completing the request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • move

        @Deprecated
        public Metadata move​(java.lang.String fromPath,
                             java.lang.String toPath)
                      throws RelocationErrorException,
                             DbxException
        Deprecated.
        Move a file or folder to a different location in the user's Dropbox.

        If the source path is a folder all its contents will be moved.

        The default values for the optional request parameters will be used. See MoveBuilder for more details.

        Parameters:
        fromPath - Path in the user's Dropbox to be copied or moved. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        toPath - Path in the user's Dropbox that is the destination. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        Returns:
        Metadata for a file or folder.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        RelocationErrorException
        DbxException
      • moveBuilder

        @Deprecated
        public MoveBuilder moveBuilder​(java.lang.String fromPath,
                                       java.lang.String toPath)
        Deprecated.
        Move a file or folder to a different location in the user's Dropbox. If the source path is a folder all its contents will be moved.
        Parameters:
        fromPath - Path in the user's Dropbox to be copied or moved. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        toPath - Path in the user's Dropbox that is the destination. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        Returns:
        Request builder for configuring request parameters and completing the request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • moveBatchV2

        public RelocationBatchV2Launch moveBatchV2​(java.util.List<RelocationPath> entries)
                                            throws DbxApiException,
                                                   DbxException
        Move multiple files or folders to different locations at once in the user's Dropbox. Note that we do not currently support case-only renaming.

        This route will replace moveBatch:1. The main difference is this route will return status for each entry, while moveBatch:1 raises failure if any entry fails.

        This route will either finish synchronously, or return a job ID and do the async move job in background. Please use moveBatchCheckV2(String) to check the job status.

        The default values for the optional request parameters will be used. See MoveBatchV2Builder for more details.

        Parameters:
        entries - List of entries to be moved or copied. Each entry is RelocationPath. Must contain at least 1 items, not contain a null item, and not be null.
        Returns:
        Result returned by copyBatchV2(List,boolean) or moveBatchV2(List) that may either launch an asynchronous job or complete synchronously.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DbxApiException
        DbxException
      • moveBatchV2Builder

        public MoveBatchV2Builder moveBatchV2Builder​(java.util.List<RelocationPath> entries)
        Move multiple files or folders to different locations at once in the user's Dropbox. Note that we do not currently support case-only renaming. This route will replace moveBatch:1. The main difference is this route will return status for each entry, while moveBatch:1 raises failure if any entry fails. This route will either finish synchronously, or return a job ID and do the async move job in background. Please use moveBatchCheckV2(String) to check the job status.
        Parameters:
        entries - List of entries to be moved or copied. Each entry is RelocationPath. Must contain at least 1 items, not contain a null item, and not be null.
        Returns:
        Request builder for configuring request parameters and completing the request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • moveBatch

        @Deprecated
        public RelocationBatchLaunch moveBatch​(java.util.List<RelocationPath> entries)
                                        throws DbxApiException,
                                               DbxException
        Deprecated.
        use moveBatchV2(List) instead.
        Move multiple files or folders to different locations at once in the user's Dropbox.

        This route will return job ID immediately and do the async moving job in background. Please use moveBatchCheck:1 to check the job status.

        The default values for the optional request parameters will be used. See MoveBatchBuilder for more details.

        Parameters:
        entries - List of entries to be moved or copied. Each entry is RelocationPath. Must contain at least 1 items, not contain a null item, and not be null.
        Returns:
        Result returned by copyBatch(List) or moveBatch(List) that may either launch an asynchronous job or complete synchronously.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DbxApiException
        DbxException
      • moveBatchBuilder

        @Deprecated
        public MoveBatchBuilder moveBatchBuilder​(java.util.List<RelocationPath> entries)
        Deprecated.
        use moveBatchV2(List) instead.
        Move multiple files or folders to different locations at once in the user's Dropbox. This route will return job ID immediately and do the async moving job in background. Please use moveBatchCheck:1 to check the job status.
        Parameters:
        entries - List of entries to be moved or copied. Each entry is RelocationPath. Must contain at least 1 items, not contain a null item, and not be null.
        Returns:
        Request builder for configuring request parameters and completing the request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • moveBatchCheck

        @Deprecated
        public RelocationBatchJobStatus moveBatchCheck​(java.lang.String asyncJobId)
                                                throws PollErrorException,
                                                       DbxException
        Deprecated.
        Returns the status of an asynchronous job for moveBatch:1. If success, it returns list of results for each entry.
        Parameters:
        asyncJobId - Id of the asynchronous job. This is the value of a response returned from the method that launched the job. Must have length of at least 1 and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        PollErrorException
        DbxException
      • permanentlyDelete

        public void permanentlyDelete​(java.lang.String path)
                               throws DeleteErrorException,
                                      DbxException
        Permanently delete the file or folder at a given path (see https://www.dropbox.com/en/help/40).

        Note: This endpoint is only available for Dropbox Business apps.

        Parameters:
        path - Path in the user's Dropbox to delete. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DeleteErrorException
        DbxException
      • permanentlyDelete

        public void permanentlyDelete​(java.lang.String path,
                                      java.lang.String parentRev)
                               throws DeleteErrorException,
                                      DbxException
        Permanently delete the file or folder at a given path (see https://www.dropbox.com/en/help/40).

        Note: This endpoint is only available for Dropbox Business apps.

        Parameters:
        path - Path in the user's Dropbox to delete. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        parentRev - Perform delete if given "rev" matches the existing file's latest "rev". This field does not support deleting a folder. Must have length of at least 9 and match pattern "[0-9a-f]+".
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DeleteErrorException
        DbxException
      • propertiesAdd

        @Deprecated
        public void propertiesAdd​(java.lang.String path,
                                  java.util.List<PropertyGroup> propertyGroups)
                           throws AddPropertiesErrorException,
                                  DbxException
        Deprecated.
        Parameters:
        path - A unique identifier for the file or folder. Must match pattern "/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/.*)?)" and not be null.
        propertyGroups - The property groups which are to be added to a Dropbox file. No two groups in the input should refer to the same template. Must not contain a null item and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        AddPropertiesErrorException
        DbxException
      • propertiesOverwrite

        @Deprecated
        public void propertiesOverwrite​(java.lang.String path,
                                        java.util.List<PropertyGroup> propertyGroups)
                                 throws InvalidPropertyGroupErrorException,
                                        DbxException
        Deprecated.
        Parameters:
        path - A unique identifier for the file or folder. Must match pattern "/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/.*)?)" and not be null.
        propertyGroups - The property groups "snapshot" updates to force apply. No two groups in the input should refer to the same template. Must contain at least 1 items, not contain a null item, and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        InvalidPropertyGroupErrorException
        DbxException
      • propertiesUpdate

        @Deprecated
        public void propertiesUpdate​(java.lang.String path,
                                     java.util.List<PropertyGroupUpdate> updatePropertyGroups)
                              throws UpdatePropertiesErrorException,
                                     DbxException
        Deprecated.
        Parameters:
        path - A unique identifier for the file or folder. Must match pattern "/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/.*)?)" and not be null.
        updatePropertyGroups - The property groups "delta" updates to apply. Must not contain a null item and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        UpdatePropertiesErrorException
        DbxException
      • restore

        public FileMetadata restore​(java.lang.String path,
                                    java.lang.String rev)
                             throws RestoreErrorException,
                                    DbxException
        Restore a specific revision of a file to the given path.
        Parameters:
        path - The path to save the restored file. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)" and not be null.
        rev - The revision to restore. Must have length of at least 9, match pattern "[0-9a-f]+", and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        RestoreErrorException
        DbxException
      • saveUrl

        public SaveUrlResult saveUrl​(java.lang.String path,
                                     java.lang.String url)
                              throws SaveUrlErrorException,
                                     DbxException
        Save the data from a specified URL into a file in user's Dropbox.

        Note that the transfer from the URL must complete within 5 minutes, or the operation will time out and the job will fail.

        If the given path already exists, the file will be renamed to avoid the conflict (e.g. myfile (1).txt).

        Parameters:
        path - The path in Dropbox where the URL will be saved to. Must match pattern "/(.|[\\r\\n])*" and not be null.
        url - The URL to be saved. Must not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        SaveUrlErrorException
        DbxException
      • saveUrlCheckJobStatus

        public SaveUrlJobStatus saveUrlCheckJobStatus​(java.lang.String asyncJobId)
                                               throws PollErrorException,
                                                      DbxException
        Check the status of a saveUrl(String,String) job.
        Parameters:
        asyncJobId - Id of the asynchronous job. This is the value of a response returned from the method that launched the job. Must have length of at least 1 and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        PollErrorException
        DbxException
      • search

        @Deprecated
        public SearchResult search​(java.lang.String path,
                                   java.lang.String query)
                            throws SearchErrorException,
                                   DbxException
        Deprecated.
        use searchV2(String) instead.
        Searches for files and folders.

        Note: Recent changes will be reflected in search results within a few seconds and older revisions of existing files may still match your query for up to a few days.

        The default values for the optional request parameters will be used. See SearchBuilder for more details.

        Parameters:
        path - The path in the user's Dropbox to search. Should probably be a folder. Must match pattern " (/(.|[\\r\\n])*)?|id:.*|(ns:[0-9]+(/.*)?)" and not be null.
        query - The string to search for. Query string may be rewritten to improve relevance of results. The string is split on spaces into multiple tokens. For file name searching, the last token is used for prefix matching (i.e. "bat c" matches "bat cave" but not "batman car"). Must not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        SearchErrorException
        DbxException
      • searchBuilder

        @Deprecated
        public SearchBuilder searchBuilder​(java.lang.String path,
                                           java.lang.String query)
        Deprecated.
        use searchV2(String) instead.
        Searches for files and folders. Note: Recent changes will be reflected in search results within a few seconds and older revisions of existing files may still match your query for up to a few days.
        Parameters:
        path - The path in the user's Dropbox to search. Should probably be a folder. Must match pattern " (/(.|[\\r\\n])*)?|id:.*|(ns:[0-9]+(/.*)?)" and not be null.
        query - The string to search for. Query string may be rewritten to improve relevance of results. The string is split on spaces into multiple tokens. For file name searching, the last token is used for prefix matching (i.e. "bat c" matches "bat cave" but not "batman car"). Must not be null.
        Returns:
        Request builder for configuring request parameters and completing the request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • searchV2

        public SearchV2Result searchV2​(java.lang.String query)
                                throws SearchErrorException,
                                       DbxException
        Searches for files and folders.

        Note: searchV2(String) along with searchContinueV2(String) can only be used to retrieve a maximum of 10,000 matches.

        Recent changes may not immediately be reflected in search results due to a short delay in indexing. Duplicate results may be returned across pages. Some results may not be returned.

        The default values for the optional request parameters will be used. See SearchV2Builder for more details.

        Parameters:
        query - The string to search for. May match across multiple fields based on the request arguments. Query string may be rewritten to improve relevance of results. Must not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        SearchErrorException
        DbxException
      • searchV2Builder

        public SearchV2Builder searchV2Builder​(java.lang.String query)
        Searches for files and folders. Note: searchV2(String) along with searchContinueV2(String) can only be used to retrieve a maximum of 10,000 matches. Recent changes may not immediately be reflected in search results due to a short delay in indexing. Duplicate results may be returned across pages. Some results may not be returned.
        Parameters:
        query - The string to search for. May match across multiple fields based on the request arguments. Query string may be rewritten to improve relevance of results. Must not be null.
        Returns:
        Request builder for configuring request parameters and completing the request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • searchContinueV2

        public SearchV2Result searchContinueV2​(java.lang.String cursor)
                                        throws SearchErrorException,
                                               DbxException
        Fetches the next page of search results returned from searchV2(String).

        Note: searchV2(String) along with searchContinueV2(String) can only be used to retrieve a maximum of 10,000 matches.

        Recent changes may not immediately be reflected in search results due to a short delay in indexing. Duplicate results may be returned across pages. Some results may not be returned.

        Parameters:
        cursor - The cursor returned by your last call to searchV2(String). Used to fetch the next page of results. Must have length of at least 1 and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        SearchErrorException
        DbxException
      • unlockFileBatch

        public LockFileBatchResult unlockFileBatch​(java.util.List<UnlockFileArg> entries)
                                            throws LockFileErrorException,
                                                   DbxException
        Unlock the files at the given paths. A locked file can only be unlocked by the lock holder or, if a business account, a team admin. A successful response indicates that the file has been unlocked. Returns a list of the unlocked file paths and their metadata after this operation.
        Parameters:
        entries - List of 'entries'. Each 'entry' contains a path of the file which will be unlocked. Duplicate path arguments in the batch are considered only once. Must not contain a null item and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        LockFileErrorException
        DbxException
      • upload

        public UploadUploader upload​(java.lang.String path)
                              throws DbxException
        Create a new file with the contents provided in the request.

        Do not use this to upload a file larger than 150 MB. Instead, create an upload session with uploadSessionStart(boolean).

        Calls to this endpoint will count as data transport calls for any Dropbox Business teams with a limit on the number of data transport calls allowed per month. For more information, see the Data transport limit page.

        The default values for the optional request parameters will be used. See UploadBuilder for more details.

        Parameters:
        path - Path in the user's Dropbox to save the file. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        Returns:
        Uploader used to upload the request body and finish request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DbxException
      • uploadBuilder

        public UploadBuilder uploadBuilder​(java.lang.String path)
        Create a new file with the contents provided in the request. Do not use this to upload a file larger than 150 MB. Instead, create an upload session with uploadSessionStart(boolean). Calls to this endpoint will count as data transport calls for any Dropbox Business teams with a limit on the number of data transport calls allowed per month. For more information, see the Data transport limit page.
        Parameters:
        path - Path in the user's Dropbox to save the file. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)" and not be null.
        Returns:
        Uploader builder for configuring request parameters and instantiating an uploader.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • uploadSessionAppendV2

        public UploadSessionAppendV2Uploader uploadSessionAppendV2​(UploadSessionCursor cursor)
                                                            throws DbxException
        Append more data to an upload session.

        When the parameter close is set, this call will close the session.

        A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB.

        Calls to this endpoint will count as data transport calls for any Dropbox Business teams with a limit on the number of data transport calls allowed per month. For more information, see the Data transport limit page.

        The close request parameter will default to false (see uploadSessionAppendV2(UploadSessionCursor,boolean)).

        Parameters:
        cursor - Contains the upload session ID and the offset. Must not be null.
        Returns:
        Uploader used to upload the request body and finish request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DbxException
      • uploadSessionAppendV2

        public UploadSessionAppendV2Uploader uploadSessionAppendV2​(UploadSessionCursor cursor,
                                                                   boolean close)
                                                            throws DbxException
        Append more data to an upload session.

        When the parameter close is set, this call will close the session.

        A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB.

        Calls to this endpoint will count as data transport calls for any Dropbox Business teams with a limit on the number of data transport calls allowed per month. For more information, see the Data transport limit page.

        Parameters:
        cursor - Contains the upload session ID and the offset. Must not be null.
        close - If true, the current session will be closed, at which point you won't be able to call uploadSessionAppendV2(UploadSessionCursor,boolean) anymore with the current session.
        Returns:
        Uploader used to upload the request body and finish request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DbxException
      • uploadSessionAppend

        @Deprecated
        public UploadSessionAppendUploader uploadSessionAppend​(java.lang.String sessionId,
                                                               long offset)
                                                        throws DbxException
        Append more data to an upload session.

        A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB.

        Calls to this endpoint will count as data transport calls for any Dropbox Business teams with a limit on the number of data transport calls allowed per month. For more information, see the Data transport limit page.

        Parameters:
        sessionId - The upload session ID (returned by uploadSessionStart(boolean)). Must not be null.
        offset - The amount of data that has been uploaded so far. We use this to make sure upload data isn't lost or duplicated in the event of a network error.
        Returns:
        Uploader used to upload the request body and finish request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DbxException
      • uploadSessionFinish

        public UploadSessionFinishUploader uploadSessionFinish​(UploadSessionCursor cursor,
                                                               CommitInfo commit)
                                                        throws DbxException
        Finish an upload session and save the uploaded data to the given file path.

        A single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB.

        Calls to this endpoint will count as data transport calls for any Dropbox Business teams with a limit on the number of data transport calls allowed per month. For more information, see the Data transport limit page.

        Parameters:
        cursor - Contains the upload session ID and the offset. Must not be null.
        commit - Contains the path and other optional modifiers for the commit. Must not be null.
        Returns:
        Uploader used to upload the request body and finish request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        DbxException
      • uploadSessionFinishBatchCheck

        public UploadSessionFinishBatchJobStatus uploadSessionFinishBatchCheck​(java.lang.String asyncJobId)
                                                                        throws PollErrorException,
                                                                               DbxException
        Returns the status of an asynchronous job for uploadSessionFinishBatch(List). If success, it returns list of result for each entry.
        Parameters:
        asyncJobId - Id of the asynchronous job. This is the value of a response returned from the method that launched the job. Must have length of at least 1 and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
        PollErrorException
        DbxException