- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
run-status nifi
- Labels:
-
Apache NiFi
Created on ‎02-13-2022 05:39 AM - edited ‎02-13-2022 05:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Created ‎02-13-2022 02:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Saraali ,
To call the API, the first thing you need is the processor UUID, which you can find in the UI:
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.
Created ‎04-22-2022 06:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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.
