Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

CLI Nifi processor execution

CLI Nifi processor execution

New Contributor

I am trying to execute my Nifi processor using the the below mentioned command:

curl -i -X PUT -d '{"id":"d68bb8c4-085c-369e-02bb-e1a610095a30","state":"RUNNING"}' localhost:8080/nifi-api/flow/process-groups/d68bb8c4-085c-369e-02bb-e1a610095a30

but I am getting this error:

HTTP/1.1 415 Unsupported Media Type
Date: Wed, 30 Oct 2019 07:21:46 GMT
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self'
X-XSS-Protection: 1; mode=block
Content-Type: text/plain
Vary: Accept-Encoding
Content-Length: 31
Server: Jetty(9.4.11.v20180605)

HTTP 415 Unsupported Media Type


Can someone please help me understand this?


Re: CLI Nifi processor execution

Master Guru



The response is telling you that the data passed to the endpoint is not "Content-Type: text/plain".  By default curl will use "text/plain" if you do not specify a different type via a header.


try adding the below to your curl command to set your content type to "application/json"

-H "Content-Type: application/json"




Don't have an account?
Coming from Hortonworks? Activate your account here