When authenticating via LDAP, the NiFi REST API will require the client pass along a token with each request. To obtain a token, you’ll need to pass the credentials to authenticate.
curl 'https://localhost:8443/nifi-api/access/token' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: */*' --data 'username=<user>&password=<pass>' --compressed
This request will return the token that you’ll need to pass in the headers of each subsequent request. For instance: