code: @Path("/{dsID}")
      @DELETE
      @Produces(MediaType.APPLICATION_JSON)
      public Response deleteDatastream(@PathParam(RestParam.PID) String pid,
                                       @PathParam(RestParam.DSID) String dsID,
                                       @QueryParam(RestParam.START_DT) String startDT,
                                       @QueryParam(RestParam.END_DT) String endDT,
                                       @QueryParam(RestParam.LOG_MESSAGE) String logMessage,
                                       @QueryParam(RestParam.FLASH) @DefaultValue("false") boolean flash) {
  
          try {
              Context context = getContext();
              Date startDate = DateUtility.parseDateOrNull(startDT);
              Date endDate = DateUtility.parseDateOrNull(endDT);
              Date[] purged = m_management.purgeDatastream(context,
                                          pid,
                                          dsID,
                                          startDate,
                                          endDate,
                                          logMessage);
  
              // convert purged into a String[] so we can return it as a JSON array
              List<String> results = new ArrayList<String>(purged.length);
              for (Date d : purged) {
                  results.add(DateUtility.convertDateToXSDString(d));
              }
              return Response.ok(m_mapper.writeValueAsString(results)).build();
          } catch (Exception ex) {
              return handleException(ex, flash);
          }
      }
docs: <p>Invoke API-M.purgeDatastream
  </p><p>
  DELETE /objects/{pid}/datastreams/{dsID} ? startDT endDT logMessage</p>