nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hollis <>
Subject Re: Re: Does Nifi Rest Api Supported Trigger Operation
Date Wed, 19 Jul 2017 02:04:29 GMT
Hi Ben and Pierre,
             Thank you very much . It really works. I got a lot of help and I can finish my

From: 尹文才
Date: 2017-07-18 20:54
To: users
Subject: Re: Re: Does Nifi Rest Api Supported Trigger Operation
Hi Hollis, I was at first using Chrome's app postman to play around with the NIFI rest api,
My command to request the processor to be running like this:

PUT http://localhost:8082/nifi-api/processors/015d1006-1e68-1611-fb97-8e5397d0bc1f

The Content-Type header is "application/json" and the request body is as below: 

{ "revision": { "version": 0 }, "component": { "id": "015d1006-1e68-1611-fb97-8e5397d0bc1f",
"state": "RUNNING" } }

you need to have the revision and component part(at least id and state according to my test)
in the request to set the processor to specific state.
I hope this helps.


2017-07-18 18:08 GMT+08:00 Pierre Villard <>:
Hi Hollis, I'd suggest you to open the developer tools of your browser, perform the action
using the UI and look at what is actually sent to understand how the REST API is working (the
UI is using the API in the background).

That would give you something like that (to start a processor):

curl 'http://localhost:8080/nifi-api/processors/cac3a577-015b-1000-b9c3-843741836f15' -X PUT
-H 'Content-Type: application/json' --data '{"revision":{"clientId":"3bdd5735-015d-1000-e275-34d1e8e64dc8","version":0},"component":{"id":"cac3a577-015b-1000-b9c3-843741836f15","state":"RUNNING"}}'

I am not sure that the "revision" part is required, so it could be:

curl 'http://localhost:8080/nifi-api/processors/cac3a577-015b-1000-b9c3-843741836f15' -X PUT
-H 'Content-Type: application/json' --data '{"component":{"id":"cac3a577-015b-1000-b9c3-843741836f15","state":"RUNNING"}}'


2017-07-18 12:01 GMT+02:00 Hollis <>:
Hi Ben,
      Moreover, I have try using this command:
         curl -i -X PUT -H 'Content-Type:application/json' -d '
       but unfortunally,I got this reponse shown picture below,

     I can't understand what does "Processor details must be specified."  mean.


From: Hollis
Date: 2017-07-18 15:27
To: users
Subject: Re: Re: Does Nifi Rest Api Supported Trigger Operation
Hi Ben,
            Thank you for your reply and I have try your step.When I come to step 3  ". use
PUT /processors/{id} to update the processor's state to STOPPED."  I meet some problem.
            My command is,
but I got a 400 Bad Request. I search the nifi Rest Api and locate the Rest API. I don't know
what does body mean and what cause this 400 error.

From: Joe Witt
Date: 2017-07-18 09:52
To: users
Subject: Re: Does Nifi Rest Api Supported Trigger Operation

We dont support the notion of a 'run once' operation today.  Is that something you're looking


On Mon, Jul 17, 2017 at 9:48 PM, 尹文才 <> wrote:
Hi, I had asked a similar question a few days ago, the steps I used to restart a processor
with a specific name is as below:
1. use GET /flow/search-results with parameter q equals to the processor name to find the
basic information of the processor.
2. use GET /processors/{id} to get the detailed information of the processor, the id is retrieved
from the basic information in step 1.
3. use PUT /processors/{id} to update the processor's state to STOPPED.
4. use PUT /processors/{id} to update the processor's state to RUNNING.

I was using the Java api to restart the processor, the Java nifi api client I used is written
by someone who wrote for NIFI 1.0.0 and stopped maintaining since 9 months ago, you may take
a look if you're intertested:


2017-07-17 22:32 GMT+08:00 Matt Gilman <>:

The NiFi UI uses the REST API exclusively to perform all of its actions. You can see all of
these requests in action by opening the Developer Tools in your web browser. Here is the link
to the REST API Docs [1].



On Mon, Jul 17, 2017 at 2:10 AM, <> wrote:
Hi All,
           I want to find nifi rest api (  to operation
processor in nifi UI. But I can not find any  trigger operation like start and stop process
shown below. Does nifi support this operation. 


View raw message