2

I'm trying to programmatically create a NiFi flow using the NiFi api. I'm creating a remote process group in an inner flow.

The RPG request payload requires the target uri of the remote process group. Is there a way to get that uri programmatically via the api?

Thanks in advance

Adi Fuchs
  • 205
  • 2
  • 9

1 Answers1

2

NiFi Rest API docs are here:

Specifically, a GET on /remote-process-groups/{id} returns a RemoteProcessGroupEntity which contains the RPG info including URI.

{
    "revision": {…},
    "id": "value",
    "uri": "value",
    "position": {…},
    "permissions": {…},
    "bulletins": [{…}],
    "disconnectedNodeAcknowledged": true,
    "component": {…},
    "status": {…},
    "inputPortCount": 0,
    "outputPortCount": 0,
    "operatePermissions": {…}
}

If you are using Python, consider NiPyAPI for programmatically interacting with the NiFi API.

Dov Benyomin Sohacheski
  • 7,133
  • 7
  • 38
  • 64
Sdairs
  • 1,912
  • 1
  • 13
  • 13
  • Thanks for the quick answer. I think I didn't explain myself correctly - when creating the RPG's payload I need to include the target uri. I need to somehow get that uri in order to create the RPG (and not in the connection payload as I mistakenly wrote) – Adi Fuchs Dec 08 '20 at 12:21