Class DbxUserFilesRequests
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionalphaGetMetadata(String path) Deprecated.Deprecated.alphaUpload(String path) Deprecated.alphaUploadBuilder(String path) Deprecated.Deprecated.copyBatch(List<RelocationPath> entries) Deprecated.copyBatchBuilder(List<RelocationPath> entries) Deprecated.copyBatchCheck(String asyncJobId) Deprecated.copyBatchCheckV2(String asyncJobId) Returns the status of an asynchronous job forcopyBatchV2(List,boolean).copyBatchV2(List<RelocationPath> entries) Copy multiple files or folders to different locations at once in the user's Dropbox.copyBatchV2(List<RelocationPath> entries, boolean autorename) Copy multiple files or folders to different locations at once in the user's Dropbox.copyBuilder(String fromPath, String toPath) Deprecated.copyReferenceGet(String path) Get a copy reference to a file or folder.copyReferenceSave(String copyReference, String path) Save a copy reference returned bycopyReferenceGet(String)to the user's Dropbox.Copy a file or folder to a different location in the user's Dropbox.copyV2Builder(String fromPath, String toPath) Copy a file or folder to a different location in the user's Dropbox.createFolder(String path) Deprecated.createFolder(String path, boolean autorename) Deprecated.createFolderBatch(List<String> paths) Create multiple folders at once.createFolderBatchBuilder(List<String> paths) Create multiple folders at once.createFolderBatchCheck(String asyncJobId) Returns the status of an asynchronous job forcreateFolderBatch(List).createFolderV2(String path) Create a folder at a given path.createFolderV2(String path, boolean autorename) Create a folder at a given path.Deprecated.Deprecated.deleteBatch(List<DeleteArg> entries) Delete multiple files/folders at once.deleteBatchCheck(String asyncJobId) Returns the status of an asynchronous job fordeleteBatch(List).Delete the file or folder at a given path.Delete the file or folder at a given path.Download a file from a user's Dropbox.Download a file from a user's Dropbox.downloadBuilder(String path) Download a file from a user's Dropbox.downloadZip(String path) Download a folder from the user's Dropbox, as a zip file.downloadZipBuilder(String path) Download a folder from the user's Dropbox, as a zip file.Export a file from a user's Dropbox.Export a file from a user's Dropbox.exportBuilder(String path) Export a file from a user's Dropbox.getFileLockBatch(List<LockFileArg> entries) Return the lock metadata for the given list of paths.getMetadata(String path) Returns the metadata for a file or folder.getMetadataBuilder(String path) Returns the metadata for a file or folder.getPreview(String path) Get a preview for a file.getPreview(String path, String rev) Get a preview for a file.getPreviewBuilder(String path) Get a preview for a file.getTemporaryLink(String path) Get a temporary link to stream content of a file.getTemporaryUploadLink(CommitInfo commitInfo) Get a one-time use temporary upload link to upload a file to a Dropbox location.getTemporaryUploadLink(CommitInfo commitInfo, double duration) Get a one-time use temporary upload link to upload a file to a Dropbox location.getThumbnail(String path) Get a thumbnail for an image.getThumbnailBatch(List<ThumbnailArg> entries) Get thumbnails for a list of images.getThumbnailBuilder(String path) Get a thumbnail for an image.getThumbnailV2(PathOrLink resource) Get a thumbnail for an image.getThumbnailV2Builder(PathOrLink resource) Get a thumbnail for an image.listFolder(String path) Starts returning the contents of a folder.listFolderBuilder(String path) Starts returning the contents of a folder.listFolderContinue(String cursor) Once a cursor has been retrieved fromlistFolder(String), use this to paginate through all files and retrieve updates to the folder, following the same rules as documented forlistFolder(String).A way to quickly get a cursor for the folder's state.A way to quickly get a cursor for the folder's state.listFolderLongpoll(String cursor) A longpoll endpoint to wait for changes on an account.listFolderLongpoll(String cursor, long timeout) A longpoll endpoint to wait for changes on an account.listRevisions(String path) Returns revisions for files based on a file path or a file id.listRevisionsBuilder(String path) Returns revisions for files based on a file path or a file id.lockFileBatch(List<LockFileArg> entries) Lock the files at the given paths.Deprecated.moveBatch(List<RelocationPath> entries) Deprecated.moveBatchBuilder(List<RelocationPath> entries) Deprecated.moveBatchCheck(String asyncJobId) Deprecated.moveBatchCheckV2(String asyncJobId) Returns the status of an asynchronous job formoveBatchV2(List).moveBatchV2(List<RelocationPath> entries) Move multiple files or folders to different locations at once in the user's Dropbox.moveBatchV2Builder(List<RelocationPath> entries) Move multiple files or folders to different locations at once in the user's Dropbox.moveBuilder(String fromPath, String toPath) Deprecated.Move a file or folder to a different location in the user's Dropbox.moveV2Builder(String fromPath, String toPath) Move a file or folder to a different location in the user's Dropbox.paperCreate(String path, ImportFormat importFormat) Creates a new Paper doc with the provided content.paperUpdate(String path, ImportFormat importFormat, PaperDocUpdatePolicy docUpdatePolicy) Updates an existing Paper doc with the provided content.paperUpdate(String path, ImportFormat importFormat, PaperDocUpdatePolicy docUpdatePolicy, Long paperRevision) Updates an existing Paper doc with the provided content.voidpermanentlyDelete(String path) Permanently delete the file or folder at a given path (see https://www.dropbox.com/en/help/40).voidpermanentlyDelete(String path, String parentRev) Permanently delete the file or folder at a given path (see https://www.dropbox.com/en/help/40).voidpropertiesAdd(String path, List<PropertyGroup> propertyGroups) Deprecated.voidpropertiesOverwrite(String path, List<PropertyGroup> propertyGroups) Deprecated.voidpropertiesUpdate(String path, List<PropertyGroupUpdate> updatePropertyGroups) Deprecated.Restore a specific revision of a file to the given path.Save the data from a specified URL into a file in user's Dropbox.saveUrlCheckJobStatus(String asyncJobId) Check the status of asaveUrl(String,String)job.Deprecated.searchBuilder(String path, String query) Deprecated.searchContinueV2(String cursor) Fetches the next page of search results returned fromsearchV2(String).Searches for files and folders.searchV2Builder(String query) Searches for files and folders.voidAdd a tag to an item.Get list of tags assigned to items.voidtagsRemove(String path, String tagText) Remove a tag from an item.unlockFileBatch(List<UnlockFileArg> entries) Unlock the files at the given paths.Create a new file with the contents provided in the request.uploadBuilder(String path) Create a new file with the contents provided in the request.uploadSessionAppend(String sessionId, long offset) Deprecated.Append more data to multiple upload sessions.uploadSessionAppendBatch(List<UploadSessionAppendBatchArgEntry> entries, String contentHash) Append more data to multiple upload sessions.Append more data to an upload session.Append more data to an upload session.uploadSessionFinish(UploadSessionCursor cursor, CommitInfo commit) Finish an upload session and save the uploaded data to the given file path.uploadSessionFinish(UploadSessionCursor cursor, CommitInfo commit, String contentHash) Finish an upload session and save the uploaded data to the given file path.Deprecated.uploadSessionFinishBatchCheck(String asyncJobId) Returns the status of an asynchronous job foruploadSessionFinishBatch(List).This route helps you commit many files at once into a user's Dropbox.Upload sessions allow you to upload a single file in one or more requests, for example where the size of the file is greater than 150 MiB.uploadSessionStartBatch(long numSessions) Start a batch of upload sessions.uploadSessionStartBatch(long numSessions, UploadSessionType sessionType) Start a batch of upload sessions.Upload sessions allow you to upload a single file in one or more requests, for example where the size of the file is greater than 150 MiB.
-
Constructor Details
-
DbxUserFilesRequests
-
-
Method Details
-
alphaGetMetadata
@Deprecated public Metadata alphaGetMetadata(String path) throws AlphaGetMetadataErrorException, DbxException Deprecated.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
AlphaGetMetadataBuilderfor 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]+(/(.|[\\r\\n])*)?)" and not benull.- Returns:
- Metadata for a file or folder.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.AlphaGetMetadataErrorExceptionDbxException
-
alphaGetMetadataBuilder
Deprecated.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]+(/(.|[\\r\\n])*)?)" and not benull.- Returns:
- Request builder for configuring request parameters and completing the request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
alphaUpload
Deprecated.Create a new file with the contents provided in the request. Note that the behavior of this alpha endpoint is unstable and subject to change. Do not use this to upload a file larger than 150 MiB. Instead, create an upload session withuploadSessionStart(com.dropbox.core.v2.files.UploadSessionStartArg).The default values for the optional request parameters will be used. See
AlphaUploadBuilderfor more details.- Parameters:
path- Path in the user's Dropbox to save the file. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.- Returns:
- Uploader used to upload the request body and finish request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxException
-
alphaUploadBuilder
Deprecated.Create a new file with the contents provided in the request. Note that the behavior of this alpha endpoint is unstable and subject to change. Do not use this to upload a file larger than 150 MiB. Instead, create an upload session withuploadSessionStart(com.dropbox.core.v2.files.UploadSessionStartArg).- Parameters:
path- Path in the user's Dropbox to save the file. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.- Returns:
- Uploader builder for configuring request parameters and instantiating an uploader.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
copy
@Deprecated public Metadata copy(String fromPath, 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
CopyBuilderfor more details.- Parameters:
fromPath- Path in the user's Dropbox to be copied or moved. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.toPath- Path in the user's Dropbox that is the destination. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.- Returns:
- Metadata for a file or folder.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.RelocationErrorExceptionDbxException
-
copyBuilder
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]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.toPath- Path in the user's Dropbox that is the destination. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.- Returns:
- Request builder for configuring request parameters and completing the request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
copyV2
public RelocationResult copyV2(String fromPath, 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
CopyV2Builderfor more details.- Parameters:
fromPath- Path in the user's Dropbox to be copied or moved. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.toPath- Path in the user's Dropbox that is the destination. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.RelocationErrorExceptionDbxException
-
copyV2Builder
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]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.toPath- Path in the user's Dropbox that is the destination. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.- Returns:
- Request builder for configuring request parameters and completing the request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
copyBatch
@Deprecated public RelocationBatchLaunch copyBatch(List<RelocationPath> entries) throws DbxApiException, DbxException Deprecated.Copy 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 copy job in background. Please usecopyBatchCheck(String)to check the job status.The default values for the optional request parameters will be used. See
CopyBatchBuilderfor more details.- Parameters:
entries- List of entries to be moved or copied. Each entry isRelocationPath. Must contain at least 1 items, contain at most 1000 items, not contain anullitem, and not benull.- Returns:
- Result returned by
copyBatch(List)ormoveBatch(List)that may either launch an asynchronous job or complete synchronously. - Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxApiExceptionDbxException
-
copyBatchBuilder
Deprecated.Copy 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 copy job in background. Please usecopyBatchCheck(String)to check the job status.- Parameters:
entries- List of entries to be moved or copied. Each entry isRelocationPath. Must contain at least 1 items, contain at most 1000 items, not contain anullitem, and not benull.- Returns:
- Request builder for configuring request parameters and completing the request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
copyBatchV2
public RelocationBatchV2Launch copyBatchV2(List<RelocationPath> entries) throws DbxApiException, DbxException Copy multiple files or folders to different locations at once in the user's Dropbox. This route will replacecopyBatch(List). The main difference is this route will return status for each entry, whilecopyBatch(List)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 usecopyBatchCheckV2(String)to check the job status.The
autorenamerequest parameter will default tofalse(seecopyBatchV2(List,boolean)).- Parameters:
entries- List of entries to be moved or copied. Each entry isRelocationPath. Must contain at least 1 items, contain at most 1000 items, not contain anullitem, and not benull.- Returns:
- Result returned by
copyBatchV2(List,boolean)ormoveBatchV2(List)that may either launch an asynchronous job or complete synchronously. - Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxApiExceptionDbxException
-
copyBatchV2
public RelocationBatchV2Launch copyBatchV2(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 replacecopyBatch(List). The main difference is this route will return status for each entry, whilecopyBatch(List)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 usecopyBatchCheckV2(String)to check the job status.- Parameters:
entries- List of entries to be moved or copied. Each entry isRelocationPath. Must contain at least 1 items, contain at most 1000 items, not contain anullitem, and not benull.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)ormoveBatchV2(List)that may either launch an asynchronous job or complete synchronously. - Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxApiExceptionDbxException
-
copyBatchCheck
@Deprecated public RelocationBatchJobStatus copyBatchCheck(String asyncJobId) throws PollErrorException, DbxException Deprecated.Returns the status of an asynchronous job forcopyBatch: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 benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.PollErrorExceptionDbxException
-
copyBatchCheckV2
public RelocationBatchV2JobStatus copyBatchCheckV2(String asyncJobId) throws PollErrorException, DbxException Returns the status of an asynchronous job forcopyBatchV2(List,boolean). 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 benull.- Returns:
- Result returned by
copyBatchCheckV2(String)ormoveBatchCheckV2(String)that may either be in progress or completed with result for each entry. - Throws:
IllegalArgumentException- If any argument does not meet its preconditions.PollErrorExceptionDbxException
-
copyReferenceGet
public GetCopyReferenceResult copyReferenceGet(String path) throws GetCopyReferenceErrorException, DbxException Get a copy reference to a file or folder. This reference string can be used to save that file or folder to another user's Dropbox by passing it tocopyReferenceSave(String,String).- Parameters:
path- The path to the file or folder you want to get a copy reference to. Must match pattern "(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/(.|[\\r\\n])*)?)" and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.GetCopyReferenceErrorExceptionDbxException
-
copyReferenceSave
public SaveCopyReferenceResult copyReferenceSave(String copyReference, String path) throws SaveCopyReferenceErrorException, DbxException Save a copy reference returned bycopyReferenceGet(String)to the user's Dropbox.- Parameters:
copyReference- A copy reference returned bycopyReferenceGet(String). Must not benull.path- Path in the user's Dropbox that is the destination. Must match pattern "/(.|[\\r\\n])*" and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.SaveCopyReferenceErrorExceptionDbxException
-
createFolder
@Deprecated public FolderMetadata createFolder(String path) throws CreateFolderErrorException, DbxException Deprecated.Create a folder at a given path.The
autorenamerequest parameter will default tofalse(seecreateFolder(String,boolean)).- Parameters:
path- Path in the user's Dropbox to create. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)" and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.CreateFolderErrorExceptionDbxException
-
createFolder
@Deprecated public FolderMetadata createFolder(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]+(/(.|[\\r\\n])*)?)" and not benull.autorename- If there's a conflict, have the Dropbox server try to autorename the folder to avoid the conflict.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.CreateFolderErrorExceptionDbxException
-
createFolderV2
public CreateFolderResult createFolderV2(String path) throws CreateFolderErrorException, DbxException Create a folder at a given path.The
autorenamerequest parameter will default tofalse(seecreateFolderV2(String,boolean)).- Parameters:
path- Path in the user's Dropbox to create. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)" and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.CreateFolderErrorExceptionDbxException
-
createFolderV2
public CreateFolderResult createFolderV2(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]+(/(.|[\\r\\n])*)?)" and not benull.autorename- If there's a conflict, have the Dropbox server try to autorename the folder to avoid the conflict.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.CreateFolderErrorExceptionDbxException
-
createFolderBatch
public CreateFolderBatchLaunch createFolderBatch(List<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.force_async flag. UsecreateFolderBatchCheck(String)to check the job status.The default values for the optional request parameters will be used. See
CreateFolderBatchBuilderfor 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 contain at most 10000 items, not contain anullitem, and not benull.- Returns:
- Result returned by
createFolderBatch(List)that may either launch an asynchronous job or complete synchronously. - Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxApiExceptionDbxException
-
createFolderBatchBuilder
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.force_async flag. UsecreateFolderBatchCheck(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 contain at most 10000 items, not contain anullitem, and not benull.- Returns:
- Request builder for configuring request parameters and completing the request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
createFolderBatchCheck
public CreateFolderBatchJobStatus createFolderBatchCheck(String asyncJobId) throws PollErrorException, DbxException Returns the status of an asynchronous job forcreateFolderBatch(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 benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.PollErrorExceptionDbxException
-
delete
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]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.- Returns:
- Metadata for a file or folder.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DeleteErrorExceptionDbxException
-
delete
@Deprecated public Metadata delete(String path, 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]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.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:
IllegalArgumentException- If any argument does not meet its preconditions.DeleteErrorExceptionDbxException
-
deleteV2
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]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DeleteErrorExceptionDbxException
-
deleteV2
public DeleteResult deleteV2(String path, 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]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.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:
IllegalArgumentException- If any argument does not meet its preconditions.DeleteErrorExceptionDbxException
-
deleteBatch
Delete multiple files/folders at once. This route is asynchronous, which returns a job ID immediately and runs the delete batch asynchronously. UsedeleteBatchCheck(String)to check the job status.- Parameters:
entries- Must contain at most 1000 items, not contain anullitem, and not benull.- Returns:
- Result returned by
deleteBatch(List)that may either launch an asynchronous job or complete synchronously. - Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxApiExceptionDbxException
-
deleteBatchCheck
public DeleteBatchJobStatus deleteBatchCheck(String asyncJobId) throws PollErrorException, DbxException Returns the status of an asynchronous job fordeleteBatch(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 benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.PollErrorExceptionDbxException
-
download
public DbxDownloader<FileMetadata> download(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]+(/(.|[\\r\\n])*)?)" and not benull.- Returns:
- Downloader used to download the response body and view the server response.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DownloadErrorExceptionDbxException
-
download
public DbxDownloader<FileMetadata> download(String path, 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]+(/(.|[\\r\\n])*)?)" and not benull.rev- Field is deprecated. Please specify revision in thepathargument todownload(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:
IllegalArgumentException- If any argument does not meet its preconditions.DownloadErrorExceptionDbxException
-
downloadBuilder
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]+(/(.|[\\r\\n])*)?)" and not benull.- Returns:
- Downloader builder for configuring the request parameters and instantiating a downloader.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
downloadZip
public DbxDownloader<DownloadZipResult> downloadZip(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 any single file within must be less than 4 GB in size. The resulting zip must have fewer than 10,000 total file and folder entries, including the top level folder. The input cannot be a single file. Note: this endpoint does not support HTTP range requests.- Parameters:
path- The path of the folder to download. Must match pattern "(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/(.|[\\r\\n])*)?)" and not benull.- Returns:
- Downloader used to download the response body and view the server response.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DownloadZipErrorExceptionDbxException
-
downloadZipBuilder
Download a folder from the user's Dropbox, as a zip file. The folder must be less than 20 GB in size and any single file within must be less than 4 GB in size. The resulting zip must have fewer than 10,000 total file and folder entries, including the top level folder. The input cannot be a single file. Note: this endpoint does not support HTTP range requests.- Parameters:
path- The path of the folder to download. Must match pattern "(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/(.|[\\r\\n])*)?)" and not benull.- Returns:
- Downloader builder for configuring the request parameters and instantiating a downloader.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
export
Export a file from a user's Dropbox. This route only supports exporting files that cannot be downloaded directly and whose ExportResult.file_metadata has ExportInfo.export_as 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]+(/(.|[\\r\\n])*)?)" and not benull.- Returns:
- Downloader used to download the response body and view the server response.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.ExportErrorExceptionDbxException
-
export
public DbxDownloader<ExportResult> export(String path, String exportFormat) throws ExportErrorException, DbxException Export a file from a user's Dropbox. This route only supports exporting files that cannot be downloaded directly and whose ExportResult.file_metadata has ExportInfo.export_as 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]+(/(.|[\\r\\n])*)?)" and not benull.exportFormat- The file format to which the file should be exported. This must be one of the formats listed in the file's export_options returned bygetMetadata(String). If none is specified, the default format (specified in export_as in file metadata) will be used.- Returns:
- Downloader used to download the response body and view the server response.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.ExportErrorExceptionDbxException
-
exportBuilder
Export a file from a user's Dropbox. This route only supports exporting files that cannot be downloaded directly and whose ExportResult.file_metadata has ExportInfo.export_as 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]+(/(.|[\\r\\n])*)?)" and not benull.- Returns:
- Downloader builder for configuring the request parameters and instantiating a downloader.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
getFileLockBatch
public LockFileBatchResult getFileLockBatch(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 anullitem and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.LockFileErrorExceptionDbxException
-
getMetadata
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
GetMetadataBuilderfor 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]+(/(.|[\\r\\n])*)?)" and not benull.- Returns:
- Metadata for a file or folder.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.GetMetadataErrorExceptionDbxException
-
getMetadataBuilder
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]+(/(.|[\\r\\n])*)?)" and not benull.- Returns:
- Request builder for configuring request parameters and completing the request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
getPreview
public DbxDownloader<FileMetadata> getPreview(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 .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]+(/(.|[\\r\\n])*)?)" and not benull.- Returns:
- Downloader used to download the response body and view the server response.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.PreviewErrorExceptionDbxException
-
getPreview
public DbxDownloader<FileMetadata> getPreview(String path, 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 .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]+(/(.|[\\r\\n])*)?)" and not benull.rev- Field is deprecated. Please specify revision in thepathargument togetPreview(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:
IllegalArgumentException- If any argument does not meet its preconditions.PreviewErrorExceptionDbxException
-
getPreviewBuilder
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 .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]+(/(.|[\\r\\n])*)?)" and not benull.- Returns:
- Downloader builder for configuring the request parameters and instantiating a downloader.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
getTemporaryLink
public GetTemporaryLinkResult getTemporaryLink(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]+(/(.|[\\r\\n])*)?)" and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.GetTemporaryLinkErrorExceptionDbxException
-
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(). 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() 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 successful 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
durationrequest parameter will default to14400.0(seegetTemporaryUploadLink(CommitInfo,double)).- Parameters:
commitInfo- Contains the path and other optional modifiers for the future upload commit. Equivalent to the parameters provided toupload(String). Must not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxApiExceptionDbxException
-
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(). 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() 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 successful 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 toupload(String). Must not benull.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:
IllegalArgumentException- If any argument does not meet its preconditions.DbxApiExceptionDbxException
-
getThumbnail
public DbxDownloader<FileMetadata> getThumbnail(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, webp, ppm 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
GetThumbnailBuilderfor 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]+(/(.|[\\r\\n])*)?)" and not benull.- Returns:
- Downloader used to download the response body and view the server response.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.ThumbnailErrorExceptionDbxException
-
getThumbnailBuilder
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm 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]+(/(.|[\\r\\n])*)?)" and not benull.- Returns:
- Downloader builder for configuring the request parameters and instantiating a downloader.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
getThumbnailV2
public DbxDownloader<PreviewResult> getThumbnailV2(PathOrLink resource) throws ThumbnailV2ErrorException, DbxException Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm 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
DbxUserGetThumbnailV2Builderfor 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 benull.- Returns:
- Downloader used to download the response body and view the server response.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.ThumbnailV2ErrorExceptionDbxException
-
getThumbnailV2Builder
Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size won't be converted to a thumbnail.- 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 benull.- Returns:
- Downloader builder for configuring the request parameters and instantiating a downloader.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
getThumbnailBatch
public GetThumbnailBatchResult getThumbnailBatch(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, webp, ppm 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 anullitem and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.GetThumbnailBatchErrorExceptionDbxException
-
listFolder
Starts returning the contents of a folder. If the result'sListFolderResult.getHasMore()field is true, calllistFolderContinue(String)with the returned ListFolderResult.cursor to retrieve more entries. If you're using ListFolderArg.recursive 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.read_only 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: auth.RateLimitError may be returned if multiplelistFolder(String)orlistFolderContinue(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
DbxUserListFolderBuilderfor more details.- Parameters:
path- A unique identifier for the file. Must match pattern "(/(.|[\\r\\n])*)?|id:.*|(ns:[0-9]+(/(.|[\\r\\n])*)?)" and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.ListFolderErrorExceptionDbxException
-
listFolderBuilder
Starts returning the contents of a folder. If the result'sListFolderResult.getHasMore()field is true, calllistFolderContinue(String)with the returned ListFolderResult.cursor to retrieve more entries. If you're using ListFolderArg.recursive 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.read_only 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: auth.RateLimitError may be returned if multiplelistFolder(String)orlistFolderContinue(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]+(/(.|[\\r\\n])*)?)" and not benull.- Returns:
- Request builder for configuring request parameters and completing the request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
listFolderContinue
public ListFolderResult listFolderContinue(String cursor) throws ListFolderContinueErrorException, DbxException Once a cursor has been retrieved fromlistFolder(String), use this to paginate through all files and retrieve updates to the folder, following the same rules as documented forlistFolder(String).- Parameters:
cursor- The cursor returned by your last call tolistFolder(String)orlistFolderContinue(String). Must have length of at least 1 and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.ListFolderContinueErrorExceptionDbxException
-
listFolderGetLatestCursor
public ListFolderGetLatestCursorResult listFolderGetLatestCursor(String path) throws ListFolderErrorException, DbxException A way to quickly get a cursor for the folder's state. UnlikelistFolder(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.The default values for the optional request parameters will be used. See
ListFolderGetLatestCursorBuilderfor more details.- Parameters:
path- A unique identifier for the file. Must match pattern "(/(.|[\\r\\n])*)?|id:.*|(ns:[0-9]+(/(.|[\\r\\n])*)?)" and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.ListFolderErrorExceptionDbxException
-
listFolderGetLatestCursorBuilder
A way to quickly get a cursor for the folder's state. UnlikelistFolder(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]+(/(.|[\\r\\n])*)?)" and not benull.- Returns:
- Request builder for configuring request parameters and completing the request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
listFolderLongpoll
public ListFolderLongpollResult listFolderLongpoll(String cursor) throws ListFolderLongpollErrorException, DbxException A longpoll endpoint to wait for changes on an account. In conjunction withlistFolderContinue(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.The
timeoutrequest parameter will default to30L(seelistFolderLongpoll(String,long)).- Parameters:
cursor- A cursor as returned bylistFolder(String)orlistFolderContinue(String). Cursors retrieved by settingListFolderArg.getIncludeMediaInfo()totrueare not supported. Must have length of at least 1 and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.ListFolderLongpollErrorExceptionDbxException
-
listFolderLongpoll
public ListFolderLongpollResult listFolderLongpoll(String cursor, long timeout) throws ListFolderLongpollErrorException, DbxException A longpoll endpoint to wait for changes on an account. In conjunction withlistFolderContinue(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.- Parameters:
cursor- A cursor as returned bylistFolder(String)orlistFolderContinue(String). Cursors retrieved by settingListFolderArg.getIncludeMediaInfo()totrueare not supported. Must have length of at least 1 and not benull.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:
IllegalArgumentException- If any argument does not meet its preconditions.ListFolderLongpollErrorExceptionDbxException
-
listRevisions
public ListRevisionsResult listRevisions(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
ListRevisionsBuilderfor 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]+(/(.|[\\r\\n])*)?)" and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.ListRevisionsErrorExceptionDbxException
-
listRevisionsBuilder
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]+(/(.|[\\r\\n])*)?)" and not benull.- Returns:
- Request builder for configuring request parameters and completing the request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
lockFileBatch
public LockFileBatchResult lockFileBatch(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 anullitem and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.LockFileErrorExceptionDbxException
-
move
@Deprecated public Metadata move(String fromPath, 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
MoveBuilderfor more details.- Parameters:
fromPath- Path in the user's Dropbox to be copied or moved. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.toPath- Path in the user's Dropbox that is the destination. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.- Returns:
- Metadata for a file or folder.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.RelocationErrorExceptionDbxException
-
moveBuilder
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]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.toPath- Path in the user's Dropbox that is the destination. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.- Returns:
- Request builder for configuring request parameters and completing the request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
moveV2
public RelocationResult moveV2(String fromPath, 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
MoveV2Builderfor more details.- Parameters:
fromPath- Path in the user's Dropbox to be copied or moved. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.toPath- Path in the user's Dropbox that is the destination. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.RelocationErrorExceptionDbxException
-
moveV2Builder
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]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.toPath- Path in the user's Dropbox that is the destination. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.- Returns:
- Request builder for configuring request parameters and completing the request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
moveBatch
@Deprecated public RelocationBatchLaunch moveBatch(List<RelocationPath> entries) throws DbxApiException, DbxException Deprecated.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 usemoveBatchCheck(String)to check the job status.The default values for the optional request parameters will be used. See
MoveBatchBuilderfor more details.- Parameters:
entries- List of entries to be moved or copied. Each entry isRelocationPath. Must contain at least 1 items, contain at most 1000 items, not contain anullitem, and not benull.- Returns:
- Result returned by
copyBatch(List)ormoveBatch(List)that may either launch an asynchronous job or complete synchronously. - Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxApiExceptionDbxException
-
moveBatchBuilder
Deprecated.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 usemoveBatchCheck(String)to check the job status.- Parameters:
entries- List of entries to be moved or copied. Each entry isRelocationPath. Must contain at least 1 items, contain at most 1000 items, not contain anullitem, and not benull.- Returns:
- Request builder for configuring request parameters and completing the request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
moveBatchV2
public RelocationBatchV2Launch moveBatchV2(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 replacemoveBatch(List). The main difference is this route will return status for each entry, whilemoveBatch(List)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 usemoveBatchCheckV2(String)to check the job status.The default values for the optional request parameters will be used. See
MoveBatchV2Builderfor more details.- Parameters:
entries- List of entries to be moved or copied. Each entry isRelocationPath. Must contain at least 1 items, contain at most 1000 items, not contain anullitem, and not benull.- Returns:
- Result returned by
copyBatchV2(List,boolean)ormoveBatchV2(List)that may either launch an asynchronous job or complete synchronously. - Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxApiExceptionDbxException
-
moveBatchV2Builder
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 replacemoveBatch(List). The main difference is this route will return status for each entry, whilemoveBatch(List)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 usemoveBatchCheckV2(String)to check the job status.- Parameters:
entries- List of entries to be moved or copied. Each entry isRelocationPath. Must contain at least 1 items, contain at most 1000 items, not contain anullitem, and not benull.- Returns:
- Request builder for configuring request parameters and completing the request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
moveBatchCheck
@Deprecated public RelocationBatchJobStatus moveBatchCheck(String asyncJobId) throws PollErrorException, DbxException Deprecated.Returns the status of an asynchronous job formoveBatch: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 benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.PollErrorExceptionDbxException
-
moveBatchCheckV2
public RelocationBatchV2JobStatus moveBatchCheckV2(String asyncJobId) throws PollErrorException, DbxException Returns the status of an asynchronous job formoveBatchV2(List). 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 benull.- Returns:
- Result returned by
copyBatchCheckV2(String)ormoveBatchCheckV2(String)that may either be in progress or completed with result for each entry. - Throws:
IllegalArgumentException- If any argument does not meet its preconditions.PollErrorExceptionDbxException
-
paperCreate
Creates a new Paper doc with the provided content.- Parameters:
path- The fully qualified path to the location in the user's Dropbox where the Paper Doc should be created. This should include the document's title and end with .paper. Must match pattern "/(.|[\\r\\n])*" and not benull.importFormat- The format of the provided data. Must not benull.- Returns:
- Uploader used to upload the request body and finish request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxException
-
paperUpdate
public PaperUpdateUploader paperUpdate(String path, ImportFormat importFormat, PaperDocUpdatePolicy docUpdatePolicy) throws DbxException Updates an existing Paper doc with the provided content.- Parameters:
path- Path in the user's Dropbox to update. The path must correspond to a Paper doc or an error will be returned. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.importFormat- The format of the provided data. Must not benull.docUpdatePolicy- How the provided content should be applied to the doc. Must not benull.- Returns:
- Uploader used to upload the request body and finish request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxException
-
paperUpdate
public PaperUpdateUploader paperUpdate(String path, ImportFormat importFormat, PaperDocUpdatePolicy docUpdatePolicy, Long paperRevision) throws DbxException Updates an existing Paper doc with the provided content.- Parameters:
path- Path in the user's Dropbox to update. The path must correspond to a Paper doc or an error will be returned. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.importFormat- The format of the provided data. Must not benull.docUpdatePolicy- How the provided content should be applied to the doc. Must not benull.paperRevision- The latest doc revision. Required when doc_update_policy is update. This value must match the current revision of the doc or error revision_mismatch will be returned.- Returns:
- Uploader used to upload the request body and finish request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxException
-
permanentlyDelete
Permanently delete the file or folder at a given path (see https://www.dropbox.com/en/help/40). If the given file or folder is not yet deleted, this route will first delete it. It is possible for this route to successfully delete, then fail to permanently delete. 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]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DeleteErrorExceptionDbxException
-
permanentlyDelete
public void permanentlyDelete(String path, String parentRev) throws DeleteErrorException, DbxException Permanently delete the file or folder at a given path (see https://www.dropbox.com/en/help/40). If the given file or folder is not yet deleted, this route will first delete it. It is possible for this route to successfully delete, then fail to permanently delete. 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]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.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:
IllegalArgumentException- If any argument does not meet its preconditions.DeleteErrorExceptionDbxException
-
propertiesAdd
@Deprecated public void propertiesAdd(String path, List<PropertyGroup> propertyGroups) throws AddPropertiesErrorException, DbxException Deprecated.Add property groups to a Dropbox file. See templates/add_for_user or templates/add_for_team to create new templates.- Parameters:
path- A unique identifier for the file or folder. Must match pattern "/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/.*)?)" and not benull.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 anullitem and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.AddPropertiesErrorExceptionDbxException
-
propertiesOverwrite
@Deprecated public void propertiesOverwrite(String path, List<PropertyGroup> propertyGroups) throws InvalidPropertyGroupErrorException, DbxException Deprecated.Overwrite property groups associated with a file. This endpoint should be used instead of properties/update when property groups are being overwritten rather than updated via a "delta".- Parameters:
path- A unique identifier for the file or folder. Must match pattern "/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/.*)?)" and not benull.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 anullitem, and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.InvalidPropertyGroupErrorExceptionDbxException
-
propertiesUpdate
@Deprecated public void propertiesUpdate(String path, List<PropertyGroupUpdate> updatePropertyGroups) throws UpdatePropertiesErrorException, DbxException Deprecated.Add, update or remove properties associated with the supplied file and templates. This endpoint should be used instead of properties/overwrite when property groups are being updated via a "delta" instead of overwriting all properties of a file.- Parameters:
path- A unique identifier for the file or folder. Must match pattern "/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/.*)?)" and not benull.updatePropertyGroups- The property groups "delta" updates to apply. Must not contain anullitem and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.UpdatePropertiesErrorExceptionDbxException
-
restore
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]+(/(.|[\\r\\n])*)?)" and not benull.rev- The revision to restore. Must have length of at least 9, match pattern "[0-9a-f]+", and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.RestoreErrorExceptionDbxException
-
saveUrl
Save the data from a specified URL into a file in user's Dropbox. Note that the transfer from the URL must complete within 15 minutes, or the operation will time out and the job will fail.- Parameters:
path- The path in Dropbox where the URL will be saved to. Must match pattern "/(.|[\\r\\n])*" and not benull.url- The URL to be saved. Must not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.SaveUrlErrorExceptionDbxException
-
saveUrlCheckJobStatus
public SaveUrlJobStatus saveUrlCheckJobStatus(String asyncJobId) throws PollErrorException, DbxException Check the status of asaveUrl(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 benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.PollErrorExceptionDbxException
-
search
@Deprecated public SearchResult search(String path, String query) throws SearchErrorException, DbxException Deprecated.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
SearchBuilderfor 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]+(/(.|[\\r\\n])*)?)" and not benull.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 have length of at most 1000 and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.SearchErrorExceptionDbxException
-
searchBuilder
Deprecated.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]+(/(.|[\\r\\n])*)?)" and not benull.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 have length of at most 1000 and not benull.- Returns:
- Request builder for configuring request parameters and completing the request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
searchV2
Searches for files and folders. Note:searchV2(String)along withsearchContinueV2(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. Must have length of at most 1000 and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.SearchErrorExceptionDbxException
-
searchV2Builder
Searches for files and folders. Note:searchV2(String)along withsearchContinueV2(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. Must have length of at most 1000 and not benull.- Returns:
- Request builder for configuring request parameters and completing the request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
searchContinueV2
Fetches the next page of search results returned fromsearchV2(String). Note:searchV2(String)along withsearchContinueV2(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 tosearchV2(String). Used to fetch the next page of results. Must have length of at least 1 and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.SearchErrorExceptionDbxException
-
tagsAdd
Add a tag to an item. A tag is a string. The strings are automatically converted to lowercase letters. No more than 20 tags can be added to a given item.- Parameters:
path- Path to the item to be tagged. Must match pattern "/(.|[\\r\\n])*" and not benull.tagText- The value of the tag to add. Will be automatically converted to lowercase letters. Must have length of at least 1, have length of at most 32, match pattern "[\\w]+", and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.AddTagErrorExceptionDbxException
-
tagsGet
Get list of tags assigned to items.- Parameters:
paths- Path to the items. Must not contain anullitem and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.BaseTagErrorExceptionDbxException
-
tagsRemove
Remove a tag from an item.- Parameters:
path- Path to the item to tag. Must match pattern "/(.|[\\r\\n])*" and not benull.tagText- The tag to remove. Will be automatically converted to lowercase letters. Must have length of at least 1, have length of at most 32, match pattern "[\\w]+", and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.RemoveTagErrorExceptionDbxException
-
unlockFileBatch
public LockFileBatchResult unlockFileBatch(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 anullitem and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.LockFileErrorExceptionDbxException
-
upload
Create a new file with the contents provided in the request. Do not use this to upload a file larger than 150 MiB. Instead, create an upload session withuploadSessionStart(com.dropbox.core.v2.files.UploadSessionStartArg). 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 https://www.dropbox.com/developers/reference/data-transport-limit.The default values for the optional request parameters will be used. See
UploadBuilderfor more details.- Parameters:
path- Path in the user's Dropbox to save the file. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.- Returns:
- Uploader used to upload the request body and finish request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxException
-
uploadBuilder
Create a new file with the contents provided in the request. Do not use this to upload a file larger than 150 MiB. Instead, create an upload session withuploadSessionStart(com.dropbox.core.v2.files.UploadSessionStartArg). 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 https://www.dropbox.com/developers/reference/data-transport-limit.- Parameters:
path- Path in the user's Dropbox to save the file. Must match pattern "(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)|(id:.*)" and not benull.- Returns:
- Uploader builder for configuring request parameters and instantiating an uploader.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
uploadSessionAppend
@Deprecated public UploadSessionAppendUploader uploadSessionAppend(String sessionId, long offset) throws DbxException Deprecated.Append more data to an upload session. A single request should not upload more than 150 MiB. The maximum size of a file one can upload to an upload session is 2^41 - 2^22 (2,199,019,061,248) bytes. 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 https://www.dropbox.com/developers/reference/data-transport-limit.- Parameters:
sessionId- The upload session ID (returned byuploadSessionStart(com.dropbox.core.v2.files.UploadSessionStartArg)). Must not benull.offset- Offset in bytes at which data should be appended. 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:
IllegalArgumentException- If any argument does not meet its preconditions.DbxException
-
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 MiB. The maximum size of a file one can upload to an upload session is 2^41 - 2^22 (2,199,019,061,248) bytes. 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 https://www.dropbox.com/developers/reference/data-transport-limit.The default values for the optional request parameters will be used. See
UploadSessionAppendV2Builderfor more details.- Parameters:
cursor- Contains the upload session ID and the offset. Must not benull.- Returns:
- Uploader used to upload the request body and finish request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxException
-
uploadSessionAppendV2Builder
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 MiB. The maximum size of a file one can upload to an upload session is 2^41 - 2^22 (2,199,019,061,248) bytes. 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 https://www.dropbox.com/developers/reference/data-transport-limit.- Parameters:
cursor- Contains the upload session ID and the offset. Must not benull.- Returns:
- Uploader builder for configuring request parameters and instantiating an uploader.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
uploadSessionAppendBatch
public UploadSessionAppendBatchUploader uploadSessionAppendBatch(List<UploadSessionAppendBatchArgEntry> entries) throws DbxException Append more data to multiple upload sessions. Each piece of file content to append to each upload session should be concatenated in the request body, in the order delineated by theentriesargument touploadSessionAppendBatch(List,String)and their individual lengths indicated byUploadSessionAppendBatchArgEntry.getLength(). A single request should not upload more than 150 MiB. The maximum size of a file one can upload to an upload session is 2^41 - 2^22 (2,199,019,061,248) bytes. 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 https://www.dropbox.com/developers/reference/data-transport-limit.- Parameters:
entries- Append information for each file in the batch. Must contain at most 1000 items, not contain anullitem, and not benull.- Returns:
- Uploader used to upload the request body and finish request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxException
-
uploadSessionAppendBatch
public UploadSessionAppendBatchUploader uploadSessionAppendBatch(List<UploadSessionAppendBatchArgEntry> entries, String contentHash) throws DbxException Append more data to multiple upload sessions. Each piece of file content to append to each upload session should be concatenated in the request body, in the order delineated by theentriesargument touploadSessionAppendBatch(List,String)and their individual lengths indicated byUploadSessionAppendBatchArgEntry.getLength(). A single request should not upload more than 150 MiB. The maximum size of a file one can upload to an upload session is 2^41 - 2^22 (2,199,019,061,248) bytes. 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 https://www.dropbox.com/developers/reference/data-transport-limit.- Parameters:
entries- Append information for each file in the batch. Must contain at most 1000 items, not contain anullitem, and not benull.contentHash- A hash of the entire request body which is all the concatenated pieces of file content that were uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. For more information see our Content hash page. Must have length of at least 64 and have length of at most 64.- Returns:
- Uploader used to upload the request body and finish request.
- Throws:
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 MiB. The maximum size of a file one can upload to an upload session is 2^41 - 2^22 (2,199,019,061,248) bytes. 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 https://www.dropbox.com/developers/reference/data-transport-limit.- Parameters:
cursor- Contains the upload session ID and the offset. Must not benull.commit- Contains the path and other optional modifiers for the commit. Must not benull.- Returns:
- Uploader used to upload the request body and finish request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxException
-
uploadSessionFinish
public UploadSessionFinishUploader uploadSessionFinish(UploadSessionCursor cursor, CommitInfo commit, String contentHash) 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 MiB. The maximum size of a file one can upload to an upload session is 2^41 - 2^22 (2,199,019,061,248) bytes. 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 https://www.dropbox.com/developers/reference/data-transport-limit.- Parameters:
cursor- Contains the upload session ID and the offset. Must not benull.commit- Contains the path and other optional modifiers for the commit. Must not benull.contentHash- A hash of the file content uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. For more information see our Content hash page. Must have length of at least 64 and have length of at most 64.- Returns:
- Uploader used to upload the request body and finish request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxException
-
uploadSessionFinishBatch
@Deprecated public UploadSessionFinishBatchLaunch uploadSessionFinishBatch(List<UploadSessionFinishArg> entries) throws DbxApiException, DbxException Deprecated.This route helps you commit many files at once into a user's Dropbox. UseuploadSessionStart(com.dropbox.core.v2.files.UploadSessionStartArg)anduploadSessionAppendV2(UploadSessionCursor)to upload file contents. We recommend uploading many files in parallel to increase throughput. Once the file contents have been uploaded, rather than callinguploadSessionFinish(UploadSessionCursor,CommitInfo,String), use this route to finish all your upload sessions in a single request.UploadSessionStartArg.getClose()orUploadSessionAppendArg.getClose()needs to be true for the lastuploadSessionStart(com.dropbox.core.v2.files.UploadSessionStartArg)oruploadSessionAppendV2(UploadSessionCursor)call. The maximum size of a file one can upload to an upload session is 2^41 - 2^22 (2,199,019,061,248) bytes. This route will return a job_id immediately and do the async commit job in background. UseuploadSessionFinishBatchCheck(String)to check the job status. For the same account, this route should be executed serially. That means you should not start the next job before current job finishes. We allow up to 1000 entries in a single request. 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 https://www.dropbox.com/developers/reference/data-transport-limit.- Parameters:
entries- Commit information for each file in the batch. Must contain at most 1000 items, not contain anullitem, and not benull.- Returns:
- Result returned by
uploadSessionFinishBatch(List)that may either launch an asynchronous job or complete synchronously. - Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxApiExceptionDbxException
-
uploadSessionFinishBatchV2
public UploadSessionFinishBatchResult uploadSessionFinishBatchV2(List<UploadSessionFinishArg> entries) throws DbxApiException, DbxException This route helps you commit many files at once into a user's Dropbox. UseuploadSessionStart(com.dropbox.core.v2.files.UploadSessionStartArg)anduploadSessionAppendV2(UploadSessionCursor)to upload file contents. We recommend uploading many files in parallel to increase throughput. Once the file contents have been uploaded, rather than callinguploadSessionFinish(UploadSessionCursor,CommitInfo,String), use this route to finish all your upload sessions in a single request.UploadSessionStartArg.getClose()orUploadSessionAppendArg.getClose()needs to be true for the lastuploadSessionStart(com.dropbox.core.v2.files.UploadSessionStartArg)oruploadSessionAppendV2(UploadSessionCursor)call of each upload session. The maximum size of a file one can upload to an upload session is 2^41 - 2^22 (2,199,019,061,248) bytes. We allow up to 1000 entries in a single request. 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 https://www.dropbox.com/developers/reference/data-transport-limit.- Parameters:
entries- Commit information for each file in the batch. Must contain at most 1000 items, not contain anullitem, and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxApiExceptionDbxException
-
uploadSessionFinishBatchCheck
public UploadSessionFinishBatchJobStatus uploadSessionFinishBatchCheck(String asyncJobId) throws PollErrorException, DbxException Returns the status of an asynchronous job foruploadSessionFinishBatch(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 benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.PollErrorExceptionDbxException
-
uploadSessionStart
Upload sessions allow you to upload a single file in one or more requests, for example where the size of the file is greater than 150 MiB. This call starts a new upload session with the given data. You can then useuploadSessionAppendV2(UploadSessionCursor)oruploadSessionAppendBatch(List,String)to add more data, thenuploadSessionFinish(UploadSessionCursor,CommitInfo,String)oruploadSessionFinishBatchV2(List)to save all the data to a file in Dropbox. A single request should not upload more than 150 MiB. The maximum size of a file one can upload to an upload session is 2^41 - 2^22 (2,199,019,061,248) bytes. An upload session can be used for a maximum of 7 days. Attempting to use aUploadSessionStartResult.getSessionId()withuploadSessionAppendV2(UploadSessionCursor)or other upload session routes more than 7 days after its creation will returnUploadSessionLookupError.NOT_FOUND. 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 https://www.dropbox.com/developers/reference/data-transport-limit. By default, upload sessions require you to send content of the file in sequential order via consecutiveuploadSessionStart(com.dropbox.core.v2.files.UploadSessionStartArg),uploadSessionAppendV2(UploadSessionCursor), anduploadSessionFinish(UploadSessionCursor,CommitInfo,String)calls (or their batch variants). For better performance, you can optionally setUploadSessionStartArg.getSessionType()toUploadSessionType.CONCURRENTto start a concurrent upload session. Concurrent upload sessions may upload file data in concurrentuploadSessionAppendV2(UploadSessionCursor)requests, with a few caveats. After all of the requests are complete, finish the session withuploadSessionFinish(UploadSessionCursor,CommitInfo,String)as normal. You can not send data in auploadSessionStart(com.dropbox.core.v2.files.UploadSessionStartArg)oruploadSessionFinish(UploadSessionCursor,CommitInfo,String)call, only withuploadSessionAppendV2(UploadSessionCursor)oruploadSessionAppendBatch(List,String). Also, the length of the uploaded data in a call touploadSessionAppendV2(UploadSessionCursor)oruploadSessionAppendBatch(List,String)must be a multiple of 2^22 (4,194,304) bytes, except for the final append request withUploadSessionAppendArg.getClose()orUploadSessionAppendBatchArgEntry.getClose()set to true that may contain any remaining data.The default values for the optional request parameters will be used. See
UploadSessionStartBuilderfor more details.- Returns:
- Uploader used to upload the request body and finish request.
- Throws:
DbxException
-
uploadSessionStartBuilder
Upload sessions allow you to upload a single file in one or more requests, for example where the size of the file is greater than 150 MiB. This call starts a new upload session with the given data. You can then useuploadSessionAppendV2(UploadSessionCursor)oruploadSessionAppendBatch(List,String)to add more data, thenuploadSessionFinish(UploadSessionCursor,CommitInfo,String)oruploadSessionFinishBatchV2(List)to save all the data to a file in Dropbox. A single request should not upload more than 150 MiB. The maximum size of a file one can upload to an upload session is 2^41 - 2^22 (2,199,019,061,248) bytes. An upload session can be used for a maximum of 7 days. Attempting to use aUploadSessionStartResult.getSessionId()withuploadSessionAppendV2(UploadSessionCursor)or other upload session routes more than 7 days after its creation will returnUploadSessionLookupError.NOT_FOUND. 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 https://www.dropbox.com/developers/reference/data-transport-limit. By default, upload sessions require you to send content of the file in sequential order via consecutiveuploadSessionStart(com.dropbox.core.v2.files.UploadSessionStartArg),uploadSessionAppendV2(UploadSessionCursor), anduploadSessionFinish(UploadSessionCursor,CommitInfo,String)calls (or their batch variants). For better performance, you can optionally setUploadSessionStartArg.getSessionType()toUploadSessionType.CONCURRENTto start a concurrent upload session. Concurrent upload sessions may upload file data in concurrentuploadSessionAppendV2(UploadSessionCursor)requests, with a few caveats. After all of the requests are complete, finish the session withuploadSessionFinish(UploadSessionCursor,CommitInfo,String)as normal. You can not send data in auploadSessionStart(com.dropbox.core.v2.files.UploadSessionStartArg)oruploadSessionFinish(UploadSessionCursor,CommitInfo,String)call, only withuploadSessionAppendV2(UploadSessionCursor)oruploadSessionAppendBatch(List,String). Also, the length of the uploaded data in a call touploadSessionAppendV2(UploadSessionCursor)oruploadSessionAppendBatch(List,String)must be a multiple of 2^22 (4,194,304) bytes, except for the final append request withUploadSessionAppendArg.getClose()orUploadSessionAppendBatchArgEntry.getClose()set to true that may contain any remaining data.- Returns:
- Uploader builder for configuring request parameters and instantiating an uploader.
-
uploadSessionStartBatch
public UploadSessionStartBatchResult uploadSessionStartBatch(long numSessions) throws DbxApiException, DbxException Start a batch of upload sessions. SeeuploadSessionStart(com.dropbox.core.v2.files.UploadSessionStartArg). 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 https://www.dropbox.com/developers/reference/data-transport-limit.- Parameters:
numSessions- The number of upload sessions to start. Must be greater than or equal to 1 and be less than or equal to 1000.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxApiExceptionDbxException
-
uploadSessionStartBatch
public UploadSessionStartBatchResult uploadSessionStartBatch(long numSessions, UploadSessionType sessionType) throws DbxApiException, DbxException Start a batch of upload sessions. SeeuploadSessionStart(com.dropbox.core.v2.files.UploadSessionStartArg). 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 https://www.dropbox.com/developers/reference/data-transport-limit.- Parameters:
numSessions- The number of upload sessions to start. Must be greater than or equal to 1 and be less than or equal to 1000.sessionType- Type of upload session you want to start. If not specified, default isUploadSessionType.SEQUENTIAL.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.DbxApiExceptionDbxException
-