Created 08-10-2023 07:14 AM
Hello,
how do I properly use the nifi-api to create flowfile from a file? I tried to do what is described here: https://nifi.apache.org/docs/nifi-docs/rest-api/index.html under 'Data transfer'
I've tried to use a simple curl command to transfer a file as flowfile to an input port as follows:
curl -X POST -F 'file=@Documents/Nifi_Docs/example.txt' http://10.0.1.111:8080/nifi-api/data-transfer/input-ports/dac743ae-0189-1000-c6a6-efd211a162d1/trans...
As response I get a 415 error Unsupported Media Type. What is the supported media type then? Anyone tried this before? What is the transaction id good for? I just put 1010 as a random number.
I also tried sending from postman
Created 08-10-2023 11:12 AM
Want to get a detailed solution you have to login/registered on the community
Register/LoginCreated 08-10-2023 11:12 AM
Want to get a detailed solution you have to login/registered on the community
Register/LoginCreated 08-11-2023 06:05 AM
Ok, thanks for the info. I thought it would have been an elegant solution to be able to use the nifi-api to transfer files directly to a port. I have tried ListenHTTP, which suits my task perfectly.