/NiFi.Swagger

.NET Client for Apache NiFi 1.9.1 using swagger-cogeden

Primary LanguageC#Apache License 2.0Apache-2.0

NiFi.Swagger

.NET Client for Apache NiFi 1.9.1 using swagger-cogeden

Support me

If you have found this project helpful, either as a library that you use or as a learning tool, please consider buying me a coffee:

Buy Me A Coffee

To install NiFi.Swagger from within Visual Studio, search for NiFi.Swagger in the NuGet Package Manager UI, or run the following command in the Package Manager Console:

Install-Package NiFi.Swagger -Version 1.9.1.1

Which version

The version of product correspond to the nifi api version.

sample 1.9.1.1 is build with API Nifi 1.9.1

version version Nifi
version 1.9.1.1 Build with api nifi 1.9.1

Getting Started

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class CreateAccessTokenExample
    {
        public void main()
        {
	    var config = new Configuration
            {
                BasePath = "http://localhost:8080/nifi-api"
            };
	    
            var apiInstance = new AccessApi(config);
            var username = username_example;  // string |  (optional) 
            var password = password_example;  // string |  (optional) 

            try
            {
                // Creates a token for accessing the REST API via username/password
                string result = apiInstance.CreateAccessToken(username, password);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccessApi.CreateAccessToken: " + e.Message );
            }
        }
    }
}

Documentation for API Endpoints

All URIs are relative to http://localhost:8080/nifi/

All URIs are relative to http://localhost/nifi/

Class Method HTTP request Description
AccessApi CreateAccessToken POST /access/token Creates a token for accessing the REST API via username/password
AccessApi CreateAccessTokenFromTicket POST /access/kerberos Creates a token for accessing the REST API via Kerberos ticket exchange / SPNEGO negotiation
AccessApi CreateDownloadToken POST /access/download-token Creates a single use access token for downloading FlowFile content.
AccessApi CreateUiExtensionToken POST /access/ui-extension-token Creates a single use access token for accessing a NiFi UI extension.
AccessApi GetAccessStatus GET /access Gets the status the client's access
AccessApi GetLoginConfig GET /access/config Retrieves the access configuration for this NiFi
ConnectionsApi DeleteConnection DELETE /connections/{id} Deletes a connection
ConnectionsApi GetConnection GET /connections/{id} Gets a connection
ConnectionsApi UpdateConnection PUT /connections/{id} Updates a connection
ControllerApi CreateBulletin POST /controller/bulletin Creates a new bulletin
ControllerApi CreateControllerService POST /controller/controller-services Creates a new controller service
ControllerApi CreateReportingTask POST /controller/reporting-tasks Creates a new reporting task
ControllerApi DeleteHistory DELETE /controller/history Purges history
ControllerApi DeleteNode DELETE /controller/cluster/nodes/{id} Removes a node from the cluster
ControllerApi GetCluster GET /controller/cluster Gets the contents of the cluster
ControllerApi GetControllerConfig GET /controller/config Retrieves the configuration for this NiFi Controller
ControllerApi GetNode GET /controller/cluster/nodes/{id} Gets a node in the cluster
ControllerApi UpdateControllerConfig PUT /controller/config Retrieves the configuration for this NiFi
ControllerApi UpdateNode PUT /controller/cluster/nodes/{id} Updates a node in the cluster
ControllerServicesApi ClearState POST /controller-services/{id}/state/clear-requests Clears the state for a controller service
ControllerServicesApi GetControllerService GET /controller-services/{id} Gets a controller service
ControllerServicesApi GetControllerServiceReferences GET /controller-services/{id}/references Gets a controller service
ControllerServicesApi GetPropertyDescriptor GET /controller-services/{id}/descriptors Gets a controller service property descriptor
ControllerServicesApi GetState GET /controller-services/{id}/state Gets the state for a controller service
ControllerServicesApi RemoveControllerService DELETE /controller-services/{id} Deletes a controller service
ControllerServicesApi UpdateControllerService PUT /controller-services/{id} Updates a controller service
ControllerServicesApi UpdateControllerServiceReferences PUT /controller-services/{id}/references Updates a controller services references
CountersApi GetCounters GET /counters Gets the current counters for this NiFi
CountersApi UpdateCounter PUT /counters/{id} Updates the specified counter. This will reset the counter value to 0
DataTransferApi CommitInputPortTransaction DELETE /data-transfer/input-ports/{portId}/transactions/{transactionId} Commit or cancel the specified transaction
DataTransferApi CommitOutputPortTransaction DELETE /data-transfer/output-ports/{portId}/transactions/{transactionId} Commit or cancel the specified transaction
DataTransferApi CreatePortTransaction POST /data-transfer/{portType}/{portId}/transactions Create a transaction to the specified output port or input port
DataTransferApi ExtendInputPortTransactionTTL PUT /data-transfer/input-ports/{portId}/transactions/{transactionId} Extend transaction TTL
DataTransferApi ExtendOutputPortTransactionTTL PUT /data-transfer/output-ports/{portId}/transactions/{transactionId} Extend transaction TTL
DataTransferApi ReceiveFlowFiles POST /data-transfer/input-ports/{portId}/transactions/{transactionId}/flow-files Transfer flow files to the input port
DataTransferApi TransferFlowFiles GET /data-transfer/output-ports/{portId}/transactions/{transactionId}/flow-files Transfer flow files from the output port
FlowApi GenerateClientId GET /flow/client-id Generates a client id.
FlowApi GetAboutInfo GET /flow/about Retrieves details about this NiFi to put in the About dialog
FlowApi GetAction GET /flow/history/{id} Gets an action
FlowApi GetBanners GET /flow/banners Retrieves the banners for this NiFi
FlowApi GetBulletinBoard GET /flow/bulletin-board Gets current bulletins
FlowApi GetBulletins GET /flow/controller/bulletins Retrieves Controller level bulletins
FlowApi GetClusterSummary GET /flow/cluster/summary The cluster summary for this NiFi
FlowApi GetComponentHistory GET /flow/history/components/{componentId} Gets configuration history for a component
FlowApi GetConnectionStatus GET /flow/connections/{id}/status Gets status for a connection
FlowApi GetConnectionStatusHistory GET /flow/connections/{id}/status/history Gets the status history for a connection
FlowApi GetControllerServiceTypes GET /flow/controller-service-types Retrieves the types of controller services that this NiFi supports
FlowApi GetControllerServicesFromController GET /flow/controller/controller-services Gets all controller services
FlowApi GetControllerServicesFromGroup GET /flow/process-groups/{id}/controller-services Gets all controller services
FlowApi GetControllerStatus GET /flow/status Gets the current status of this NiFi
FlowApi GetCurrentUser GET /flow/current-user Retrieves the user identity of the user making the request
FlowApi GetFlow GET /flow/process-groups/{id} Gets a process group
FlowApi GetFlowConfig GET /flow/config Retrieves the configuration for this NiFi flow
FlowApi GetInputPortStatus GET /flow/input-ports/{id}/status Gets status for an input port
FlowApi GetOutputPortStatus GET /flow/output-ports/{id}/status Gets status for an output port
FlowApi GetPrioritizers GET /flow/prioritizers Retrieves the types of prioritizers that this NiFi supports
FlowApi GetProcessGroupStatus GET /flow/process-groups/{id}/status Gets the status for a process group
FlowApi GetProcessGroupStatusHistory GET /flow/process-groups/{id}/status/history Gets status history for a remote process group
FlowApi GetProcessorStatus GET /flow/processors/{id}/status Gets status for a processor
FlowApi GetProcessorStatusHistory GET /flow/processors/{id}/status/history Gets status history for a processor
FlowApi GetProcessorTypes GET /flow/processor-types Retrieves the types of processors that this NiFi supports
FlowApi GetRemoteProcessGroupStatus GET /flow/remote-process-groups/{id}/status Gets status for a remote process group
FlowApi GetRemoteProcessGroupStatusHistory GET /flow/remote-process-groups/{id}/status/history Gets the status history
FlowApi GetReportingTaskTypes GET /flow/reporting-task-types Retrieves the types of reporting tasks that this NiFi supports
FlowApi GetReportingTasks GET /flow/reporting-tasks Gets all reporting tasks
FlowApi GetTemplates GET /flow/templates Gets all templates
FlowApi QueryHistory GET /flow/history Gets configuration history
FlowApi ScheduleComponents PUT /flow/process-groups/{id} Schedule or unschedule comopnents in the specified Process Group.
FlowApi SearchCluster GET /flow/cluster/search-results Searches the cluster for a node with the specified address
FlowApi SearchFlow GET /flow/search-results Performs a search against this NiFi using the specified search term
FlowfileQueuesApi CreateDropRequest POST /flowfile-queues/{id}/drop-requests Creates a request to drop the contents of the queue in this connection.
FlowfileQueuesApi CreateFlowFileListing POST /flowfile-queues/{id}/listing-requests Lists the contents of the queue in this connection.
FlowfileQueuesApi DeleteListingRequest DELETE /flowfile-queues/{id}/listing-requests/{listing-request-id} Cancels and/or removes a request to list the contents of this connection.
FlowfileQueuesApi DownloadFlowFileContent GET /flowfile-queues/{id}/flowfiles/{flowfile-uuid}/content Gets the content for a FlowFile in a Connection.
FlowfileQueuesApi GetDropRequest GET /flowfile-queues/{id}/drop-requests/{drop-request-id} Gets the current status of a drop request for the specified connection.
FlowfileQueuesApi GetFlowFile GET /flowfile-queues/{id}/flowfiles/{flowfile-uuid} Gets a FlowFile from a Connection.
FlowfileQueuesApi GetListingRequest GET /flowfile-queues/{id}/listing-requests/{listing-request-id} Gets the current status of a listing request for the specified connection.
FlowfileQueuesApi RemoveDropRequest DELETE /flowfile-queues/{id}/drop-requests/{drop-request-id} Cancels and/or removes a request to drop the contents of this connection.
FunnelApi GetFunnel GET /funnels/{id} Gets a funnel
FunnelApi RemoveFunnel DELETE /funnels/{id} Deletes a funnel
FunnelApi UpdateFunnel PUT /funnels/{id} Updates a funnel
InputPortsApi GetInputPort GET /input-ports/{id} Gets an input port
InputPortsApi RemoveInputPort DELETE /input-ports/{id} Deletes an input port
InputPortsApi UpdateInputPort PUT /input-ports/{id} Updates an input port
LabelsApi GetLabel GET /labels/{id} Gets a label
LabelsApi RemoveLabel DELETE /labels/{id} Deletes a label
LabelsApi UpdateLabel PUT /labels/{id} Updates a label
OutputPortsApi GetOutputPort GET /output-ports/{id} Gets an output port
OutputPortsApi RemoveOutputPort DELETE /output-ports/{id} Deletes an output port
OutputPortsApi UpdateOutputPort PUT /output-ports/{id} Updates an output port
PoliciesApi RreateAccessPolicy POST /policies Creates an access policy
PoliciesApi GetAccessPolicy GET /policies/{id} Gets an access policy
PoliciesApi GetAccessPolicyForResource GET /policies/{action}/{resource} Gets an access policy for the specified action and resource
PoliciesApi RemoveAccessPolicy DELETE /policies/{id} Deletes an access policy
PoliciesApi UpdateAccessPolicy PUT /policies/{id} Updates a access policy
ProcessGroupsApi CopySnippet POST /process-groups/{id}/snippet-instance Copies a snippet and discards it.
ProcessGroupsApi CreateConnection POST /process-groups/{id}/connections Creates a connection
ProcessGroupsApi CreateControllerService POST /process-groups/{id}/controller-services Creates a new controller service
ProcessGroupsApi CreateFunnel POST /process-groups/{id}/funnels Creates a funnel
ProcessGroupsApi CreateInputPort POST /process-groups/{id}/input-ports Creates an input port
ProcessGroupsApi CreateLabel POST /process-groups/{id}/labels Creates a label
ProcessGroupsApi CreateOutputPort POST /process-groups/{id}/output-ports Creates an output port
ProcessGroupsApi CreateProcessGroup POST /process-groups/{id}/process-groups Creates a process group
ProcessGroupsApi CreateProcessor POST /process-groups/{id}/processors Creates a new processor
ProcessGroupsApi CreateRemoteProcessGroup POST /process-groups/{id}/remote-process-groups Creates a new process group
ProcessGroupsApi CreateTemplate POST /process-groups/{id}/templates Creates a template and discards the specified snippet.
ProcessGroupsApi GetConnections GET /process-groups/{id}/connections Gets all connections
ProcessGroupsApi GetFunnels GET /process-groups/{id}/funnels Gets all funnels
ProcessGroupsApi GetInputPorts GET /process-groups/{id}/input-ports Gets all input ports
ProcessGroupsApi GetLabels GET /process-groups/{id}/labels Gets all labels
ProcessGroupsApi GetOutputPorts GET /process-groups/{id}/output-ports Gets all output ports
ProcessGroupsApi GetProcessGroup GET /process-groups/{id} Gets a process group
ProcessGroupsApi GetProcessGroups GET /process-groups/{id}/process-groups Gets all process groups
ProcessGroupsApi GetProcessors GET /process-groups/{id}/processors Gets all processors
ProcessGroupsApi GetRemoteProcessGroups GET /process-groups/{id}/remote-process-groups Gets all remote process groups
ProcessGroupsApi ImportTemplate POST /process-groups/{id}/templates/import Imports a template
ProcessGroupsApi InstantiateTemplate POST /process-groups/{id}/template-instance Instantiates a template
ProcessGroupsApi RemoveProcessGroup DELETE /process-groups/{id} Deletes a process group
ProcessGroupsApi UpdateProcessGroup PUT /process-groups/{id} Updates a process group
ProcessGroupsApi UploadTemplate POST /process-groups/{id}/templates/upload Uploads a template
ProcessorsApi ClearState POST /processors/{id}/state/clear-requests Clears the state for a processor
ProcessorsApi DeleteProcessor DELETE /processors/{id} Deletes a processor
ProcessorsApi GetProcessor GET /processors/{id} Gets a processor
ProcessorsApi GetPropertyDescriptor GET /processors/{id}/descriptors Gets the descriptor for a processor property
ProcessorsApi GetState GET /processors/{id}/state Gets the state for a processor
ProcessorsApi UpdateProcessor PUT /processors/{id} Updates a processor
ProvenanceApi DeleteLineage DELETE /provenance/lineage/{id} Deletes a lineage query
ProvenanceApi DeleteProvenance DELETE /provenance/{id} Deletes a provenance query
ProvenanceApi GetLineage GET /provenance/lineage/{id} Gets a lineage query
ProvenanceApi GetProvenance GET /provenance/{id} Gets a provenance query
ProvenanceApi GetSearchOptions GET /provenance/search-options Gets the searchable attributes for provenance events
ProvenanceApi SubmitLineageRequest POST /provenance/lineage Submits a lineage query
ProvenanceApi SubmitProvenanceRequest POST /provenance Submits a provenance query
ProvenanceEventsApi GetInputContent GET /provenance-events/{id}/content/input Gets the input content for a provenance event
ProvenanceEventsApi GetOutputContent GET /provenance-events/{id}/content/output Gets the output content for a provenance event
ProvenanceEventsApi GetProvenanceEvent GET /provenance-events/{id} Gets a provenance event
ProvenanceEventsApi SubmitReplay POST /provenance-events/replays Replays content from a provenance event
RemoteProcessGroupsApi GetRemoteProcessGroup GET /remote-process-groups/{id} Gets a remote process group
RemoteProcessGroupsApi RemoveRemoteProcessGroup DELETE /remote-process-groups/{id} Deletes a remote process group
RemoteProcessGroupsApi UpdateRemoteProcessGroup PUT /remote-process-groups/{id} Updates a remote process group
RemoteProcessGroupsApi UpdateRemoteProcessGroupInputPort PUT /remote-process-groups/{id}/input-ports/{port-id} Updates a remote port
RemoteProcessGroupsApi UpdateRemoteProcessGroupOutputPort PUT /remote-process-groups/{id}/output-ports/{port-id} Updates a remote port
ReportingTasksApi ClearState POST /reporting-tasks/{id}/state/clear-requests Clears the state for a reporting task
ReportingTasksApi GetPropertyDescriptor GET /reporting-tasks/{id}/descriptors Gets a reporting task property descriptor
ReportingTasksApi GetReportingTask GET /reporting-tasks/{id} Gets a reporting task
ReportingTasksApi GetState GET /reporting-tasks/{id}/state Gets the state for a reporting task
ReportingTasksApi RemoveReportingTask DELETE /reporting-tasks/{id} Deletes a reporting task
ReportingTasksApi UpdateReportingTask PUT /reporting-tasks/{id} Updates a reporting task
ResourcesApi GetResources GET /resources Gets the available resources that support access/authorization policies
SiteToSiteApi GetPeers GET /site-to-site/peers Returns the available Peers and its status of this NiFi
SiteToSiteApi GetSiteToSiteDetails GET /site-to-site Returns the details about this NiFi necessary to communicate via site to site
SnippetsApi CreateSnippet POST /snippets Creates a snippet. The snippet will be automatically discarded if not used in a subsequent request after 1 minute.
SnippetsApi DeleteSnippet DELETE /snippets/{id} Deletes the components in a snippet and discards the snippet
SnippetsApi UpdateSnippet PUT /snippets/{id} Move's the components in this Snippet into a new Process Group and discards the snippet
SystemDiagnosticsApi GetSystemDiagnostics GET /system-diagnostics Gets the diagnostics for the system NiFi is running on
TemplatesApi ExportTemplate GET /templates/{id}/download Exports a template
TemplatesApi RemoveTemplate DELETE /templates/{id} Deletes a template
TenantsApi CreateUser POST /tenants/users Creates a user
TenantsApi CreateUserGroup POST /tenants/user-groups Creates a user group
TenantsApi GetUser GET /tenants/users/{id} Gets a user
TenantsApi GetUserGroup GET /tenants/user-groups/{id} Gets a user group
TenantsApi GetUserGroups GET /tenants/user-groups Gets all user groups
TenantsApi GetUsers GET /tenants/users Gets all users
TenantsApi RemoveUser DELETE /tenants/users/{id} Deletes a user
TenantsApi RemoveUserGroup DELETE /tenants/user-groups/{id} Deletes a user group
TenantsApi SearchCluster GET /tenants/search-results Searches for a tenant with the specified identity
TenantsApi UpdateUser PUT /tenants/users/{id} Updates a user
TenantsApi UpdateUserGroup PUT /tenants/user-groups/{id} Updates a user group

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

auth

  • Type: OAuth
  • Flow: implicit

Author

Andre Mendonca