@Path(value="/data/")
public interface RestDataspace
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
create(String sessionId,
String dataspacePath,
String pathname,
String mimeType)
Create an empty file or folder in the specified location in the dataspace.
|
javax.ws.rs.core.Response |
delete(String sessionId,
String dataspace,
String pathname,
List<String> includes,
List<String> excludes)
Delete file(s) from the specified location in the dataspace.
|
javax.ws.rs.core.Response |
metadata(String sessionId,
String dataspacePath,
String pathname)
Retrieve metadata of file or folder in the location specified in dataspace.
|
javax.ws.rs.core.Response |
retrieve(String sessionId,
String headerAcceptEncoding,
String dataspace,
String pathname,
String component,
List<String> includes,
List<String> excludes,
String encoding,
String token)
Retrieves single or multiple files from specified location of the server.
|
javax.ws.rs.core.Response |
store(String sessionId,
String encoding,
String dataspace,
String pathname,
InputStream is)
Upload a file or archive containing multiple files to the specified location in the dataspace.
|
@PUT @Path(value="/{dataspace}/{path-name:.*}") javax.ws.rs.core.Response store(@HeaderParam(value="sessionid") String sessionId, @HeaderParam(value="Content-Encoding") String encoding, @PathParam(value="dataspace") String dataspace, @PathParam(value="path-name") String pathname, InputStream is) throws NotConnectedRestException, PermissionRestException
http://<rest-server-path>/data/<dataspace>/<path-name>
Example:
http://localhost:8080/rest/data/user/my-files/my-text-file.txt
sessionId
- a valid session iddataspace
- can have two possible values, 'user' or 'global',
depending on the target DATASPACEpathname
- location of the file or folder to retrieveencoding
- encoding of the content, can be "gzip", "zip", empty or an arbitrary format which will be handled in the same way as empty.NotConnectedRestException
PermissionRestException
@GET @Path(value="/{dataspace}/{path-name:.*}") @Produces(value="*/*") javax.ws.rs.core.Response retrieve(@HeaderParam(value="sessionid") String sessionId, @HeaderParam(value="Accept-Encoding") String headerAcceptEncoding, @PathParam(value="dataspace") String dataspace, @PathParam(value="path-name") String pathname, @QueryParam(value="comp") String component, @QueryParam(value="includes") List<String> includes, @QueryParam(value="excludes") List<String> excludes, @QueryParam(value="encoding") String encoding, @QueryParam(value="token") String token) throws NotConnectedRestException, PermissionRestException
http://<rest-server-path>/data/<dataspace>/<path-name>
Example:
http://localhost:8080/rest/data/user/my-files/my-text-file.txt
Notes:
ListFile
type object will be returned in JSON format. It will contain a list of files and folder contained in the selected
path, equivalent to a directory listing.
sessionId
- a valid session idheaderAcceptEncoding
- the accepted encoding supported by the client, can be "*", "gzip", "zip", "identity" or empty. When the query parameter encoding
is specified, it is overridden by encoding
.dataspace
- can have two possible values, 'user' or 'global',
depending on the target DATASPACEpathname
- location of the file or folder to retrievecomponent
- can either be 'list' or empty. If 'list' is used, the response will contain in JSON format the list of files and folder presents at specified location, equivalent to a directory listing.includes
- a list of inclusion directivesexcludes
- a list of exclusion directivesencoding
- the accepted encoding supported by the client, can be "*", "gzip", "zip", "identity" or empty. It overrides the accepted encoding specified in headerAcceptEncoding
.NotConnectedRestException
PermissionRestException
@DELETE @Path(value="/{dataspace}/{path-name:.*}") javax.ws.rs.core.Response delete(@HeaderParam(value="sessionid") String sessionId, @PathParam(value="dataspace") String dataspace, @PathParam(value="path-name") String pathname, @QueryParam(value="includes") List<String> includes, @QueryParam(value="excludes") List<String> excludes) throws NotConnectedRestException, PermissionRestException
http://<rest-server-path>/data/<dataspace>/<path-name>
Example:
http://localhost:8080/rest/data/user/my-files/my-text-file.txt
Notes:
sessionId
- a valid session iddataspace
- can have two possible values, 'user' or 'global',
depending on the target DATASPACEpathname
- location of the file or folder to deleteincludes
- a list of inclusion directivesexcludes
- a list of exclusion directivesNotConnectedRestException
PermissionRestException
@HEAD @Path(value="/{dataspace}/{path-name:.*}") javax.ws.rs.core.Response metadata(@HeaderParam(value="sessionid") String sessionId, @PathParam(value="dataspace") String dataspacePath, @PathParam(value="path-name") String pathname) throws NotConnectedRestException, PermissionRestException
http://<rest-server-path>/data/<dataspace>/<path-name>
Example:
http://localhost:8080/rest/data/user/my-files/my-text-file.txt
sessionId
- a valid session iddataspacePath
- can have two possible values, 'user' or 'global',
depending on the target DATASPACEpathname
- location of the file or folder to retrieve metadataNotConnectedRestException
PermissionRestException
@POST @Path(value="/{dataspace}/{path-name:.*}") javax.ws.rs.core.Response create(@HeaderParam(value="sessionid") String sessionId, @PathParam(value="dataspace") String dataspacePath, @PathParam(value="path-name") String pathname, @FormParam(value="mimetype") String mimeType) throws NotConnectedRestException, PermissionRestException
http://<rest-server-path>/data/<dataspace>/<path-name>
Example:
http://localhost:8080/rest/data/user/my-files/my-text-file.txt
sessionId
- a valid session iddataspacePath
- can have two possible values, 'user' or 'global',
depending on the target DATASPACEpathname
- location of the file or folder to createmimeType
- used to decide whether a file ('application/file') or folder ('application/folder') must be createdNotConnectedRestException
PermissionRestException