code: public void addInstance( String applicationName, String parentInstancePath, Instance instance ) throws ApplicationWsException {
  		this.logger.finer( "Adding an instance to the application " + applicationName + "..." );
  
  		WebResource path = this.resource.path( UrlConstants.APP ).path( applicationName ).path( "instances" );
  		if( parentInstancePath != null )
  			path = path.queryParam( "instance-path", parentInstancePath );
  
  		ClientResponse response = this.wsClient.createBuilder( path )
  				.accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON )
  				.post( ClientResponse.class, instance );
  
  		handleResponse( response );
  		this.logger.finer( String.valueOf( response.getStatusInfo()));
  	}
docs: Adds an instance into an application.
  @param applicationName the application name
  @param parentInstancePath the path of the parent instance (null to create a root instance)
  @param instance the instance to add
  @throws ApplicationWsException if a problem occurred with the instance management