Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

CLI Nifi processor execution

avatar
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?

1 REPLY 1

avatar
Super Mentor

@Aban 

 

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"

 

Thanks,

Matt