Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

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?

1 REPLY 1

Master Guru

@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

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.