Package org.imixs.archive.service.api
Class ArchiveRestService
- java.lang.Object
-
- org.imixs.archive.service.api.ArchiveRestService
-
@Path("/archive") @Produces({"text/html","application/xml","application/json","text/xml"}) public class ArchiveRestService extends ObjectThe ArchiveRestService provides a Rest API to be used by external clients.The API provides methods to read and write snapshot data into the cassandra cluster.
- Author:
- rsoika
-
-
Constructor Summary
Constructors Constructor Description ArchiveRestService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponsegetMetadata(String format)Loads the metadata from the archive and returns a HTML representation.javax.ws.rs.core.ResponsegetSnapshot(String id, String format)Loads a snapshot from the archive and returns a HTML representation.javax.ws.rs.core.ResponsegetSnapshotFileByMD5Checksum(String md5, String contentType)Returns a file attachment based on its MD5 Checksumjavax.ws.rs.core.ResponsegetSnapshotFileByName(String id, String file, javax.ws.rs.core.UriInfo uriInfo)Returns a file attachment located in the property $file of the specified snapshot
-
-
-
Method Detail
-
getSnapshot
@GET @Path("/snapshot/{id : ([0-9a-f]{8}-.*|[0-9a-f]{11}-.*)}") public javax.ws.rs.core.Response getSnapshot(@PathParam("id") String id, @QueryParam("format") String format)Loads a snapshot from the archive and returns a HTML representation.- Parameters:
id- - snapshot id- Returns:
- XMLDataCollection
-
getMetadata
@GET @Path("/metadata") public javax.ws.rs.core.Response getMetadata(@QueryParam("format") String format)Loads the metadata from the archive and returns a HTML representation.- Returns:
- XMLDataCollection
-
getSnapshotFileByMD5Checksum
@GET @Path("/md5/{md5}") @Produces("application/octet-stream") public javax.ws.rs.core.Response getSnapshotFileByMD5Checksum(@PathParam("md5") @Encoded String md5, @QueryParam("contentType") String contentType)Returns a file attachment based on its MD5 ChecksumThe query parameter 'contentType' can be added to specify the returned content type.
- Parameters:
md5- - md5 checksum to identify the file content- Returns:
-
getSnapshotFileByName
@GET @Path("/snapshot/{id}/file/{file}") public javax.ws.rs.core.Response getSnapshotFileByName(@PathParam("snapshotid") String id, @PathParam("file") @Encoded String file, @Context javax.ws.rs.core.UriInfo uriInfo)Returns a file attachment located in the property $file of the specified snapshotThe file name will be encoded. With a URLDecode the filename is decoded in different formats and searched in the file list. This is not a nice solution.
- Parameters:
uniqueid-- Returns:
-
-