Skip to content

Latest commit

 

History

History
814 lines (574 loc) · 25.1 KB

ControllerApi.md

File metadata and controls

814 lines (574 loc) · 25.1 KB

ControllerApi

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

Method HTTP request Description
createBulletin POST /controller/bulletin Creates a new bulletin
createControllerService POST /controller/controller-services Creates a new controller service
createRegistryClient POST /controller/registry-clients Creates a new registry client
createReportingTask POST /controller/reporting-tasks Creates a new reporting task
deleteHistory DELETE /controller/history Purges history
deleteNode DELETE /controller/cluster/nodes/{id} Removes a node from the cluster
deleteRegistryClient DELETE /controller/registry-clients/{id} Deletes a registry client
getCluster GET /controller/cluster Gets the contents of the cluster
getControllerConfig GET /controller/config Retrieves the configuration for this NiFi Controller
getNode GET /controller/cluster/nodes/{id} Gets a node in the cluster
getRegistryClient GET /controller/registry-clients/{id} Gets a registry client
getRegistryClients GET /controller/registry-clients Gets the listing of available registry clients
updateControllerConfig PUT /controller/config Retrieves the configuration for this NiFi
updateNode PUT /controller/cluster/nodes/{id} Updates a node in the cluster
updateRegistryClient PUT /controller/registry-clients/{id} Updates a registry client

createBulletin

BulletinEntity createBulletin(body)

Creates a new bulletin

Example

// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiClient;
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.Configuration;
//import com.github.hermannpencole.nifi.swagger.auth.*;
//import com.github.hermannpencole.nifi.swagger.client.ControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: auth
OAuth auth = (OAuth) defaultClient.getAuthentication("auth");
auth.setAccessToken("YOUR ACCESS TOKEN");

ControllerApi apiInstance = new ControllerApi();
BulletinEntity body = new BulletinEntity(); // BulletinEntity | The reporting task configuration details.
try {
    BulletinEntity result = apiInstance.createBulletin(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ControllerApi#createBulletin");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body BulletinEntity The reporting task configuration details.

Return type

BulletinEntity

Authorization

auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createControllerService

ControllerServiceEntity createControllerService(body)

Creates a new controller service

Example

// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiClient;
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.Configuration;
//import com.github.hermannpencole.nifi.swagger.auth.*;
//import com.github.hermannpencole.nifi.swagger.client.ControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: auth
OAuth auth = (OAuth) defaultClient.getAuthentication("auth");
auth.setAccessToken("YOUR ACCESS TOKEN");

ControllerApi apiInstance = new ControllerApi();
ControllerServiceEntity body = new ControllerServiceEntity(); // ControllerServiceEntity | The controller service configuration details.
try {
    ControllerServiceEntity result = apiInstance.createControllerService(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ControllerApi#createControllerService");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ControllerServiceEntity The controller service configuration details.

Return type

ControllerServiceEntity

Authorization

auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createRegistryClient

RegistryClientEntity createRegistryClient(body)

Creates a new registry client

Example

// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiClient;
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.Configuration;
//import com.github.hermannpencole.nifi.swagger.auth.*;
//import com.github.hermannpencole.nifi.swagger.client.ControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: auth
OAuth auth = (OAuth) defaultClient.getAuthentication("auth");
auth.setAccessToken("YOUR ACCESS TOKEN");

ControllerApi apiInstance = new ControllerApi();
RegistryClientEntity body = new RegistryClientEntity(); // RegistryClientEntity | The registry configuration details.
try {
    RegistryClientEntity result = apiInstance.createRegistryClient(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ControllerApi#createRegistryClient");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body RegistryClientEntity The registry configuration details.

Return type

RegistryClientEntity

Authorization

auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createReportingTask

ReportingTaskEntity createReportingTask(body)

Creates a new reporting task

Example

// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiClient;
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.Configuration;
//import com.github.hermannpencole.nifi.swagger.auth.*;
//import com.github.hermannpencole.nifi.swagger.client.ControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: auth
OAuth auth = (OAuth) defaultClient.getAuthentication("auth");
auth.setAccessToken("YOUR ACCESS TOKEN");

ControllerApi apiInstance = new ControllerApi();
ReportingTaskEntity body = new ReportingTaskEntity(); // ReportingTaskEntity | The reporting task configuration details.
try {
    ReportingTaskEntity result = apiInstance.createReportingTask(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ControllerApi#createReportingTask");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ReportingTaskEntity The reporting task configuration details.

Return type

ReportingTaskEntity

Authorization

auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteHistory

HistoryEntity deleteHistory(endDate)

Purges history

Example

// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiClient;
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.Configuration;
//import com.github.hermannpencole.nifi.swagger.auth.*;
//import com.github.hermannpencole.nifi.swagger.client.ControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: auth
OAuth auth = (OAuth) defaultClient.getAuthentication("auth");
auth.setAccessToken("YOUR ACCESS TOKEN");

ControllerApi apiInstance = new ControllerApi();
String endDate = "endDate_example"; // String | Purge actions before this date/time.
try {
    HistoryEntity result = apiInstance.deleteHistory(endDate);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ControllerApi#deleteHistory");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
endDate String Purge actions before this date/time.

Return type

HistoryEntity

Authorization

auth

HTTP request headers

  • Content-Type: /
  • Accept: application/json

deleteNode

NodeEntity deleteNode(id)

Removes a node from the cluster

Example

// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiClient;
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.Configuration;
//import com.github.hermannpencole.nifi.swagger.auth.*;
//import com.github.hermannpencole.nifi.swagger.client.ControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: auth
OAuth auth = (OAuth) defaultClient.getAuthentication("auth");
auth.setAccessToken("YOUR ACCESS TOKEN");

ControllerApi apiInstance = new ControllerApi();
String id = "id_example"; // String | The node id.
try {
    NodeEntity result = apiInstance.deleteNode(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ControllerApi#deleteNode");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The node id.

Return type

NodeEntity

Authorization

auth

HTTP request headers

  • Content-Type: /
  • Accept: application/json

deleteRegistryClient

RegistryClientEntity deleteRegistryClient(id, version, clientId)

Deletes a registry client

Example

// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiClient;
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.Configuration;
//import com.github.hermannpencole.nifi.swagger.auth.*;
//import com.github.hermannpencole.nifi.swagger.client.ControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: auth
OAuth auth = (OAuth) defaultClient.getAuthentication("auth");
auth.setAccessToken("YOUR ACCESS TOKEN");

ControllerApi apiInstance = new ControllerApi();
String id = "id_example"; // String | The registry id.
String version = "version_example"; // String | The revision is used to verify the client is working with the latest version of the flow.
String clientId = "clientId_example"; // String | If the client id is not specified, new one will be generated. This value (whether specified or generated) is included in the response.
try {
    RegistryClientEntity result = apiInstance.deleteRegistryClient(id, version, clientId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ControllerApi#deleteRegistryClient");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The registry id.
version String The revision is used to verify the client is working with the latest version of the flow. [optional]
clientId String If the client id is not specified, new one will be generated. This value (whether specified or generated) is included in the response. [optional]

Return type

RegistryClientEntity

Authorization

auth

HTTP request headers

  • Content-Type: /
  • Accept: application/json

getCluster

ClusterEntity getCluster()

Gets the contents of the cluster

Returns the contents of the cluster including all nodes and their status.

Example

// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiClient;
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.Configuration;
//import com.github.hermannpencole.nifi.swagger.auth.*;
//import com.github.hermannpencole.nifi.swagger.client.ControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: auth
OAuth auth = (OAuth) defaultClient.getAuthentication("auth");
auth.setAccessToken("YOUR ACCESS TOKEN");

ControllerApi apiInstance = new ControllerApi();
try {
    ClusterEntity result = apiInstance.getCluster();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ControllerApi#getCluster");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

ClusterEntity

Authorization

auth

HTTP request headers

  • Content-Type: /
  • Accept: application/json

getControllerConfig

ControllerConfigurationEntity getControllerConfig()

Retrieves the configuration for this NiFi Controller

Example

// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiClient;
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.Configuration;
//import com.github.hermannpencole.nifi.swagger.auth.*;
//import com.github.hermannpencole.nifi.swagger.client.ControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: auth
OAuth auth = (OAuth) defaultClient.getAuthentication("auth");
auth.setAccessToken("YOUR ACCESS TOKEN");

ControllerApi apiInstance = new ControllerApi();
try {
    ControllerConfigurationEntity result = apiInstance.getControllerConfig();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ControllerApi#getControllerConfig");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

ControllerConfigurationEntity

Authorization

auth

HTTP request headers

  • Content-Type: /
  • Accept: application/json

getNode

NodeEntity getNode(id)

Gets a node in the cluster

Example

// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiClient;
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.Configuration;
//import com.github.hermannpencole.nifi.swagger.auth.*;
//import com.github.hermannpencole.nifi.swagger.client.ControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: auth
OAuth auth = (OAuth) defaultClient.getAuthentication("auth");
auth.setAccessToken("YOUR ACCESS TOKEN");

ControllerApi apiInstance = new ControllerApi();
String id = "id_example"; // String | The node id.
try {
    NodeEntity result = apiInstance.getNode(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ControllerApi#getNode");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The node id.

Return type

NodeEntity

Authorization

auth

HTTP request headers

  • Content-Type: /
  • Accept: application/json

getRegistryClient

RegistryClientEntity getRegistryClient(id)

Gets a registry client

Example

// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiClient;
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.Configuration;
//import com.github.hermannpencole.nifi.swagger.auth.*;
//import com.github.hermannpencole.nifi.swagger.client.ControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: auth
OAuth auth = (OAuth) defaultClient.getAuthentication("auth");
auth.setAccessToken("YOUR ACCESS TOKEN");

ControllerApi apiInstance = new ControllerApi();
String id = "id_example"; // String | The registry id.
try {
    RegistryClientEntity result = apiInstance.getRegistryClient(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ControllerApi#getRegistryClient");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The registry id.

Return type

RegistryClientEntity

Authorization

auth

HTTP request headers

  • Content-Type: /
  • Accept: application/json

getRegistryClients

RegistryClientsEntity getRegistryClients()

Gets the listing of available registry clients

Example

// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiClient;
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.Configuration;
//import com.github.hermannpencole.nifi.swagger.auth.*;
//import com.github.hermannpencole.nifi.swagger.client.ControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: auth
OAuth auth = (OAuth) defaultClient.getAuthentication("auth");
auth.setAccessToken("YOUR ACCESS TOKEN");

ControllerApi apiInstance = new ControllerApi();
try {
    RegistryClientsEntity result = apiInstance.getRegistryClients();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ControllerApi#getRegistryClients");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

RegistryClientsEntity

Authorization

auth

HTTP request headers

  • Content-Type: /
  • Accept: application/json

updateControllerConfig

ControllerConfigurationEntity updateControllerConfig(body)

Retrieves the configuration for this NiFi

Example

// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiClient;
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.Configuration;
//import com.github.hermannpencole.nifi.swagger.auth.*;
//import com.github.hermannpencole.nifi.swagger.client.ControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: auth
OAuth auth = (OAuth) defaultClient.getAuthentication("auth");
auth.setAccessToken("YOUR ACCESS TOKEN");

ControllerApi apiInstance = new ControllerApi();
ControllerConfigurationEntity body = new ControllerConfigurationEntity(); // ControllerConfigurationEntity | The controller configuration.
try {
    ControllerConfigurationEntity result = apiInstance.updateControllerConfig(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ControllerApi#updateControllerConfig");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ControllerConfigurationEntity The controller configuration.

Return type

ControllerConfigurationEntity

Authorization

auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateNode

NodeEntity updateNode(id, body)

Updates a node in the cluster

Example

// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiClient;
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.Configuration;
//import com.github.hermannpencole.nifi.swagger.auth.*;
//import com.github.hermannpencole.nifi.swagger.client.ControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: auth
OAuth auth = (OAuth) defaultClient.getAuthentication("auth");
auth.setAccessToken("YOUR ACCESS TOKEN");

ControllerApi apiInstance = new ControllerApi();
String id = "id_example"; // String | The node id.
NodeEntity body = new NodeEntity(); // NodeEntity | The node configuration. The only configuration that will be honored at this endpoint is the status.
try {
    NodeEntity result = apiInstance.updateNode(id, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ControllerApi#updateNode");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The node id.
body NodeEntity The node configuration. The only configuration that will be honored at this endpoint is the status.

Return type

NodeEntity

Authorization

auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateRegistryClient

RegistryClientEntity updateRegistryClient(id, body)

Updates a registry client

Example

// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiClient;
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.Configuration;
//import com.github.hermannpencole.nifi.swagger.auth.*;
//import com.github.hermannpencole.nifi.swagger.client.ControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: auth
OAuth auth = (OAuth) defaultClient.getAuthentication("auth");
auth.setAccessToken("YOUR ACCESS TOKEN");

ControllerApi apiInstance = new ControllerApi();
String id = "id_example"; // String | The registry id.
RegistryClientEntity body = new RegistryClientEntity(); // RegistryClientEntity | The registry configuration details.
try {
    RegistryClientEntity result = apiInstance.updateRegistryClient(id, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ControllerApi#updateRegistryClient");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The registry id.
body RegistryClientEntity The registry configuration details.

Return type

RegistryClientEntity

Authorization

auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json