code: @Path("/{dsID}/history")
      @GET
      public Response getDatastreamHistory(@PathParam(RestParam.PID) String pid,
                                           @PathParam(RestParam.DSID) String dsID,
                                           @QueryParam(RestParam.FORMAT) @DefaultValue(HTML) String format,
                                           @QueryParam(RestParam.FLASH) @DefaultValue("false") boolean flash) {
          try {
              Context context = getContext();
              Datastream[] datastreamHistory =
                      m_management.getDatastreamHistory(context, pid, dsID);
  
              if (datastreamHistory == null || datastreamHistory.length == 0) {
                  return Response
                          .status(Status.NOT_FOUND)
                          .type("text/plain")
                          .entity("No datastream history could be found. There is no datastream history for "
                                  + "the digital object \""
                                  + pid
                                  + "\" with datastream ID of \"" + dsID).build();
  
              }
  
              ReadableCharArrayWriter out = new ReadableCharArrayWriter(1024);
              getSerializer(context).datastreamHistoryToXml(
                      pid,
                      dsID,
                      datastreamHistory,
                      out);
              out.close();
  
              MediaType mime = RestHelper.getContentType(format);
  
              if (TEXT_HTML.isCompatible(mime)) {
                  Reader reader = out.toReader();
                  out = new ReadableCharArrayWriter(1024);
                  transform(reader, "management/viewDatastreamHistory.xslt", out);
                  out.close();
              }
              
              return Response.ok(out.toReader(), mime).build();
          } catch (Exception e) {
              return handleException(e, flash);
          }
      }
docs: Invoke API-M.getDatastreamHistory(context,pid,dsId) GET
  /objects/{pid}/datastreams/{dsID}/history
  
  @param pid
  the PID of the digital object
  @param dsID
  the ID of the datastream
  @param format
  the desired format. Either html or "xml"
  @return the response, either in XML or XHTML format