-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
Description - Feature Proposal
I am proposing a new feature for NiPyAPI. Many times, when a user wants to know what REST API calls to execute to achieve a specific goal, we instruct them to use the UI and their browser's Developer Tools panel to monitor which API calls the UI client makes to the server. NiPyAPI exposes a number of these tasks, as well as providing convenience methods that recurse through process groups/components, etc. to make these operations even easier. It would be nice if the user could perform one or more operations via NiPyAPI and then have the series of API calls exported via a number of possible outputs.
Terminology
- operation - a single action executed by NiPyAPI. This could be one or more HTTP API requests to NiFi
- API request - an HTTP request made by the NiPyAPI client to the NiFi server
- curl - the
curl
command-line tool & library - session - an individual interaction with the NiPyAPI command-line tool, which can contain 0 or more operations. Terminated when the client process is killed
"Ken Burns Mode" could be enabled in a variety of ways:
- Invoke NiPyAPI with a flag like
--echoHttp
so all operation(s) executed during a NiPyAPI session get echoed, in sequence, to a specific output- console output
- could be piped to a separate output file
- When running in a NiPyAPI session, a specific operation could be invoked with a flag like
--echoHttp
to print the API request(s) associated with the single operation- A specific operation could be invoked with a flag like
--dry-run
in conjunction with the--echoHttp
flag to print the API request that would be sent without actually sending it
- A specific operation could be invoked with a flag like
- A
curl
compatibility mode could be enabled in any/all of the above scenarios to print the HTTP API request(s) in a form that could be copy/pasted to the command line and invoked viacurl
(i.e. headers are broken out into-H "X-Header-Name: headerValue"
form)
Examples
- A normal example is getting the application status, which is a single operation in NiPyAPI and a single API call
- A complex example is getting the processors with sensitive properties, which I believe requires iterating over multiple components via an API call for each
Chaffelson