Search code examples
apache-nifi

Nifi Registry: link Nifi nodes to registry programmatically?


I've been experimenting with deploying nifi clusters with zookeeper and nifi registry in the mix. I have nifi registry and nifi being deployed via docker. In the documents for nifi registry it shows going into the nifi UI and adding a controller service for the nifi registry instance.

Is there a way to create the controller service for the registry programmatically? (i.e. creating the link between nifi and nifi registry during the build process)


Solution

  • There is an API endpoint for Registry Clients

    POST /controller/registry-clients 
    

    See the REST API docs here

    Request
    consumes: application/json
    Name    Location    Type                    Description
            body        RegistryClientEntity    The registry configuration details.
    Response
    produces: application/json
    Status Code     Type    Description
    200     RegistryClientEntity    successful operation
    400     string  NiFi was unable to complete the request because it was invalid. The request should not be retried without modification.
    401     string  Client could not be authenticated.
    403     string  Client is not authorized to make this request.
    409     string  The request was valid but NiFi was not in the appropriate state to process it. Retrying the same request later may be successful.
    Authorization
    Write - /controller