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

前端 未结 1 2012
日久生厌
日久生厌 2020-12-20 21:11

I am trying to stop the processor which is in running state using the PUT method in rest api /processors/{id}.

I am able to start the processor by chan

1条回答
  •  醉梦人生
    2020-12-20 21:16

    you can able to stop processor using rest api.

    Example:

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

    RestAPI Url:

    http://:/nifi-api/processors/9204b68d-0159-1000-7d8f-720592b2a2dd
    

    Here json content i have passed as PUT Request to stop processor.

    {
      "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"
      }
    } 
    

    Revision and Status are most important things in stop the processor from RestAPI.

    It works well for me.Try it.

    And let me know if not worked.

    0 讨论(0)
提交回复
热议问题