StorageApi
getFilePath
Description...
StorageApi.getFilePath(String fileId)Parameters
fileIdReturns
The file path for the input File IDgetFileIdByPath
Description...
StorageApi.getFileIdByPath(String absoluteFilePath)Parameters
absoluteFilePathReturns
The File ID using file pathgetFolderPath
This API provides the folder path
StorageApi.getFolderPath(String folderId)Parameters
folderIdReturns
Folder path for the input folder IDgetSignedUrl
Description...
StorageApi.getSignedUrl(String filePath)
or
StorageApi.getSignedUrl(String filePath, long duration, TimeUnit unit)
or
StorageApi.getSignedUrl(String bucketName, String filePath)
or
StorageApi.getSignedUrl(String bucketName, String filePath, long duration, TimeUnit unit)Parameters
filePath
duration
unit
bucketNameReturns
String signed URL copyFileToBucket
Copy file to bucket
StorageApi.copyFileToBucket(String sourceFilePath, String targetFilePath)
or
StorageApi.copyFileToBucket(String bucketName, String sourceFilePath, String targetFilePath)
or
StorageApi.copyFileToBucket(String bucketName, String serviceAccountPropName,
String sourceFilePath, String targetFilePath)
Parameters
sourceFilePath
targetFilePath
bucketName
serviceAccountPropNameReturns
ResultcopyFileFromBucket
Copy file from bucket
StorageApi.copyFileFromBucket(String sourceFilePath, String targetFilePath)
or
Storageapi.copyFileFromBucket(String bucketName, String sourceFilePath, String targetFilePath)
or
Storageapi.copyFileFromBucket(String bucketName, String serviceAccountPropName,
String sourceFilePath, String targetFilePath)Parameters
sourceFilePath
targetFilePath
bucketName
serviceAccountPropNameReturns
ResultcopyFileWithinBucket
Copy file to new location within bucket
StorageApi.copyFileWithinBucket(String sourceFilePath, String targetFilePath)
or
StorageApi.copyFileWithinBucket(String sourceFilePath, String targetFilePath, boolean makeCopy)
or
StorageApi.copyFileWithinBucket(String bucketName, String sourceFilePath, String targetFilePath)
or
StorageApi.copyFileWithinBucket(String bucketName, String sourceFilePath, String targetFilePath, boolean makeCopy)Parameters
sourceFilePath
targetFilePath
makeCopy
bucketNameReturns
ResultwriteToBucket
Write data to bucket
StorageApi.writeToBucket(byte[] bytes, String targetFilePath, String contentType)
or
StorageApi.writeToBucket(String bucketName, byte[] bytes, String targetFilePath, String contentType)Parameters
bytes
targetFilePath
contentType
bucketNameReturns
ResultreadFromBucket
Read file from bucket
StorageApi.readFromBucket(String sourceFilePath)
or
StorageApi.readFromBucket(String bucketName, String sourceFilePath)Parameters
sourceFilePath
bucketNameReturns
ResultlistFiles
Get list of file names for the bucket folder.
StorageApi.listFiles(String pathName, Boolean versioned)
or
StorageApi.listFiles(String bucketName, String pathName, Boolean versioned)
or
StorageApi.listFiles(String bucketName, String pathName,
Boolean versioned, String pageToken, Integer pageSize)Parameters
pathName
versioned
bucketName
pageToken
pageSizeReturns
ResultsaveFileObject
Save file object
StorageApi.saveFileObject(Map<String, Object> fileObject)Parameters
fileObjectReturns
Objectexists
Check if file exists.
StorageApi.exists(String filePath)Parameters
filePathReturns
BooleangetFileList
Get list of files in folder
StorageApi.getFileList(long folderId, String orderBy)Parameters
folderId
orderByReturns
List<Map<String, Object>>getFilesPages
Get files pages
StorageApi.getFilesPage(String bucketName, String pathName,
Boolean versioned)
or
StorageApi.getFilesPage(String bucketName, String pathName,
Boolean versioned, String pageToken, Integer pageSize)Parameters
bucketName
pathName
versioned
pageToken
pageSizeReturns
FilesPagegetBucketName
Get default bucket name.
StorageApi.getBucketName()Parameters
NoneReturns
StringshareWithTenants
Share with tenants
StorageApi.shareWithTenants(Map<String, Object> params)Parameters
paramsReturns
ObjectcopyLargeFileToBucket
copy large file to bucket
StorageApi.copyLargeFileToBucket(String sourceFilePath, String targetFilePath)
or
StorageApi.copyLargeFileToBucket(String bucketName, String sourceFilePath,
String targetFilePath)
or
StorageApi.copyLargeFileToBucket((String bucketName, String serviceAccountPropName,
String sourceFilePath, String targetFilePath)Parameters
sourceFilePath
targetFilePath
bucketName
serviceAccountPropNameReturns
ResultmakePublic
make a file public
StorageApi.makePublic(String bucketName, String filePath)
or
StorageApi.makePublic(String bucketName, String serviceAccountPropName,
String filePath)Parameters
bucketName
filePath
serviceAccountPropNameReturns
ResultgetContent
Get content of a doc
StorageApi.getContent(Map<String, Object> doc)Parameters
docReturns
ObjectgetBucketPath
Get bucket path using file object
StorageApi.getBucketPath(Map<String, Object> fileObject)Parameters
fileObjectReturns
StringgetBucketPath
Get path using fileId
StorageApi.getBucketPath(String fileId)Parameters
fileIdReturns
StringLast updated
Was this helpful?