Class ArchiveRestService


  • @Path("/archive")
    @Produces({"text/html","application/xml","application/json","text/xml"})
    public class ArchiveRestService
    extends Object
    The 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 Detail

      • ArchiveRestService

        public ArchiveRestService()
    • 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 Checksum

        The 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 snapshot

        The 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: