Created 11-22-2025 01:34 PM
When I try to run a query against the nifi 2.5.0 API to get info about provenance activities, it seems to be quite difficult.
I installed NIfi on my PC with no modifications and all default settings, and just use the default user and password that's created when you install it.
I run this in my local windows CMD window and get "unknown error" :
curl --insecure -X DELETE -H "Authorization: Bearer <my token> " https://localhost:8443/nifi-api/provenance/queries
Then I run this and get :
curl --insecure -X DELETE -H "Authorization: Bearer <token>" https://localhost:8443/nifi-api/provenance/queries > test.txt
In text.txt file I get :
"An unexpected error has occurred. Please check the logs for additional details."
I'm starting to think the Provenance part of the API might be broken as it shouldn't be this hard?
I ran other API queries and they work fine.
What I'm trying to do is get a list of all files that have passed through my small local nifi installation so we can track what files have moved through nifi and when, as a form of monitoring.
Any help appreciated!
Thanks in advance.
Created 11-23-2025 10:34 PM
@zzzz77, Welcome to our community! To help you get the best possible answer, I have tagged in our NiFi experts @MattWho @haridjh , who may be able to assist you further.
Please feel free to provide any additional information or details about your query. We hope that you will find a satisfactory solution to your question.
Regards,
Vidya Sargur,Created 12-02-2025 07:20 AM
@zzzz77
When you executed your curl commands, did you check both the nifi-app.log and nifi-user.log for any ERROR or WARN log output that would provide more detail on the exception.
The Apache NIFi 2.x Provenance rest-api endpoint request should look more like this:
curl 'https://<HOSTNAME>:<PORT>/nifi-api/provenance' \
-H 'accept: application/json, text/plain, */*' \
-H 'content-type: application/json' \
-H 'Authorization:Bearer <TOKEN>' \
--data-raw '{"provenance":{"request":{"incrementalResults":false,"maxResults":1000,"summarize":true}}}' \
--insecure
Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.
Thank you,
Matt