- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
CLI Nifi processor execution
- Labels:
-
Apache NiFi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Created ‎10-30-2019 04:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
