@POST
   @Path("delete/{repository}/{workspace}/{path:.*}")
   public Response deleteScript(@PathParam("repository") String repository, @PathParam("workspace") String workspace,
      @PathParam("path") String path)
   {
      Session ses = null;
      try
      {
         ses =
            sessionProviderService.getSessionProvider(null).getSession(workspace,
               repositoryService.getRepository(repository));
         ses.getItem("/" + path).remove();
         ses.save();
         return Response.status(Response.Status.NO_CONTENT).build();
      }
      catch (PathNotFoundException e)
      {
         String msg = "Path " + path + " does not exists";
         LOG.error(msg);
         return Response.status(Response.Status.NOT_FOUND).entity(msg).entity(MediaType.TEXT_PLAIN).build();
      }
      catch (Exception e)
      {
         LOG.error(e.getMessage(), e);
         return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getMessage())
            .type(MediaType.TEXT_PLAIN).build();
      }
      finally
      {
         if (ses != null)
         {
            ses.logout();
         }
      }
   }
@ POST @ Path ( "delete/{repository}/{workspace}/{path:.*}" ) public Response deleteScript ( @ PathParam ( "repository" ) String repository , @ PathParam ( "workspace" ) String workspace , @ PathParam ( "path" ) String path ) { Session ses = null ; try { ses = sessionProviderService . getSessionProvider ( null ) . getSession ( workspace , repositoryService . getRepository ( repository ) ) ; ses . getItem ( "/" + path ) . remove ( ) ; ses . save ( ) ; return Response . status ( Response . Status . NO_CONTENT ) . build ( ) ; } catch ( PathNotFoundException e ) { String msg = "Path " + path + " does not exists" ; LOG . error ( msg ) ; return Response . status ( Response . Status . NOT_FOUND ) . entity ( msg ) . entity ( MediaType . TEXT_PLAIN ) . build ( ) ; } catch ( Exception e ) { LOG . error ( e . getMessage ( ) , e ) ; return Response . status ( Response . Status . INTERNAL_SERVER_ERROR ) . entity ( e . getMessage ( ) ) . type ( MediaType . TEXT_PLAIN ) . build ( ) ; } finally { if ( ses != null ) { ses . logout ( ) ; } } }
Remove node that contains groovy script.

@param repository repository name
@param workspace workspace name
@param path JCR path to node that contains script
@LevelAPI Provisional