@RestController
@RequestMapping(value="/servers/{serverName}/open-metadata/access-services/data-manager/users/{userId}/filesystems")
public class FilesResource
extends Object
| Constructor and Description |
|---|
FilesResource()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
GUIDListResponse |
addDataFileToCatalog(String serverName,
String userId,
DataFileRequestBody requestBody)
Add a simple asset description linked to a connection object for a file and to the folder structure implied in the path name.
|
GUIDListResponse |
addDataFileToCatalogFromTemplate(String serverName,
String userId,
String templateGUID,
TemplateRequestBody requestBody)
Add an asset description a file based on the content of a template object.
|
GUIDListResponse |
addDataFolderAssetToCatalog(String serverName,
String userId,
DataFolderRequestBody requestBody)
Creates a new folder asset that is identified as a data asset.
|
GUIDListResponse |
addDataFolderToCatalogFromTemplate(String serverName,
String userId,
String templateGUID,
TemplateRequestBody requestBody)
Creates a new folder asset that is identified as a data asset using a template.
|
VoidResponse |
archiveDataFileInCatalog(String serverName,
String userId,
String dataFileGUID,
ArchiveRequestBody requestBody)
Mark the file asset description in the catalog as archived.
|
VoidResponse |
archiveDataFolderInCatalog(String serverName,
String userId,
String dataFolderGUID,
ArchiveRequestBody requestBody)
Mark the data folder asset description in the catalog as archived.
|
VoidResponse |
attachDataFileAssetToFolder(String serverName,
String userId,
String folderGUID,
String fileGUID,
MetadataSourceRequestBody requestBody)
Link an existing file asset to a folder.
|
VoidResponse |
attachFolderToFileSystem(String serverName,
String userId,
String fileSystemGUID,
String folderGUID,
MetadataSourceRequestBody requestBody)
Links a folder to a file system.
|
GUIDListResponse |
createFolderStructureInCatalog(String serverName,
String userId,
String parentGUID,
PathNameRequestBody requestBody)
Creates a new folder asset for each element in the pathName that is linked from the file server capability entity.
|
VoidResponse |
deleteDataFileFromCatalog(String serverName,
String userId,
String dataFileGUID,
PathNameRequestBody requestBody)
Remove the file asset description from the catalog.
|
VoidResponse |
deleteDataFolderFromCatalog(String serverName,
String userId,
String dataFolderGUID,
PathNameRequestBody requestBody)
Remove the data folder asset description from the catalog.
|
VoidResponse |
detachDataFileAssetFromFolder(String serverName,
String userId,
String folderGUID,
String fileGUID,
MetadataSourceRequestBody requestBody)
Remove a link between a file asset and a folder.
|
VoidResponse |
detachFolderFromFileSystem(String serverName,
String userId,
String fileSystemGUID,
String folderGUID,
MetadataSourceRequestBody requestBody)
Removed the link between a folder and a file system.
|
DataFilesResponse |
findDataFilesByPathName(String serverName,
String userId,
int startingFrom,
int maxPageSize,
PathNameRequestBody requestBody)
Retrieve data files by the supplied wildcard name.
|
DataFileResponse |
getDataFileByGUID(String serverName,
String userId,
String dataFileGUID)
Retrieve a data file asset by its unique identifier (GUID).
|
DataFileResponse |
getDataFileByPathName(String serverName,
String userId,
PathNameRequestBody requestBody)
Retrieve a data file by its fully qualified path name.
|
FileSystemResponse |
getFileSystemByGUID(String serverName,
String userId,
String fileSystemGUID)
Retrieve a FileSystemProperties asset by its unique identifier (GUID).
|
FileSystemResponse |
getFileSystemByUniqueName(String serverName,
String userId,
String uniqueName)
Retrieve a FileSystemProperties asset by its unique name.
|
GUIDListResponse |
getFileSystems(String serverName,
String userId,
int startingFrom,
int maxPageSize)
Retrieve a list of defined FileSystems assets.
|
FileFolderResponse |
getFolderByGUID(String serverName,
String userId,
String folderGUID)
Retrieve a folder asset by its unique identifier (GUID).
|
FileFolderResponse |
getFolderByPathName(String serverName,
String userId,
PathNameRequestBody requestBody)
Retrieve a folder by its fully qualified path name.
|
GUIDListResponse |
getFolderFiles(String serverName,
String userId,
String folderGUID,
int startingFrom,
int maxPageSize)
Get the files inside a folder - both those that are nested and those that are linked.
|
GUIDListResponse |
getNestedFolders(String serverName,
String userId,
String parentFolderGUID,
int startingFrom,
int maxPageSize)
Return the list of folders nested inside a folder.
|
GUIDListResponse |
getTopLevelFolders(String serverName,
String userId,
String fileSystemGUID,
int startingFrom,
int maxPageSize)
Return the list of folders nested inside a folder.
|
VoidResponse |
moveDataFileInCatalog(String serverName,
String userId,
String folderGUID,
String fileGUID,
MetadataSourceRequestBody requestBody)
Move a data file from its current parent folder to a new parent folder - this changes the file's qualified name
but not its unique identifier (guid).
|
VoidResponse |
moveDataFolderInCatalog(String serverName,
String userId,
String folderGUID,
String dataFolderGUID,
MetadataSourceRequestBody requestBody)
Move a data folder from its current parent folder to a new parent folder - this changes the folder's qualified name
but not its unique identifier (guid).
|
VoidResponse |
updateDataFileInCatalog(String serverName,
String userId,
String dataFileGUID,
boolean isMergeUpdate,
DataFileRequestBody requestBody)
Update the file asset description in the catalog.
|
VoidResponse |
updateDataFolderInCatalog(String serverName,
String userId,
String dataFolderGUID,
boolean isMergeUpdate,
DataFolderRequestBody requestBody)
Update the DataFolder asset description in the catalog.
|
@PostMapping(path="/folders/parent/{parentGUID}")
public GUIDListResponse createFolderStructureInCatalog(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String parentGUID,
@RequestBody
PathNameRequestBody requestBody)
serverName - name of calling serveruserId - calling userparentGUID - root object to connect the folder torequestBody - pathname of the folder (or folders)@PostMapping(path="/{fileSystemGUID}/folders/{folderGUID}/attach")
public VoidResponse attachFolderToFileSystem(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String fileSystemGUID,
@PathVariable
String folderGUID,
@RequestBody(required=false)
MetadataSourceRequestBody requestBody)
serverName - name of calling serveruserId - calling userfileSystemGUID - unique identifier of the file system in the catalogfolderGUID - unique identifier of the folder in the catalogrequestBody - external source identifiers - or null for local@PostMapping(path="/{fileSystemGUID}/folders/{folderGUID}/detach")
public VoidResponse detachFolderFromFileSystem(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String fileSystemGUID,
@PathVariable
String folderGUID,
@RequestBody(required=false)
MetadataSourceRequestBody requestBody)
serverName - name of calling serveruserId - calling userfileSystemGUID - unique identifier of the file system in the catalogfolderGUID - unique identifier of the folder in the catalogrequestBody - external source identifiers - or null for local@PostMapping(path="/data-files") public GUIDListResponse addDataFileToCatalog(@PathVariable String serverName, @PathVariable String userId, @RequestBody DataFileRequestBody requestBody)
serverName - name of calling serveruserId - calling user (assumed to be the owner)requestBody - properties for the asset@PostMapping(path="/data-files/from-template/{templateGUID}")
public GUIDListResponse addDataFileToCatalogFromTemplate(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String templateGUID,
@RequestBody
TemplateRequestBody requestBody)
serverName - name of calling serveruserId - calling user (assumed to be the owner)templateGUID - unique identifier of the file asset to copyrequestBody - override properties for the asset@PostMapping(path="/data-files/{dataFileGUID}")
public VoidResponse updateDataFileInCatalog(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String dataFileGUID,
@RequestParam
boolean isMergeUpdate,
@RequestBody
DataFileRequestBody requestBody)
serverName - name of calling serveruserId - calling user (assumed to be the owner)dataFileGUID - unique identifier of the data file assetisMergeUpdate - should the supplied properties completely override the existing properties or augment them?requestBody - properties for the asset@PostMapping(path="/data-files/{dataFileGUID}/archive")
public VoidResponse archiveDataFileInCatalog(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String dataFileGUID,
@RequestBody
ArchiveRequestBody requestBody)
serverName - name of calling serveruserId - calling user (assumed to be the owner)dataFileGUID - unique identifier of the data file assetrequestBody - properties to help locate the archive copy@PostMapping(path="/data-files/{dataFileGUID}/delete")
public VoidResponse deleteDataFileFromCatalog(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String dataFileGUID,
@RequestBody
PathNameRequestBody requestBody)
serverName - name of calling serveruserId - calling user (assumed to be the owner)dataFileGUID - unique identifier of the data file assetrequestBody - full pathname for the asset@PostMapping(path="/data-folders") public GUIDListResponse addDataFolderAssetToCatalog(@PathVariable String serverName, @PathVariable String userId, @RequestBody DataFolderRequestBody requestBody)
serverName - name of calling serveruserId - calling userrequestBody - pathname of the data folder@PostMapping(path="/data-folders/from-template/{templateGUID}")
public GUIDListResponse addDataFolderToCatalogFromTemplate(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String templateGUID,
@RequestBody
TemplateRequestBody requestBody)
serverName - name of calling serveruserId - calling user (assumed to be the owner)templateGUID - unique identifier of the file asset to copyrequestBody - override properties for the asset@PostMapping(path="/data-folders/{dataFolderGUID}")
public VoidResponse updateDataFolderInCatalog(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String dataFolderGUID,
@RequestParam
boolean isMergeUpdate,
@RequestBody
DataFolderRequestBody requestBody)
serverName - name of calling serveruserId - calling user (assumed to be the owner)dataFolderGUID - unique identifier of the data folder assetisMergeUpdate - should the supplied properties completely override the existing properties or augment them?requestBody - properties for the asset@PostMapping(path="/data-folders/{dataFolderGUID}/archive")
public VoidResponse archiveDataFolderInCatalog(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String dataFolderGUID,
@RequestBody
ArchiveRequestBody requestBody)
serverName - name of calling serveruserId - calling user (assumed to be the owner)dataFolderGUID - unique identifier of the data file assetrequestBody - properties to help locate the archive copy@PostMapping(path="/data-folders/{dataFolderGUID}/delete")
public VoidResponse deleteDataFolderFromCatalog(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String dataFolderGUID,
@RequestBody
PathNameRequestBody requestBody)
serverName - name of calling serveruserId - calling user (assumed to be the owner)dataFolderGUID - unique identifier of the data file assetrequestBody - full pathname for the asset@PostMapping(path="/folders/{folderGUID}/data-files/{fileGUID}/attach")
public VoidResponse attachDataFileAssetToFolder(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String folderGUID,
@PathVariable
String fileGUID,
@RequestBody(required=false)
MetadataSourceRequestBody requestBody)
serverName - name of calling serveruserId - calling userfolderGUID - unique identifier of the folderfileGUID - unique identifier of the filerequestBody - external source identifiers - or null for local@PostMapping(path="/folders/{folderGUID}/data-files/{fileGUID}/detach")
public VoidResponse detachDataFileAssetFromFolder(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String folderGUID,
@PathVariable
String fileGUID,
@RequestBody(required=false)
MetadataSourceRequestBody requestBody)
serverName - name of calling serveruserId - calling userfolderGUID - unique identifier of the folderfileGUID - unique identifier of the filerequestBody - external source identifiers - or null for local@PostMapping(path="/folders/{folderGUID}/data-files/{fileGUID}/move-to")
public VoidResponse moveDataFileInCatalog(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String folderGUID,
@PathVariable
String fileGUID,
@RequestBody(required=false)
MetadataSourceRequestBody requestBody)
serverName - name of calling serveruserId - calling userfolderGUID - new parent folderfileGUID - unique identifier of the file to moverequestBody - null request body to satisfy REST protocol@PostMapping(path="/folders/{folderGUID}/data-folders/{dataFolderGUID}/move-to")
public VoidResponse moveDataFolderInCatalog(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String folderGUID,
@PathVariable
String dataFolderGUID,
@RequestBody(required=false)
MetadataSourceRequestBody requestBody)
serverName - name of calling serveruserId - calling userfolderGUID - new parent folderdataFolderGUID - unique identifier of the data folder to moverequestBody - null request body to satisfy REST protocol@GetMapping(path="/filesystems/{fileSystemGUID}")
public FileSystemResponse getFileSystemByGUID(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String fileSystemGUID)
serverName - name of calling serveruserId - calling userfileSystemGUID - unique identifier used to locate the file system@GetMapping(path="/filesystems/by-name/{uniqueName}")
public FileSystemResponse getFileSystemByUniqueName(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String uniqueName)
serverName - name of calling serveruserId - calling useruniqueName - unique name for the filesystem@GetMapping(path="/filesystems") public GUIDListResponse getFileSystems(@PathVariable String serverName, @PathVariable String userId, @RequestParam int startingFrom, @RequestParam int maxPageSize)
serverName - name of calling serveruserId - calling userstartingFrom - starting point in the listmaxPageSize - maximum number of results@GetMapping(path="/folders/{folderGUID}")
public FileFolderResponse getFolderByGUID(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String folderGUID)
serverName - name of calling serveruserId - calling userfolderGUID - unique identifier used to locate the folder@PostMapping(path="/folders/by-path-name") public FileFolderResponse getFolderByPathName(@PathVariable String serverName, @PathVariable String userId, @RequestBody PathNameRequestBody requestBody)
serverName - name of calling serveruserId - calling userrequestBody - path name@GetMapping(path="/{fileSystemGUID}/folders")
public GUIDListResponse getTopLevelFolders(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String fileSystemGUID,
@RequestParam
int startingFrom,
@RequestParam
int maxPageSize)
serverName - name of calling serveruserId - calling userfileSystemGUID - unique identifier of the anchor folder or FilesystemstartingFrom - starting point in the listmaxPageSize - maximum number of results@GetMapping(path="/folders/{parentFolderGUID}/folders")
public GUIDListResponse getNestedFolders(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String parentFolderGUID,
@RequestParam
int startingFrom,
@RequestParam
int maxPageSize)
serverName - name of calling serveruserId - calling userparentFolderGUID - unique identifier of the parent folderstartingFrom - starting point in the listmaxPageSize - maximum number of results@GetMapping(path="/folders/{folderGUID}/data-files")
public GUIDListResponse getFolderFiles(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String folderGUID,
@RequestParam
int startingFrom,
@RequestParam
int maxPageSize)
serverName - name of calling serveruserId - calling userfolderGUID - unique identifier of the anchor folderstartingFrom - starting point in the listmaxPageSize - maximum number of results@GetMapping(path="/data-files/{dataFileGUID}")
public DataFileResponse getDataFileByGUID(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String dataFileGUID)
serverName - name of calling serveruserId - calling userdataFileGUID - unique identifier used to locate the folder@PostMapping(path="/data-files/by-path-name") public DataFileResponse getDataFileByPathName(@PathVariable String serverName, @PathVariable String userId, @RequestBody PathNameRequestBody requestBody)
serverName - name of calling serveruserId - calling userrequestBody - path name@PostMapping(path="/data-files/by-search-path-name") public DataFilesResponse findDataFilesByPathName(@PathVariable String serverName, @PathVariable String userId, @RequestParam int startingFrom, @RequestParam int maxPageSize, @RequestBody PathNameRequestBody requestBody)
serverName - name of calling serveruserId - calling userstartingFrom - starting point in the listmaxPageSize - maximum number of resultsrequestBody - path nameCopyright © 2018–2021 LF AI & Data Foundation. All rights reserved.