code: public void undeployAll( String applicationName, String instancePath )
  	throws ApplicationWsException {
  
  		this.logger.finer( "Undeploying instances in " + applicationName + " from instance = " + instancePath  );
  
  		WebResource path = this.resource.path( UrlConstants.APP ).path( applicationName ).path( "undeploy-all" );
  		if( instancePath != null )
  			path = path.queryParam( "instance-path", instancePath );
  
  		ClientResponse response = this.wsClient.createBuilder( path )
  						.accept( MediaType.APPLICATION_JSON )
  						.post( ClientResponse.class );
  
  		handleResponse( response );
  		this.logger.finer( String.valueOf( response.getStatusInfo()));
  	}
docs: Undeploys several instances at once.
  @param applicationName the application name
  @param instancePath the path of the instance to undeploy (null for all the application instances)
  @throws ApplicationWsException if something went wrong