How to stop single processor in nifi1.1.0 using rest api

I am trying to stop a processor that is operational using the PUT method in rest api /processors/{id}.

I can start the processor by changing the state in the component as follows "state": "RUNNING"and runStatus in aggregatesnapshot as "runStatus": "Running".

Similarly, I tried to stop the processor by changing the state as STOPPED, but having encountered an error like

9204b68d-0159-1000-7d8f-720592b2a2dd not stopped (error 409 and 400 Badrequest errors).

Please let me know how to stop the processor.

Thanks in advance.

+4
source share
1 answer

you can stop the processor using rest api.

Example:

i GetFile (ID: 9204b68d-0159-1000-7d8f-720592b2a2dd) .

URL- RestAPI:

http://<host>:<port>/nifi-api/processors/9204b68d-0159-1000-7d8f-720592b2a2dd

json PUT Request, .

{
  "status": {
    "runStatus": "STOPPED"
  },
  "component": {
    "state": "STOPPED",
    "id": "9204b68d-0159-1000-7d8f-720592b2a2dd"
  },
  "id": "9204b68d-0159-1000-7d8f-720592b2a2dd",
  "revision": {
    "version": 10,
    "clientId": "ab010dd6-0159-1000-615b-f095502a7ceb"
  }
} 

- , RestAPI.

. .

, .

+5

Source: https://habr.com/ru/post/1667098/


All Articles