@ptrsz
Welcome to the community.
The more detail you can provide, the better the community can assist.
- Are you trying to use the InvokeHTTP to return from the NiFi rest-api of the same NiFi instance where this NiFi sis running or accessing the rest-api of another NiFi instance?
- Is this a NiFi cluster or standalone NiFi instance?
- What version of Apache NiFi are you using (rest-api endpoint may differ by version)?
- What rest-api endpoint are you trying to use?
Here is an example configuration using a secured Apache NiFi 2 instance to retrieve the NiFi system diagnostics data from the NiFi rest-api of the same Nif where the dataflow is running.
- Since NiFi is secured, the rest-api endpoint will require authentication and authorization. The easiest way to set this up is to use a clientAuth certificate keystore for authentication. So I setup a StandardRestrictedSSLContextService within the NiFi Process Group.

- I then configured my InvokeHTTP processor to use the above SSL Context service and configured the appropriate rest-api endpoint for the system diagnostics (https://<nifi-hostname>:<nifi-port>/nifi-api/system-diagnostics)

- Next I need to make sure my clientAuth certificate DN user identity has been authorized for the "view system diagnostics" within the NiFi Policies; otherwise , you will encounter a 401 not authorized response:

- Now when my invokeHTTP executes I get the json response from that rest-api endpoint with my diagnostic data:


Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.
Thank you,
Matt