Source code for nipyapi.nifi.apis.flow_api

# coding: utf-8

"""
    NiFi Rest API

    The Rest API provides programmatic access to command and control a NiFi instance in real time. Start and                                             stop processors, monitor queues, query provenance data, and more. Each endpoint below includes a description,                                             definitions of the expected input and output, potential response codes, and the authorizations required                                             to invoke each service.

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


from __future__ import absolute_import

import sys
import os
import re

# python 2 and python 3 compatibility library
from six import iteritems

from ..configuration import Configuration
from ..api_client import ApiClient


[docs] class FlowApi(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 """ def __init__(self, api_client=None): config = Configuration() if api_client: self.api_client = api_client else: if not config.api_client: config.api_client = ApiClient() self.api_client = config.api_client
[docs] def activate_controller_services(self, id, body, **kwargs): """ Enable or disable Controller Services in the specified Process Group. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.activate_controller_services(id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The process group id. (required) :param ActivateControllerServicesEntity body: The request to schedule or unschedule. If the comopnents in the request are not specified, all authorized components will be considered. (required) :return: ActivateControllerServicesEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.activate_controller_services_with_http_info(id, body, **kwargs) else: (data) = self.activate_controller_services_with_http_info(id, body, **kwargs) return data
[docs] def activate_controller_services_with_http_info(self, id, body, **kwargs): """ Enable or disable Controller Services in the specified Process Group. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.activate_controller_services_with_http_info(id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The process group id. (required) :param ActivateControllerServicesEntity body: The request to schedule or unschedule. If the comopnents in the request are not specified, all authorized components will be considered. (required) :return: ActivateControllerServicesEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'body'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method activate_controller_services" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `activate_controller_services`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `activate_controller_services`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/process-groups/{id}/controller-services', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ActivateControllerServicesEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def generate_client_id(self, **kwargs): """ Generates a client id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.generate_client_id(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.generate_client_id_with_http_info(**kwargs) else: (data) = self.generate_client_id_with_http_info(**kwargs) return data
[docs] def generate_client_id_with_http_info(self, **kwargs): """ Generates a client id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.generate_client_id_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: str If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method generate_client_id" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['text/plain']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/client-id', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='str', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_about_info(self, **kwargs): """ Retrieves details about this NiFi to put in the About dialog This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_about_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: AboutEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_about_info_with_http_info(**kwargs) else: (data) = self.get_about_info_with_http_info(**kwargs) return data
[docs] def get_about_info_with_http_info(self, **kwargs): """ Retrieves details about this NiFi to put in the About dialog This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_about_info_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: AboutEntity If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_about_info" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/about', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='AboutEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_action(self, id, **kwargs): """ Gets an action Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_action(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The action id. (required) :return: ActionEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_action_with_http_info(id, **kwargs) else: (data) = self.get_action_with_http_info(id, **kwargs) return data
[docs] def get_action_with_http_info(self, id, **kwargs): """ Gets an action Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_action_with_http_info(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The action id. (required) :return: ActionEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_action" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `get_action`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/history/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ActionEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_banners(self, **kwargs): """ Retrieves the banners for this NiFi This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_banners(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: BannerEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_banners_with_http_info(**kwargs) else: (data) = self.get_banners_with_http_info(**kwargs) return data
[docs] def get_banners_with_http_info(self, **kwargs): """ Retrieves the banners for this NiFi This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_banners_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: BannerEntity If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_banners" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/banners', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='BannerEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_buckets(self, id, **kwargs): """ Gets the buckets from the specified registry for the current user This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_buckets(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The registry id. (required) :return: FlowRegistryBucketsEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_buckets_with_http_info(id, **kwargs) else: (data) = self.get_buckets_with_http_info(id, **kwargs) return data
[docs] def get_buckets_with_http_info(self, id, **kwargs): """ Gets the buckets from the specified registry for the current user This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_buckets_with_http_info(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The registry id. (required) :return: FlowRegistryBucketsEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_buckets" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `get_buckets`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/registries/{id}/buckets', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FlowRegistryBucketsEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_bulletin_board(self, **kwargs): """ Gets current bulletins This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_bulletin_board(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str after: Includes bulletins with an id after this value. :param str source_name: Includes bulletins originating from this sources whose name match this regular expression. :param str message: Includes bulletins whose message that match this regular expression. :param str source_id: Includes bulletins originating from this sources whose id match this regular expression. :param str group_id: Includes bulletins originating from this sources whose group id match this regular expression. :param str limit: The number of bulletins to limit the response to. :return: BulletinBoardEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_bulletin_board_with_http_info(**kwargs) else: (data) = self.get_bulletin_board_with_http_info(**kwargs) return data
[docs] def get_bulletin_board_with_http_info(self, **kwargs): """ Gets current bulletins This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_bulletin_board_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str after: Includes bulletins with an id after this value. :param str source_name: Includes bulletins originating from this sources whose name match this regular expression. :param str message: Includes bulletins whose message that match this regular expression. :param str source_id: Includes bulletins originating from this sources whose id match this regular expression. :param str group_id: Includes bulletins originating from this sources whose group id match this regular expression. :param str limit: The number of bulletins to limit the response to. :return: BulletinBoardEntity If the method is called asynchronously, returns the request thread. """ all_params = ['after', 'source_name', 'message', 'source_id', 'group_id', 'limit'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_bulletin_board" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'after' in params: query_params.append(('after', params['after'])) if 'source_name' in params: query_params.append(('sourceName', params['source_name'])) if 'message' in params: query_params.append(('message', params['message'])) if 'source_id' in params: query_params.append(('sourceId', params['source_id'])) if 'group_id' in params: query_params.append(('groupId', params['group_id'])) if 'limit' in params: query_params.append(('limit', params['limit'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/bulletin-board', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='BulletinBoardEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_bulletins(self, **kwargs): """ Retrieves Controller level bulletins This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_bulletins(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: ControllerBulletinsEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_bulletins_with_http_info(**kwargs) else: (data) = self.get_bulletins_with_http_info(**kwargs) return data
[docs] def get_bulletins_with_http_info(self, **kwargs): """ Retrieves Controller level bulletins This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_bulletins_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: ControllerBulletinsEntity If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_bulletins" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/controller/bulletins', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ControllerBulletinsEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_cluster_summary(self, **kwargs): """ The cluster summary for this NiFi This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_cluster_summary(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: ClusteSummaryEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_cluster_summary_with_http_info(**kwargs) else: (data) = self.get_cluster_summary_with_http_info(**kwargs) return data
[docs] def get_cluster_summary_with_http_info(self, **kwargs): """ The cluster summary for this NiFi This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_cluster_summary_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: ClusteSummaryEntity If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_cluster_summary" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/cluster/summary', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ClusteSummaryEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_component_history(self, component_id, **kwargs): """ Gets configuration history for a component Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_component_history(component_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str component_id: The component id. (required) :return: ComponentHistoryEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_component_history_with_http_info(component_id, **kwargs) else: (data) = self.get_component_history_with_http_info(component_id, **kwargs) return data
[docs] def get_component_history_with_http_info(self, component_id, **kwargs): """ Gets configuration history for a component Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_component_history_with_http_info(component_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str component_id: The component id. (required) :return: ComponentHistoryEntity If the method is called asynchronously, returns the request thread. """ all_params = ['component_id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_component_history" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'component_id' is set if ('component_id' not in params) or (params['component_id'] is None): raise ValueError("Missing the required parameter `component_id` when calling `get_component_history`") collection_formats = {} path_params = {} if 'component_id' in params: path_params['componentId'] = params['component_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/history/components/{componentId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ComponentHistoryEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_connection_statistics(self, id, **kwargs): """ Gets statistics for a connection This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_connection_statistics(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The connection id. (required) :param bool nodewise: Whether or not to include the breakdown per node. Optional, defaults to false :param str cluster_node_id: The id of the node where to get the statistics. :return: ConnectionStatisticsEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_connection_statistics_with_http_info(id, **kwargs) else: (data) = self.get_connection_statistics_with_http_info(id, **kwargs) return data
[docs] def get_connection_statistics_with_http_info(self, id, **kwargs): """ Gets statistics for a connection This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_connection_statistics_with_http_info(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The connection id. (required) :param bool nodewise: Whether or not to include the breakdown per node. Optional, defaults to false :param str cluster_node_id: The id of the node where to get the statistics. :return: ConnectionStatisticsEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'nodewise', 'cluster_node_id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_connection_statistics" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `get_connection_statistics`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] if 'nodewise' in params: query_params.append(('nodewise', params['nodewise'])) if 'cluster_node_id' in params: query_params.append(('clusterNodeId', params['cluster_node_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/connections/{id}/statistics', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ConnectionStatisticsEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_connection_status(self, id, **kwargs): """ Gets status for a connection This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_connection_status(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The connection id. (required) :param bool nodewise: Whether or not to include the breakdown per node. Optional, defaults to false :param str cluster_node_id: The id of the node where to get the status. :return: ConnectionStatusEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_connection_status_with_http_info(id, **kwargs) else: (data) = self.get_connection_status_with_http_info(id, **kwargs) return data
[docs] def get_connection_status_with_http_info(self, id, **kwargs): """ Gets status for a connection This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_connection_status_with_http_info(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The connection id. (required) :param bool nodewise: Whether or not to include the breakdown per node. Optional, defaults to false :param str cluster_node_id: The id of the node where to get the status. :return: ConnectionStatusEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'nodewise', 'cluster_node_id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_connection_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `get_connection_status`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] if 'nodewise' in params: query_params.append(('nodewise', params['nodewise'])) if 'cluster_node_id' in params: query_params.append(('clusterNodeId', params['cluster_node_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/connections/{id}/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ConnectionStatusEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_connection_status_history(self, id, **kwargs): """ Gets the status history for a connection This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_connection_status_history(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The connection id. (required) :return: StatusHistoryEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_connection_status_history_with_http_info(id, **kwargs) else: (data) = self.get_connection_status_history_with_http_info(id, **kwargs) return data
[docs] def get_connection_status_history_with_http_info(self, id, **kwargs): """ Gets the status history for a connection This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_connection_status_history_with_http_info(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The connection id. (required) :return: StatusHistoryEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_connection_status_history" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `get_connection_status_history`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/connections/{id}/status/history', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='StatusHistoryEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_controller_service_types(self, **kwargs): """ Retrieves the types of controller services that this NiFi supports Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_controller_service_types(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str service_type: If specified, will only return controller services that are compatible with this type of service. :param str service_bundle_group: If serviceType specified, is the bundle group of the serviceType. :param str service_bundle_artifact: If serviceType specified, is the bundle artifact of the serviceType. :param str service_bundle_version: If serviceType specified, is the bundle version of the serviceType. :param str bundle_group_filter: If specified, will only return types that are a member of this bundle group. :param str bundle_artifact_filter: If specified, will only return types that are a member of this bundle artifact. :param str type_filter: If specified, will only return types whose fully qualified classname matches. :return: ControllerServiceTypesEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_controller_service_types_with_http_info(**kwargs) else: (data) = self.get_controller_service_types_with_http_info(**kwargs) return data
[docs] def get_controller_service_types_with_http_info(self, **kwargs): """ Retrieves the types of controller services that this NiFi supports Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_controller_service_types_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str service_type: If specified, will only return controller services that are compatible with this type of service. :param str service_bundle_group: If serviceType specified, is the bundle group of the serviceType. :param str service_bundle_artifact: If serviceType specified, is the bundle artifact of the serviceType. :param str service_bundle_version: If serviceType specified, is the bundle version of the serviceType. :param str bundle_group_filter: If specified, will only return types that are a member of this bundle group. :param str bundle_artifact_filter: If specified, will only return types that are a member of this bundle artifact. :param str type_filter: If specified, will only return types whose fully qualified classname matches. :return: ControllerServiceTypesEntity If the method is called asynchronously, returns the request thread. """ all_params = ['service_type', 'service_bundle_group', 'service_bundle_artifact', 'service_bundle_version', 'bundle_group_filter', 'bundle_artifact_filter', 'type_filter'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_controller_service_types" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'service_type' in params: query_params.append(('serviceType', params['service_type'])) if 'service_bundle_group' in params: query_params.append(('serviceBundleGroup', params['service_bundle_group'])) if 'service_bundle_artifact' in params: query_params.append(('serviceBundleArtifact', params['service_bundle_artifact'])) if 'service_bundle_version' in params: query_params.append(('serviceBundleVersion', params['service_bundle_version'])) if 'bundle_group_filter' in params: query_params.append(('bundleGroupFilter', params['bundle_group_filter'])) if 'bundle_artifact_filter' in params: query_params.append(('bundleArtifactFilter', params['bundle_artifact_filter'])) if 'type_filter' in params: query_params.append(('typeFilter', params['type_filter'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/controller-service-types', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ControllerServiceTypesEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_controller_services_from_controller(self, **kwargs): """ Gets controller services for reporting tasks If the uiOnly query parameter is provided with a value of true, the returned entity may only contain fields that are necessary for rendering the NiFi User Interface. As such, the selected fields may change at any time, even during incremental releases, without warning. As a result, this parameter should not be provided by any client other than the UI. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_controller_services_from_controller(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param bool ui_only: :param bool include_referencing_components: Whether or not to include services' referencing components in the response :return: ControllerServicesEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_controller_services_from_controller_with_http_info(**kwargs) else: (data) = self.get_controller_services_from_controller_with_http_info(**kwargs) return data
[docs] def get_controller_services_from_controller_with_http_info(self, **kwargs): """ Gets controller services for reporting tasks If the uiOnly query parameter is provided with a value of true, the returned entity may only contain fields that are necessary for rendering the NiFi User Interface. As such, the selected fields may change at any time, even during incremental releases, without warning. As a result, this parameter should not be provided by any client other than the UI. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_controller_services_from_controller_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param bool ui_only: :param bool include_referencing_components: Whether or not to include services' referencing components in the response :return: ControllerServicesEntity If the method is called asynchronously, returns the request thread. """ all_params = ['ui_only', 'include_referencing_components'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_controller_services_from_controller" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'ui_only' in params: query_params.append(('uiOnly', params['ui_only'])) if 'include_referencing_components' in params: query_params.append(('includeReferencingComponents', params['include_referencing_components'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/controller/controller-services', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ControllerServicesEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_controller_services_from_group(self, id, **kwargs): """ Gets all controller services If the uiOnly query parameter is provided with a value of true, the returned entity may only contain fields that are necessary for rendering the NiFi User Interface. As such, the selected fields may change at any time, even during incremental releases, without warning. As a result, this parameter should not be provided by any client other than the UI. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_controller_services_from_group(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The process group id. (required) :param bool include_ancestor_groups: Whether or not to include parent/ancestor process groups :param bool include_descendant_groups: Whether or not to include descendant process groups :param bool include_referencing_components: Whether or not to include services' referencing components in the response :param bool ui_only: :return: ControllerServicesEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_controller_services_from_group_with_http_info(id, **kwargs) else: (data) = self.get_controller_services_from_group_with_http_info(id, **kwargs) return data
[docs] def get_controller_services_from_group_with_http_info(self, id, **kwargs): """ Gets all controller services If the uiOnly query parameter is provided with a value of true, the returned entity may only contain fields that are necessary for rendering the NiFi User Interface. As such, the selected fields may change at any time, even during incremental releases, without warning. As a result, this parameter should not be provided by any client other than the UI. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_controller_services_from_group_with_http_info(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The process group id. (required) :param bool include_ancestor_groups: Whether or not to include parent/ancestor process groups :param bool include_descendant_groups: Whether or not to include descendant process groups :param bool include_referencing_components: Whether or not to include services' referencing components in the response :param bool ui_only: :return: ControllerServicesEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'include_ancestor_groups', 'include_descendant_groups', 'include_referencing_components', 'ui_only'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_controller_services_from_group" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `get_controller_services_from_group`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] if 'include_ancestor_groups' in params: query_params.append(('includeAncestorGroups', params['include_ancestor_groups'])) if 'include_descendant_groups' in params: query_params.append(('includeDescendantGroups', params['include_descendant_groups'])) if 'include_referencing_components' in params: query_params.append(('includeReferencingComponents', params['include_referencing_components'])) if 'ui_only' in params: query_params.append(('uiOnly', params['ui_only'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/process-groups/{id}/controller-services', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ControllerServicesEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_controller_status(self, **kwargs): """ Gets the current status of this NiFi This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_controller_status(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: ControllerStatusEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_controller_status_with_http_info(**kwargs) else: (data) = self.get_controller_status_with_http_info(**kwargs) return data
[docs] def get_controller_status_with_http_info(self, **kwargs): """ Gets the current status of this NiFi This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_controller_status_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: ControllerStatusEntity If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_controller_status" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ControllerStatusEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_current_user(self, **kwargs): """ Retrieves the user identity of the user making the request This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_current_user(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: CurrentUserEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_current_user_with_http_info(**kwargs) else: (data) = self.get_current_user_with_http_info(**kwargs) return data
[docs] def get_current_user_with_http_info(self, **kwargs): """ Retrieves the user identity of the user making the request This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_current_user_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: CurrentUserEntity If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_current_user" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/current-user', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CurrentUserEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_details(self, registry_id, bucket_id, flow_id, **kwargs): """ Gets the details of a flow from the specified registry and bucket for the specified flow for the current user This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_details(registry_id, bucket_id, flow_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str registry_id: The registry client id. (required) :param str bucket_id: The bucket id. (required) :param str flow_id: The flow id. (required) :return: VersionedFlowEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_details_with_http_info(registry_id, bucket_id, flow_id, **kwargs) else: (data) = self.get_details_with_http_info(registry_id, bucket_id, flow_id, **kwargs) return data
[docs] def get_details_with_http_info(self, registry_id, bucket_id, flow_id, **kwargs): """ Gets the details of a flow from the specified registry and bucket for the specified flow for the current user This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_details_with_http_info(registry_id, bucket_id, flow_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str registry_id: The registry client id. (required) :param str bucket_id: The bucket id. (required) :param str flow_id: The flow id. (required) :return: VersionedFlowEntity If the method is called asynchronously, returns the request thread. """ all_params = ['registry_id', 'bucket_id', 'flow_id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_details" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'registry_id' is set if ('registry_id' not in params) or (params['registry_id'] is None): raise ValueError("Missing the required parameter `registry_id` when calling `get_details`") # verify the required parameter 'bucket_id' is set if ('bucket_id' not in params) or (params['bucket_id'] is None): raise ValueError("Missing the required parameter `bucket_id` when calling `get_details`") # verify the required parameter 'flow_id' is set if ('flow_id' not in params) or (params['flow_id'] is None): raise ValueError("Missing the required parameter `flow_id` when calling `get_details`") collection_formats = {} path_params = {} if 'registry_id' in params: path_params['registry-id'] = params['registry_id'] if 'bucket_id' in params: path_params['bucket-id'] = params['bucket_id'] if 'flow_id' in params: path_params['flow-id'] = params['flow_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/registries/{registry-id}/buckets/{bucket-id}/flows/{flow-id}/details', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='VersionedFlowEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_flow(self, id, **kwargs): """ Gets a process group If the uiOnly query parameter is provided with a value of true, the returned entity may only contain fields that are necessary for rendering the NiFi User Interface. As such, the selected fields may change at any time, even during incremental releases, without warning. As a result, this parameter should not be provided by any client other than the UI. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_flow(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The process group id. (required) :param bool ui_only: :return: ProcessGroupFlowEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_flow_with_http_info(id, **kwargs) else: (data) = self.get_flow_with_http_info(id, **kwargs) return data
[docs] def get_flow_with_http_info(self, id, **kwargs): """ Gets a process group If the uiOnly query parameter is provided with a value of true, the returned entity may only contain fields that are necessary for rendering the NiFi User Interface. As such, the selected fields may change at any time, even during incremental releases, without warning. As a result, this parameter should not be provided by any client other than the UI. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_flow_with_http_info(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The process group id. (required) :param bool ui_only: :return: ProcessGroupFlowEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'ui_only'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_flow" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `get_flow`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] if 'ui_only' in params: query_params.append(('uiOnly', params['ui_only'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/process-groups/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ProcessGroupFlowEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_flow_config(self, **kwargs): """ Retrieves the configuration for this NiFi flow This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_flow_config(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: FlowConfigurationEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_flow_config_with_http_info(**kwargs) else: (data) = self.get_flow_config_with_http_info(**kwargs) return data
[docs] def get_flow_config_with_http_info(self, **kwargs): """ Retrieves the configuration for this NiFi flow This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_flow_config_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: FlowConfigurationEntity If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_flow_config" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/config', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FlowConfigurationEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_flow_metrics(self, producer, **kwargs): """ Gets all metrics for the flow from a particular node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_flow_metrics(producer, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str producer: The producer for flow file metrics. Each producer may have its own output format. (required) :param list[str] included_registries: Set of included metrics registries :param str sample_name: Regular Expression Pattern to be applied against the sample name field :param str sample_label_value: Regular Expression Pattern to be applied against the sample label value field :param str root_field_name: Name of the first field of JSON object. Applicable for JSON producer only. :return: StreamingOutput If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_flow_metrics_with_http_info(producer, **kwargs) else: (data) = self.get_flow_metrics_with_http_info(producer, **kwargs) return data
[docs] def get_flow_metrics_with_http_info(self, producer, **kwargs): """ Gets all metrics for the flow from a particular node This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_flow_metrics_with_http_info(producer, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str producer: The producer for flow file metrics. Each producer may have its own output format. (required) :param list[str] included_registries: Set of included metrics registries :param str sample_name: Regular Expression Pattern to be applied against the sample name field :param str sample_label_value: Regular Expression Pattern to be applied against the sample label value field :param str root_field_name: Name of the first field of JSON object. Applicable for JSON producer only. :return: StreamingOutput If the method is called asynchronously, returns the request thread. """ all_params = ['producer', 'included_registries', 'sample_name', 'sample_label_value', 'root_field_name'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_flow_metrics" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'producer' is set if ('producer' not in params) or (params['producer'] is None): raise ValueError("Missing the required parameter `producer` when calling `get_flow_metrics`") collection_formats = {} path_params = {} if 'producer' in params: path_params['producer'] = params['producer'] query_params = [] if 'included_registries' in params: query_params.append(('includedRegistries', params['included_registries'])) collection_formats['includedRegistries'] = 'multi' if 'sample_name' in params: query_params.append(('sampleName', params['sample_name'])) if 'sample_label_value' in params: query_params.append(('sampleLabelValue', params['sample_label_value'])) if 'root_field_name' in params: query_params.append(('rootFieldName', params['root_field_name'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['*/*']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/metrics/{producer}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='StreamingOutput', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_flows(self, registry_id, bucket_id, **kwargs): """ Gets the flows from the specified registry and bucket for the current user This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_flows(registry_id, bucket_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str registry_id: The registry client id. (required) :param str bucket_id: The bucket id. (required) :return: VersionedFlowsEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_flows_with_http_info(registry_id, bucket_id, **kwargs) else: (data) = self.get_flows_with_http_info(registry_id, bucket_id, **kwargs) return data
[docs] def get_flows_with_http_info(self, registry_id, bucket_id, **kwargs): """ Gets the flows from the specified registry and bucket for the current user This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_flows_with_http_info(registry_id, bucket_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str registry_id: The registry client id. (required) :param str bucket_id: The bucket id. (required) :return: VersionedFlowsEntity If the method is called asynchronously, returns the request thread. """ all_params = ['registry_id', 'bucket_id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_flows" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'registry_id' is set if ('registry_id' not in params) or (params['registry_id'] is None): raise ValueError("Missing the required parameter `registry_id` when calling `get_flows`") # verify the required parameter 'bucket_id' is set if ('bucket_id' not in params) or (params['bucket_id'] is None): raise ValueError("Missing the required parameter `bucket_id` when calling `get_flows`") collection_formats = {} path_params = {} if 'registry_id' in params: path_params['registry-id'] = params['registry_id'] if 'bucket_id' in params: path_params['bucket-id'] = params['bucket_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/registries/{registry-id}/buckets/{bucket-id}/flows', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='VersionedFlowsEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_input_port_status(self, id, **kwargs): """ Gets status for an input port This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_input_port_status(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The input port id. (required) :param bool nodewise: Whether or not to include the breakdown per node. Optional, defaults to false :param str cluster_node_id: The id of the node where to get the status. :return: PortStatusEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_input_port_status_with_http_info(id, **kwargs) else: (data) = self.get_input_port_status_with_http_info(id, **kwargs) return data
[docs] def get_input_port_status_with_http_info(self, id, **kwargs): """ Gets status for an input port This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_input_port_status_with_http_info(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The input port id. (required) :param bool nodewise: Whether or not to include the breakdown per node. Optional, defaults to false :param str cluster_node_id: The id of the node where to get the status. :return: PortStatusEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'nodewise', 'cluster_node_id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_input_port_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `get_input_port_status`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] if 'nodewise' in params: query_params.append(('nodewise', params['nodewise'])) if 'cluster_node_id' in params: query_params.append(('clusterNodeId', params['cluster_node_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/input-ports/{id}/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PortStatusEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_output_port_status(self, id, **kwargs): """ Gets status for an output port This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_output_port_status(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The output port id. (required) :param bool nodewise: Whether or not to include the breakdown per node. Optional, defaults to false :param str cluster_node_id: The id of the node where to get the status. :return: PortStatusEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_output_port_status_with_http_info(id, **kwargs) else: (data) = self.get_output_port_status_with_http_info(id, **kwargs) return data
[docs] def get_output_port_status_with_http_info(self, id, **kwargs): """ Gets status for an output port This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_output_port_status_with_http_info(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The output port id. (required) :param bool nodewise: Whether or not to include the breakdown per node. Optional, defaults to false :param str cluster_node_id: The id of the node where to get the status. :return: PortStatusEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'nodewise', 'cluster_node_id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_output_port_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `get_output_port_status`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] if 'nodewise' in params: query_params.append(('nodewise', params['nodewise'])) if 'cluster_node_id' in params: query_params.append(('clusterNodeId', params['cluster_node_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/output-ports/{id}/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PortStatusEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_parameter_contexts(self, **kwargs): """ Gets all Parameter Contexts This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_parameter_contexts(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: ParameterContextsEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_parameter_contexts_with_http_info(**kwargs) else: (data) = self.get_parameter_contexts_with_http_info(**kwargs) return data
[docs] def get_parameter_contexts_with_http_info(self, **kwargs): """ Gets all Parameter Contexts This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_parameter_contexts_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: ParameterContextsEntity If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_parameter_contexts" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/parameter-contexts', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ParameterContextsEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_parameter_provider_types(self, **kwargs): """ Retrieves the types of parameter providers that this NiFi supports Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_parameter_provider_types(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str bundle_group_filter: If specified, will only return types that are a member of this bundle group. :param str bundle_artifact_filter: If specified, will only return types that are a member of this bundle artifact. :param str type: If specified, will only return types whose fully qualified classname matches. :return: ParameterProviderTypesEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_parameter_provider_types_with_http_info(**kwargs) else: (data) = self.get_parameter_provider_types_with_http_info(**kwargs) return data
[docs] def get_parameter_provider_types_with_http_info(self, **kwargs): """ Retrieves the types of parameter providers that this NiFi supports Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_parameter_provider_types_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str bundle_group_filter: If specified, will only return types that are a member of this bundle group. :param str bundle_artifact_filter: If specified, will only return types that are a member of this bundle artifact. :param str type: If specified, will only return types whose fully qualified classname matches. :return: ParameterProviderTypesEntity If the method is called asynchronously, returns the request thread. """ all_params = ['bundle_group_filter', 'bundle_artifact_filter', 'type'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_parameter_provider_types" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'bundle_group_filter' in params: query_params.append(('bundleGroupFilter', params['bundle_group_filter'])) if 'bundle_artifact_filter' in params: query_params.append(('bundleArtifactFilter', params['bundle_artifact_filter'])) if 'type' in params: query_params.append(('type', params['type'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/parameter-provider-types', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ParameterProviderTypesEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_parameter_providers(self, **kwargs): """ Gets all parameter providers This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_parameter_providers(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: ParameterProvidersEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_parameter_providers_with_http_info(**kwargs) else: (data) = self.get_parameter_providers_with_http_info(**kwargs) return data
[docs] def get_parameter_providers_with_http_info(self, **kwargs): """ Gets all parameter providers This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_parameter_providers_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: ParameterProvidersEntity If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_parameter_providers" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/parameter-providers', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ParameterProvidersEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_prioritizers(self, **kwargs): """ Retrieves the types of prioritizers that this NiFi supports Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_prioritizers(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: PrioritizerTypesEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_prioritizers_with_http_info(**kwargs) else: (data) = self.get_prioritizers_with_http_info(**kwargs) return data
[docs] def get_prioritizers_with_http_info(self, **kwargs): """ Retrieves the types of prioritizers that this NiFi supports Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_prioritizers_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: PrioritizerTypesEntity If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_prioritizers" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/prioritizers', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PrioritizerTypesEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_process_group_status(self, id, **kwargs): """ Gets the status for a process group The status for a process group includes status for all descendent components. When invoked on the root group with recursive set to true, it will return the current status of every component in the flow. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_process_group_status(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The process group id. (required) :param bool recursive: Whether all descendant groups and the status of their content will be included. Optional, defaults to false :param bool nodewise: Whether or not to include the breakdown per node. Optional, defaults to false :param str cluster_node_id: The id of the node where to get the status. :return: ProcessGroupStatusEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_process_group_status_with_http_info(id, **kwargs) else: (data) = self.get_process_group_status_with_http_info(id, **kwargs) return data
[docs] def get_process_group_status_with_http_info(self, id, **kwargs): """ Gets the status for a process group The status for a process group includes status for all descendent components. When invoked on the root group with recursive set to true, it will return the current status of every component in the flow. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_process_group_status_with_http_info(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The process group id. (required) :param bool recursive: Whether all descendant groups and the status of their content will be included. Optional, defaults to false :param bool nodewise: Whether or not to include the breakdown per node. Optional, defaults to false :param str cluster_node_id: The id of the node where to get the status. :return: ProcessGroupStatusEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'recursive', 'nodewise', 'cluster_node_id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_process_group_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `get_process_group_status`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] if 'recursive' in params: query_params.append(('recursive', params['recursive'])) if 'nodewise' in params: query_params.append(('nodewise', params['nodewise'])) if 'cluster_node_id' in params: query_params.append(('clusterNodeId', params['cluster_node_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/process-groups/{id}/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ProcessGroupStatusEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_process_group_status_history(self, id, **kwargs): """ Gets status history for a remote process group This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_process_group_status_history(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The process group id. (required) :return: StatusHistoryEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_process_group_status_history_with_http_info(id, **kwargs) else: (data) = self.get_process_group_status_history_with_http_info(id, **kwargs) return data
[docs] def get_process_group_status_history_with_http_info(self, id, **kwargs): """ Gets status history for a remote process group This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_process_group_status_history_with_http_info(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The process group id. (required) :return: StatusHistoryEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_process_group_status_history" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `get_process_group_status_history`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/process-groups/{id}/status/history', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='StatusHistoryEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_processor_status(self, id, **kwargs): """ Gets status for a processor This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_processor_status(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The processor id. (required) :param bool nodewise: Whether or not to include the breakdown per node. Optional, defaults to false :param str cluster_node_id: The id of the node where to get the status. :return: ProcessorStatusEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_processor_status_with_http_info(id, **kwargs) else: (data) = self.get_processor_status_with_http_info(id, **kwargs) return data
[docs] def get_processor_status_with_http_info(self, id, **kwargs): """ Gets status for a processor This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_processor_status_with_http_info(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The processor id. (required) :param bool nodewise: Whether or not to include the breakdown per node. Optional, defaults to false :param str cluster_node_id: The id of the node where to get the status. :return: ProcessorStatusEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'nodewise', 'cluster_node_id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_processor_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `get_processor_status`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] if 'nodewise' in params: query_params.append(('nodewise', params['nodewise'])) if 'cluster_node_id' in params: query_params.append(('clusterNodeId', params['cluster_node_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/processors/{id}/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ProcessorStatusEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_processor_status_history(self, id, **kwargs): """ Gets status history for a processor This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_processor_status_history(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The processor id. (required) :return: StatusHistoryEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_processor_status_history_with_http_info(id, **kwargs) else: (data) = self.get_processor_status_history_with_http_info(id, **kwargs) return data
[docs] def get_processor_status_history_with_http_info(self, id, **kwargs): """ Gets status history for a processor This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_processor_status_history_with_http_info(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The processor id. (required) :return: StatusHistoryEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_processor_status_history" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `get_processor_status_history`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/processors/{id}/status/history', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='StatusHistoryEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_processor_types(self, **kwargs): """ Retrieves the types of processors that this NiFi supports Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_processor_types(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str bundle_group_filter: If specified, will only return types that are a member of this bundle group. :param str bundle_artifact_filter: If specified, will only return types that are a member of this bundle artifact. :param str type: If specified, will only return types whose fully qualified classname matches. :return: ProcessorTypesEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_processor_types_with_http_info(**kwargs) else: (data) = self.get_processor_types_with_http_info(**kwargs) return data
[docs] def get_processor_types_with_http_info(self, **kwargs): """ Retrieves the types of processors that this NiFi supports Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_processor_types_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str bundle_group_filter: If specified, will only return types that are a member of this bundle group. :param str bundle_artifact_filter: If specified, will only return types that are a member of this bundle artifact. :param str type: If specified, will only return types whose fully qualified classname matches. :return: ProcessorTypesEntity If the method is called asynchronously, returns the request thread. """ all_params = ['bundle_group_filter', 'bundle_artifact_filter', 'type'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_processor_types" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'bundle_group_filter' in params: query_params.append(('bundleGroupFilter', params['bundle_group_filter'])) if 'bundle_artifact_filter' in params: query_params.append(('bundleArtifactFilter', params['bundle_artifact_filter'])) if 'type' in params: query_params.append(('type', params['type'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/processor-types', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ProcessorTypesEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_registry_clients(self, **kwargs): """ Gets the listing of available flow registry clients This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_registry_clients(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: FlowRegistryClientsEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_registry_clients_with_http_info(**kwargs) else: (data) = self.get_registry_clients_with_http_info(**kwargs) return data
[docs] def get_registry_clients_with_http_info(self, **kwargs): """ Gets the listing of available flow registry clients This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_registry_clients_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: FlowRegistryClientsEntity If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_registry_clients" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/registries', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FlowRegistryClientsEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_remote_process_group_status(self, id, **kwargs): """ Gets status for a remote process group This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_remote_process_group_status(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The remote process group id. (required) :param bool nodewise: Whether or not to include the breakdown per node. Optional, defaults to false :param str cluster_node_id: The id of the node where to get the status. :return: RemoteProcessGroupStatusEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_remote_process_group_status_with_http_info(id, **kwargs) else: (data) = self.get_remote_process_group_status_with_http_info(id, **kwargs) return data
[docs] def get_remote_process_group_status_with_http_info(self, id, **kwargs): """ Gets status for a remote process group This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_remote_process_group_status_with_http_info(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The remote process group id. (required) :param bool nodewise: Whether or not to include the breakdown per node. Optional, defaults to false :param str cluster_node_id: The id of the node where to get the status. :return: RemoteProcessGroupStatusEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'nodewise', 'cluster_node_id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_remote_process_group_status" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `get_remote_process_group_status`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] if 'nodewise' in params: query_params.append(('nodewise', params['nodewise'])) if 'cluster_node_id' in params: query_params.append(('clusterNodeId', params['cluster_node_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/remote-process-groups/{id}/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='RemoteProcessGroupStatusEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_remote_process_group_status_history(self, id, **kwargs): """ Gets the status history This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_remote_process_group_status_history(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The remote process group id. (required) :return: StatusHistoryEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_remote_process_group_status_history_with_http_info(id, **kwargs) else: (data) = self.get_remote_process_group_status_history_with_http_info(id, **kwargs) return data
[docs] def get_remote_process_group_status_history_with_http_info(self, id, **kwargs): """ Gets the status history This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_remote_process_group_status_history_with_http_info(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The remote process group id. (required) :return: StatusHistoryEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_remote_process_group_status_history" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `get_remote_process_group_status_history`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/remote-process-groups/{id}/status/history', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='StatusHistoryEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_reporting_task_types(self, **kwargs): """ Retrieves the types of reporting tasks that this NiFi supports Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_reporting_task_types(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str bundle_group_filter: If specified, will only return types that are a member of this bundle group. :param str bundle_artifact_filter: If specified, will only return types that are a member of this bundle artifact. :param str type: If specified, will only return types whose fully qualified classname matches. :return: ReportingTaskTypesEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_reporting_task_types_with_http_info(**kwargs) else: (data) = self.get_reporting_task_types_with_http_info(**kwargs) return data
[docs] def get_reporting_task_types_with_http_info(self, **kwargs): """ Retrieves the types of reporting tasks that this NiFi supports Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_reporting_task_types_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str bundle_group_filter: If specified, will only return types that are a member of this bundle group. :param str bundle_artifact_filter: If specified, will only return types that are a member of this bundle artifact. :param str type: If specified, will only return types whose fully qualified classname matches. :return: ReportingTaskTypesEntity If the method is called asynchronously, returns the request thread. """ all_params = ['bundle_group_filter', 'bundle_artifact_filter', 'type'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_reporting_task_types" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'bundle_group_filter' in params: query_params.append(('bundleGroupFilter', params['bundle_group_filter'])) if 'bundle_artifact_filter' in params: query_params.append(('bundleArtifactFilter', params['bundle_artifact_filter'])) if 'type' in params: query_params.append(('type', params['type'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/reporting-task-types', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ReportingTaskTypesEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_reporting_tasks(self, **kwargs): """ Gets all reporting tasks This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_reporting_tasks(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: ReportingTasksEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_reporting_tasks_with_http_info(**kwargs) else: (data) = self.get_reporting_tasks_with_http_info(**kwargs) return data
[docs] def get_reporting_tasks_with_http_info(self, **kwargs): """ Gets all reporting tasks This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_reporting_tasks_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: ReportingTasksEntity If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_reporting_tasks" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/reporting-tasks', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ReportingTasksEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_runtime_manifest(self, **kwargs): """ Retrieves the runtime manifest for this NiFi instance. Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_runtime_manifest(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: RuntimeManifestEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_runtime_manifest_with_http_info(**kwargs) else: (data) = self.get_runtime_manifest_with_http_info(**kwargs) return data
[docs] def get_runtime_manifest_with_http_info(self, **kwargs): """ Retrieves the runtime manifest for this NiFi instance. Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_runtime_manifest_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: RuntimeManifestEntity If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_runtime_manifest" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/runtime-manifest', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='RuntimeManifestEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_templates(self, **kwargs): """ Gets all templates This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_templates(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: TemplatesEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_templates_with_http_info(**kwargs) else: (data) = self.get_templates_with_http_info(**kwargs) return data
[docs] def get_templates_with_http_info(self, **kwargs): """ Gets all templates This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_templates_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: TemplatesEntity If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_templates" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/templates', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TemplatesEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_versions(self, registry_id, bucket_id, flow_id, **kwargs): """ Gets the flow versions from the specified registry and bucket for the specified flow for the current user This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_versions(registry_id, bucket_id, flow_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str registry_id: The registry client id. (required) :param str bucket_id: The bucket id. (required) :param str flow_id: The flow id. (required) :return: VersionedFlowSnapshotMetadataSetEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_versions_with_http_info(registry_id, bucket_id, flow_id, **kwargs) else: (data) = self.get_versions_with_http_info(registry_id, bucket_id, flow_id, **kwargs) return data
[docs] def get_versions_with_http_info(self, registry_id, bucket_id, flow_id, **kwargs): """ Gets the flow versions from the specified registry and bucket for the specified flow for the current user This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_versions_with_http_info(registry_id, bucket_id, flow_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str registry_id: The registry client id. (required) :param str bucket_id: The bucket id. (required) :param str flow_id: The flow id. (required) :return: VersionedFlowSnapshotMetadataSetEntity If the method is called asynchronously, returns the request thread. """ all_params = ['registry_id', 'bucket_id', 'flow_id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_versions" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'registry_id' is set if ('registry_id' not in params) or (params['registry_id'] is None): raise ValueError("Missing the required parameter `registry_id` when calling `get_versions`") # verify the required parameter 'bucket_id' is set if ('bucket_id' not in params) or (params['bucket_id'] is None): raise ValueError("Missing the required parameter `bucket_id` when calling `get_versions`") # verify the required parameter 'flow_id' is set if ('flow_id' not in params) or (params['flow_id'] is None): raise ValueError("Missing the required parameter `flow_id` when calling `get_versions`") collection_formats = {} path_params = {} if 'registry_id' in params: path_params['registry-id'] = params['registry_id'] if 'bucket_id' in params: path_params['bucket-id'] = params['bucket_id'] if 'flow_id' in params: path_params['flow-id'] = params['flow_id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/registries/{registry-id}/buckets/{bucket-id}/flows/{flow-id}/versions', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='VersionedFlowSnapshotMetadataSetEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def query_history(self, offset, count, **kwargs): """ Gets configuration history Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.query_history(offset, count, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str offset: The offset into the result set. (required) :param str count: The number of actions to return. (required) :param str sort_column: The field to sort on. :param str sort_order: The direction to sort. :param str start_date: Include actions after this date. :param str end_date: Include actions before this date. :param str user_identity: Include actions performed by this user. :param str source_id: Include actions on this component. :return: HistoryEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.query_history_with_http_info(offset, count, **kwargs) else: (data) = self.query_history_with_http_info(offset, count, **kwargs) return data
[docs] def query_history_with_http_info(self, offset, count, **kwargs): """ Gets configuration history Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.query_history_with_http_info(offset, count, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str offset: The offset into the result set. (required) :param str count: The number of actions to return. (required) :param str sort_column: The field to sort on. :param str sort_order: The direction to sort. :param str start_date: Include actions after this date. :param str end_date: Include actions before this date. :param str user_identity: Include actions performed by this user. :param str source_id: Include actions on this component. :return: HistoryEntity If the method is called asynchronously, returns the request thread. """ all_params = ['offset', 'count', 'sort_column', 'sort_order', 'start_date', 'end_date', 'user_identity', 'source_id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method query_history" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'offset' is set if ('offset' not in params) or (params['offset'] is None): raise ValueError("Missing the required parameter `offset` when calling `query_history`") # verify the required parameter 'count' is set if ('count' not in params) or (params['count'] is None): raise ValueError("Missing the required parameter `count` when calling `query_history`") collection_formats = {} path_params = {} query_params = [] if 'offset' in params: query_params.append(('offset', params['offset'])) if 'count' in params: query_params.append(('count', params['count'])) if 'sort_column' in params: query_params.append(('sortColumn', params['sort_column'])) if 'sort_order' in params: query_params.append(('sortOrder', params['sort_order'])) if 'start_date' in params: query_params.append(('startDate', params['start_date'])) if 'end_date' in params: query_params.append(('endDate', params['end_date'])) if 'user_identity' in params: query_params.append(('userIdentity', params['user_identity'])) if 'source_id' in params: query_params.append(('sourceId', params['source_id'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/history', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='HistoryEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def schedule_components(self, id, body, **kwargs): """ Schedule or unschedule components in the specified Process Group. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.schedule_components(id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The process group id. (required) :param ScheduleComponentsEntity body: The request to schedule or unschedule. If the comopnents in the request are not specified, all authorized components will be considered. (required) :return: ScheduleComponentsEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.schedule_components_with_http_info(id, body, **kwargs) else: (data) = self.schedule_components_with_http_info(id, body, **kwargs) return data
[docs] def schedule_components_with_http_info(self, id, body, **kwargs): """ Schedule or unschedule components in the specified Process Group. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.schedule_components_with_http_info(id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The process group id. (required) :param ScheduleComponentsEntity body: The request to schedule or unschedule. If the comopnents in the request are not specified, all authorized components will be considered. (required) :return: ScheduleComponentsEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'body'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method schedule_components" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `schedule_components`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `schedule_components`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/process-groups/{id}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ScheduleComponentsEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def search_cluster(self, q, **kwargs): """ Searches the cluster for a node with the specified address Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.search_cluster(q, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str q: Node address to search for. (required) :return: ClusterSearchResultsEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.search_cluster_with_http_info(q, **kwargs) else: (data) = self.search_cluster_with_http_info(q, **kwargs) return data
[docs] def search_cluster_with_http_info(self, q, **kwargs): """ Searches the cluster for a node with the specified address Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.search_cluster_with_http_info(q, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str q: Node address to search for. (required) :return: ClusterSearchResultsEntity If the method is called asynchronously, returns the request thread. """ all_params = ['q'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method search_cluster" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'q' is set if ('q' not in params) or (params['q'] is None): raise ValueError("Missing the required parameter `q` when calling `search_cluster`") collection_formats = {} path_params = {} query_params = [] if 'q' in params: query_params.append(('q', params['q'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/cluster/search-results', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ClusterSearchResultsEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def search_flow(self, **kwargs): """ Performs a search against this NiFi using the specified search term Only search results from authorized components will be returned. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.search_flow(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str q: :param str a: :return: SearchResultsEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.search_flow_with_http_info(**kwargs) else: (data) = self.search_flow_with_http_info(**kwargs) return data
[docs] def search_flow_with_http_info(self, **kwargs): """ Performs a search against this NiFi using the specified search term Only search results from authorized components will be returned. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.search_flow_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str q: :param str a: :return: SearchResultsEntity If the method is called asynchronously, returns the request thread. """ all_params = ['q', 'a'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method search_flow" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'q' in params: query_params.append(('q', params['q'])) if 'a' in params: query_params.append(('a', params['a'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/flow/search-results', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SearchResultsEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)