Support Questions

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

run-status nifi

avatar
Explorer

Hello everyone

 

I follow this guide  https://nifi.apache.org/docs/nifi-docs/rest-api/index.html

NIFI API 

and I want to run-status specific process  

So how Can I do it and how to call the API 

 

thank you 

 

2 REPLIES 2

avatar
Super Guru

@Saraali ,

 

To call the API, the first thing you need is the processor UUID, which you can find in the UI:

araujo_0-1644791010060.png

With the processor UUID, I can call the process API endpoints. For example, to get details about the processor I can do a GET on the /processor/{id} enpoint:

$ curl "https://nifi-1.example.org:8080/nifi-api/processors/f525c671-017e-1000-ffff-ffffa16ab615"
{
"revision": {
"clientId": "f52573c3-017e-1000-62a7-8b0be35e3b2e",
"version": 6
},
"id": "f525c671-017e-1000-ffff-ffffa16ab615",
"uri": "https://nifi-1.example.org:8080/nifi-api/processors/f525c671-017e-1000-ffff-ffffa16ab615",
"position": {
"x": 384,
"y": 176
},
...
}

To make modifications to the processor we have to pass the revision information retrieved in the command above. So, for example, to call run-status to stop the processor I can execute the following command, using the revision from the previous output:

$ curl \
-X PUT \
-H 'Content-Type: application/json' \
-d '{"state": "STOPPED","revision":{"clientId":"f52573c3-017e-1000-62a7-8b0be35e3b2e","version":6}}' \
"https://nifi-1.example.org:8080/nifi-api/processors/f525c671-017e-1000-ffff-ffffa16ab615/run-status"

 

Cheers,

André

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Community Manager

@Saraali have you resolved your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.


Cy Jervis, Manager, Community Program
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.