Apache NiFi REST API

REST API definition for Apache NiFi web services

OpenAPI spec version: 2.6.0 Contact: dev@nifi.apache.org Generated by: https://github.com/swagger-api/swagger-codegen.git

class nipyapi.nifi.apis.versions_api.VersionsApi(api_client=None)[source]

Bases: object

NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen

__init__(api_client=None)[source]
create_version_control_request(body, **kwargs)[source]

Create a version control request.

Creates a request so that a Process Group can be placed under Version Control or have its Version Control configuration changed. Creating this request will prevent any other threads from simultaneously saving local changes to Version Control. It will not, however, actually save the local flow to the Flow Registry. A POST to /versions/process-groups/{id} should be used to initiate saving of the local flow to the Flow Registry. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns the response data directly.

For full HTTP response details (status code, headers, etc.), use the corresponding create_version_control_request_with_http_info() method instead.

Parameters:

body (CreateActiveRequestEntity) – The versioned flow details. (required)

Returns:

The response data.

Return type:

str

create_version_control_request_with_http_info(body, **kwargs)[source]

Create a version control request.

Creates a request so that a Process Group can be placed under Version Control or have its Version Control configuration changed. Creating this request will prevent any other threads from simultaneously saving local changes to Version Control. It will not, however, actually save the local flow to the Flow Registry. A POST to /versions/process-groups/{id} should be used to initiate saving of the local flow to the Flow Registry. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns detailed response information.

Returns the response data along with HTTP status code, headers, and other metadata. For just the response data, use the corresponding create_version_control_request() method instead.

Parameters:

body (CreateActiveRequestEntity) – The versioned flow details. (required)

Returns:

(str, status_code, headers) - Response data with HTTP details.

Return type:

tuple

delete_revert_request(id, **kwargs)[source]

Deletes the Revert Request with the given ID.

Deletes the Revert Request with the given ID. After a request is created via a POST to /versions/revert-requests/process-groups/{id}, it is expected that the client will properly clean up the request by DELETE’ing it, once the Revert process has completed. If the request is deleted before the request completes, then the Revert request will finish the step that it is currently performing and then will cancel any subsequent steps. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns the response data directly.

For full HTTP response details (status code, headers, etc.), use the corresponding delete_revert_request_with_http_info() method instead.

Parameters:
  • id (str) – The ID of the Revert Request (required)

  • disconnected_node_acknowledged (bool) – Acknowledges that this node is disconnected to allow for mutable requests to proceed.

Returns:

The response data.

Return type:

VersionedFlowUpdateRequestEntity

delete_revert_request_with_http_info(id, **kwargs)[source]

Deletes the Revert Request with the given ID.

Deletes the Revert Request with the given ID. After a request is created via a POST to /versions/revert-requests/process-groups/{id}, it is expected that the client will properly clean up the request by DELETE’ing it, once the Revert process has completed. If the request is deleted before the request completes, then the Revert request will finish the step that it is currently performing and then will cancel any subsequent steps. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns detailed response information.

Returns the response data along with HTTP status code, headers, and other metadata. For just the response data, use the corresponding delete_revert_request() method instead.

Parameters:
  • id (str) – The ID of the Revert Request (required)

  • disconnected_node_acknowledged (bool) – Acknowledges that this node is disconnected to allow for mutable requests to proceed.

Returns:

(VersionedFlowUpdateRequestEntity, status_code, headers) - Response data with HTTP details.

Return type:

tuple

delete_update_request1(id, **kwargs)[source]

Deletes the Update Request with the given ID.

Deletes the Update Request with the given ID. After a request is created via a POST to /versions/update-requests/process-groups/{id}, it is expected that the client will properly clean up the request by DELETE’ing it, once the Update process has completed. If the request is deleted before the request completes, then the Update request will finish the step that it is currently performing and then will cancel any subsequent steps. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns the response data directly.

For full HTTP response details (status code, headers, etc.), use the corresponding delete_update_request1_with_http_info() method instead.

Parameters:
  • id (str) – The ID of the Update Request (required)

  • disconnected_node_acknowledged (bool) – Acknowledges that this node is disconnected to allow for mutable requests to proceed.

Returns:

The response data.

Return type:

VersionedFlowUpdateRequestEntity

delete_update_request1_with_http_info(id, **kwargs)[source]

Deletes the Update Request with the given ID.

Deletes the Update Request with the given ID. After a request is created via a POST to /versions/update-requests/process-groups/{id}, it is expected that the client will properly clean up the request by DELETE’ing it, once the Update process has completed. If the request is deleted before the request completes, then the Update request will finish the step that it is currently performing and then will cancel any subsequent steps. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns detailed response information.

Returns the response data along with HTTP status code, headers, and other metadata. For just the response data, use the corresponding delete_update_request1() method instead.

Parameters:
  • id (str) – The ID of the Update Request (required)

  • disconnected_node_acknowledged (bool) – Acknowledges that this node is disconnected to allow for mutable requests to proceed.

Returns:

(VersionedFlowUpdateRequestEntity, status_code, headers) - Response data with HTTP details.

Return type:

tuple

delete_version_control_request(id, **kwargs)[source]

Deletes the version control request with the given ID.

Deletes the Version Control Request with the given ID. This will allow other threads to save flows to the Flow Registry. See also the documentation for POSTing to /versions/active-requests for information regarding why this is done. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns the response data directly.

For full HTTP response details (status code, headers, etc.), use the corresponding delete_version_control_request_with_http_info() method instead.

Parameters:
  • id (str) – The request ID. (required)

  • disconnected_node_acknowledged (bool) – Acknowledges that this node is disconnected to allow for mutable requests to proceed.

Returns:

None

delete_version_control_request_with_http_info(id, **kwargs)[source]

Deletes the version control request with the given ID.

Deletes the Version Control Request with the given ID. This will allow other threads to save flows to the Flow Registry. See also the documentation for POSTing to /versions/active-requests for information regarding why this is done. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns detailed response information.

Returns the response data along with HTTP status code, headers, and other metadata. For just the response data, use the corresponding delete_version_control_request() method instead.

Parameters:
  • id (str) – The request ID. (required)

  • disconnected_node_acknowledged (bool) – Acknowledges that this node is disconnected to allow for mutable requests to proceed.

Returns:

(None, status_code, headers) - Response data with HTTP details.

Return type:

tuple

export_flow_version(id, **kwargs)[source]

Gets the latest version of a Process Group for download. This method makes a synchronous HTTP request and returns the response data directly.

For full HTTP response details (status code, headers, etc.), use the corresponding export_flow_version_with_http_info() method instead.

Parameters:

id (str) – The process group id. (required)

Returns:

The response data.

Return type:

str

export_flow_version_with_http_info(id, **kwargs)[source]

Gets the latest version of a Process Group for download. This method makes a synchronous HTTP request and returns detailed response information.

Returns the response data along with HTTP status code, headers, and other metadata. For just the response data, use the corresponding export_flow_version() method instead.

Parameters:

id (str) – The process group id. (required)

Returns:

(str, status_code, headers) - Response data with HTTP details.

Return type:

tuple

get_revert_request(id, **kwargs)[source]

Returns the Revert Request with the given ID.

Returns the Revert Request with the given ID. Once a Revert Request has been created by performing a POST to /versions/revert-requests/process-groups/{id}, that request can subsequently be retrieved via this endpoint, and the request that is fetched will contain the updated state, such as percent complete, the current state of the request, and any failures. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns the response data directly.

For full HTTP response details (status code, headers, etc.), use the corresponding get_revert_request_with_http_info() method instead.

Parameters:

id (str) – The ID of the Revert Request (required)

Returns:

The response data.

Return type:

VersionedFlowUpdateRequestEntity

get_revert_request_with_http_info(id, **kwargs)[source]

Returns the Revert Request with the given ID.

Returns the Revert Request with the given ID. Once a Revert Request has been created by performing a POST to /versions/revert-requests/process-groups/{id}, that request can subsequently be retrieved via this endpoint, and the request that is fetched will contain the updated state, such as percent complete, the current state of the request, and any failures. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns detailed response information.

Returns the response data along with HTTP status code, headers, and other metadata. For just the response data, use the corresponding get_revert_request() method instead.

Parameters:

id (str) – The ID of the Revert Request (required)

Returns:

(VersionedFlowUpdateRequestEntity, status_code, headers) - Response data with HTTP details.

Return type:

tuple

get_update_request(id, **kwargs)[source]

Returns the Update Request with the given ID.

Returns the Update Request with the given ID. Once an Update Request has been created by performing a POST to /versions/update-requests/process-groups/{id}, that request can subsequently be retrieved via this endpoint, and the request that is fetched will contain the updated state, such as percent complete, the current state of the request, and any failures. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns the response data directly.

For full HTTP response details (status code, headers, etc.), use the corresponding get_update_request_with_http_info() method instead.

Parameters:

id (str) – The ID of the Update Request (required)

Returns:

The response data.

Return type:

VersionedFlowUpdateRequestEntity

get_update_request_with_http_info(id, **kwargs)[source]

Returns the Update Request with the given ID.

Returns the Update Request with the given ID. Once an Update Request has been created by performing a POST to /versions/update-requests/process-groups/{id}, that request can subsequently be retrieved via this endpoint, and the request that is fetched will contain the updated state, such as percent complete, the current state of the request, and any failures. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns detailed response information.

Returns the response data along with HTTP status code, headers, and other metadata. For just the response data, use the corresponding get_update_request() method instead.

Parameters:

id (str) – The ID of the Update Request (required)

Returns:

(VersionedFlowUpdateRequestEntity, status_code, headers) - Response data with HTTP details.

Return type:

tuple

get_version_information(id, **kwargs)[source]

Gets the Version Control information for a process group.

Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns the response data directly.

For full HTTP response details (status code, headers, etc.), use the corresponding get_version_information_with_http_info() method instead.

Parameters:

id (str) – The process group id. (required)

Returns:

The response data.

Return type:

VersionControlInformationEntity

get_version_information_with_http_info(id, **kwargs)[source]

Gets the Version Control information for a process group.

Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns detailed response information.

Returns the response data along with HTTP status code, headers, and other metadata. For just the response data, use the corresponding get_version_information() method instead.

Parameters:

id (str) – The process group id. (required)

Returns:

(VersionControlInformationEntity, status_code, headers) - Response data with HTTP details.

Return type:

tuple

initiate_revert_flow_version(body, id, **kwargs)[source]

Initiate the Revert Request of a Process Group with the given ID.

For a Process Group that is already under Version Control, this will initiate the action of reverting any local changes that have been made to the Process Group since it was last synchronized with the Flow Registry. This will result in the flow matching the Versioned Flow that exists in the Flow Registry. This can be a lengthy process, as it will stop any Processors and disable any Controller Services necessary to perform the action and then restart them. As a result, the endpoint will immediately return a VersionedFlowUpdateRequestEntity, and the process of updating the flow will occur asynchronously in the background. The client may then periodically poll the status of the request by issuing a GET request to /versions/revert-requests/{requestId}. Once the request is completed, the client is expected to issue a DELETE request to /versions/revert-requests/{requestId}. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns the response data directly.

For full HTTP response details (status code, headers, etc.), use the corresponding initiate_revert_flow_version_with_http_info() method instead.

Parameters:
Returns:

The response data.

Return type:

VersionedFlowUpdateRequestEntity

initiate_revert_flow_version_with_http_info(body, id, **kwargs)[source]

Initiate the Revert Request of a Process Group with the given ID.

For a Process Group that is already under Version Control, this will initiate the action of reverting any local changes that have been made to the Process Group since it was last synchronized with the Flow Registry. This will result in the flow matching the Versioned Flow that exists in the Flow Registry. This can be a lengthy process, as it will stop any Processors and disable any Controller Services necessary to perform the action and then restart them. As a result, the endpoint will immediately return a VersionedFlowUpdateRequestEntity, and the process of updating the flow will occur asynchronously in the background. The client may then periodically poll the status of the request by issuing a GET request to /versions/revert-requests/{requestId}. Once the request is completed, the client is expected to issue a DELETE request to /versions/revert-requests/{requestId}. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns detailed response information.

Returns the response data along with HTTP status code, headers, and other metadata. For just the response data, use the corresponding initiate_revert_flow_version() method instead.

Parameters:
Returns:

(VersionedFlowUpdateRequestEntity, status_code, headers) - Response data with HTTP details.

Return type:

tuple

initiate_version_control_update(body, id, **kwargs)[source]

Initiate the Update Request of a Process Group with the given ID.

For a Process Group that is already under Version Control, this will initiate the action of changing from a specific version of the flow in the Flow Registry to a different version of the flow. This can be a lengthy process, as it will stop any Processors and disable any Controller Services necessary to perform the action and then restart them. As a result, the endpoint will immediately return a VersionedFlowUpdateRequestEntity, and the process of updating the flow will occur asynchronously in the background. The client may then periodically poll the status of the request by issuing a GET request to /versions/update-requests/{requestId}. Once the request is completed, the client is expected to issue a DELETE request to /versions/update-requests/{requestId}. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns the response data directly.

For full HTTP response details (status code, headers, etc.), use the corresponding initiate_version_control_update_with_http_info() method instead.

Parameters:
Returns:

The response data.

Return type:

VersionedFlowUpdateRequestEntity

initiate_version_control_update_with_http_info(body, id, **kwargs)[source]

Initiate the Update Request of a Process Group with the given ID.

For a Process Group that is already under Version Control, this will initiate the action of changing from a specific version of the flow in the Flow Registry to a different version of the flow. This can be a lengthy process, as it will stop any Processors and disable any Controller Services necessary to perform the action and then restart them. As a result, the endpoint will immediately return a VersionedFlowUpdateRequestEntity, and the process of updating the flow will occur asynchronously in the background. The client may then periodically poll the status of the request by issuing a GET request to /versions/update-requests/{requestId}. Once the request is completed, the client is expected to issue a DELETE request to /versions/update-requests/{requestId}. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns detailed response information.

Returns the response data along with HTTP status code, headers, and other metadata. For just the response data, use the corresponding initiate_version_control_update() method instead.

Parameters:
Returns:

(VersionedFlowUpdateRequestEntity, status_code, headers) - Response data with HTTP details.

Return type:

tuple

save_to_flow_registry(body, id, **kwargs)[source]

Save the Process Group with the given ID.

Begins version controlling the Process Group with the given ID or commits changes to the Versioned Flow, depending on if the provided VersionControlInformation includes a flowId. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns the response data directly.

For full HTTP response details (status code, headers, etc.), use the corresponding save_to_flow_registry_with_http_info() method instead.

Parameters:
Returns:

The response data.

Return type:

VersionControlInformationEntity

save_to_flow_registry_with_http_info(body, id, **kwargs)[source]

Save the Process Group with the given ID.

Begins version controlling the Process Group with the given ID or commits changes to the Versioned Flow, depending on if the provided VersionControlInformation includes a flowId. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns detailed response information.

Returns the response data along with HTTP status code, headers, and other metadata. For just the response data, use the corresponding save_to_flow_registry() method instead.

Parameters:
Returns:

(VersionControlInformationEntity, status_code, headers) - Response data with HTTP details.

Return type:

tuple

stop_version_control(id, **kwargs)[source]

Stops version controlling the Process Group with the given ID.

Stops version controlling the Process Group with the given ID. The Process Group will no longer track to any Versioned Flow. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns the response data directly.

For full HTTP response details (status code, headers, etc.), use the corresponding stop_version_control_with_http_info() method instead.

Parameters:
  • id (str) – The process group id. (required)

  • version (LongParameter) – The version is used to verify the client is working with the latest version of the flow.

  • client_id (ClientIdParameter) – If the client id is not specified, a new one will be generated. This value (whether specified or generated) is included in the response.

  • disconnected_node_acknowledged (bool) – Acknowledges that this node is disconnected to allow for mutable requests to proceed.

Returns:

The response data.

Return type:

VersionControlInformationEntity

stop_version_control_with_http_info(id, **kwargs)[source]

Stops version controlling the Process Group with the given ID.

Stops version controlling the Process Group with the given ID. The Process Group will no longer track to any Versioned Flow. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns detailed response information.

Returns the response data along with HTTP status code, headers, and other metadata. For just the response data, use the corresponding stop_version_control() method instead.

Parameters:
  • id (str) – The process group id. (required)

  • version (LongParameter) – The version is used to verify the client is working with the latest version of the flow.

  • client_id (ClientIdParameter) – If the client id is not specified, a new one will be generated. This value (whether specified or generated) is included in the response.

  • disconnected_node_acknowledged (bool) – Acknowledges that this node is disconnected to allow for mutable requests to proceed.

Returns:

(VersionControlInformationEntity, status_code, headers) - Response data with HTTP details.

Return type:

tuple

update_flow_version(body, id, **kwargs)[source]

Update the version of a Process Group with the given ID.

For a Process Group that is already under Version Control, this will update the version of the flow to a different version. This endpoint expects that the given snapshot will not modify any Processor that is currently running or any Controller Service that is enabled. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns the response data directly.

For full HTTP response details (status code, headers, etc.), use the corresponding update_flow_version_with_http_info() method instead.

Parameters:
Returns:

The response data.

Return type:

VersionControlInformationEntity

update_flow_version_with_http_info(body, id, **kwargs)[source]

Update the version of a Process Group with the given ID.

For a Process Group that is already under Version Control, this will update the version of the flow to a different version. This endpoint expects that the given snapshot will not modify any Processor that is currently running or any Controller Service that is enabled. Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns detailed response information.

Returns the response data along with HTTP status code, headers, and other metadata. For just the response data, use the corresponding update_flow_version() method instead.

Parameters:
Returns:

(VersionControlInformationEntity, status_code, headers) - Response data with HTTP details.

Return type:

tuple

update_version_control_request(body, id, **kwargs)[source]

Updates the request with the given ID.

Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns the response data directly.

For full HTTP response details (status code, headers, etc.), use the corresponding update_version_control_request_with_http_info() method instead.

Parameters:
Returns:

The response data.

Return type:

VersionControlInformationEntity

update_version_control_request_with_http_info(body, id, **kwargs)[source]

Updates the request with the given ID.

Note: This endpoint is subject to change as NiFi and it’s REST API evolve.

This method makes a synchronous HTTP request and returns detailed response information.

Returns the response data along with HTTP status code, headers, and other metadata. For just the response data, use the corresponding update_version_control_request() method instead.

Parameters:
Returns:

(VersionControlInformationEntity, status_code, headers) - Response data with HTTP details.

Return type:

tuple