code: @Path("/{dsID}")
      @GET
      public Response getDatastreamProfile(@PathParam(RestParam.PID) String pid,
                                           @PathParam(RestParam.DSID) String dsID,
                                           @QueryParam(RestParam.AS_OF_DATE_TIME) String dateTime,
                                           @QueryParam(RestParam.FORMAT) @DefaultValue(HTML) String format,
                                           @QueryParam(RestParam.VALIDATE_CHECKSUM) @DefaultValue("false") boolean validateChecksum,
                                           @QueryParam(RestParam.FLASH) @DefaultValue("false") boolean flash) {
          try {
              Date asOfDateTime = DateUtility.parseDateOrNull(dateTime);
              Context context = getContext();
              Datastream dsProfile =
                      m_management.getDatastream(context, pid, dsID, asOfDateTime);
  
              if (dsProfile == null) {
                  return Response
                          .status(Status.NOT_FOUND)
                          .type("text/plain")
                          .entity("No datastream could be found. Either there is no datastream for "
                                  + "the digital object \""
                                  + pid
                                  + "\" with datastream ID of \""
                                  + dsID
                                  + "\"  OR  there are no datastreams that match the specified "
                                  + "date/time value of \"" + dateTime + "\".")
                          .build();
              }
  
              ReadableCharArrayWriter out = new ReadableCharArrayWriter(512);
              DefaultSerializer
                  .datastreamProfileToXML(
                      pid,
                      dsID,
                      dsProfile,
                      asOfDateTime,
                      validateChecksum,
                      out);
  
              out.close();
              MediaType mime = RestHelper.getContentType(format);
  
              if (TEXT_HTML.isCompatible(mime)) {
                  Reader reader = out.toReader();
                  out = new ReadableCharArrayWriter(512);
                  transform(reader, "management/viewDatastreamProfile.xslt", out);
              }
  
              return Response.ok(out.toReader(), mime).build();
          } catch (Exception ex) {
              return handleException(ex, flash);
          }
      }
docs: <p>Invoke API-M.getDatastream(context, pid, dsID, asOfDateTime)
  </p><p>
  GET /objects/{pid}/datastreams/{dsID} ? asOfDateTime &amp;
  validateChecksum=true|false</p>