I'm still learning programming Apache NiFi using java and I wonder if anyone could explain to me how to instantiate a NiFi platform using NiFi REST APIs & java? Any solution to create processor using Apache NiFi REST API and java.
UPDATES So I was trying this out :
import java.io.IOException;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.client.HttpClients;
public class HttpClientTest {
public static void main(String[] args) throws IOException {
CloseableHttpClient client = HttpClients.createDefault();
HttpPost httpPost = new HttpPost("http://localhost:8080/nifi-api/process-groups/5f577c63-0170-1000-deb5-b53c37656ad4/template-instance");
CloseableHttpResponse response = client.execute(httpPost);
System.out.println(response.getStatusLine());
client.close();
}
}
