Skip to content

Latest commit

 

History

History
342 lines (242 loc) · 10.7 KB

ProcessorsApi.md

File metadata and controls

342 lines (242 loc) · 10.7 KB

ProcessorsApi

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

Method HTTP request Description
clearState POST /processors/{id}/state/clear-requests Clears the state for a processor
deleteProcessor DELETE /processors/{id} Deletes a processor
getProcessor GET /processors/{id} Gets a processor
getPropertyDescriptor GET /processors/{id}/descriptors Gets the descriptor for a processor property
getState GET /processors/{id}/state Gets the state for a processor
updateProcessor PUT /processors/{id} Updates a processor

clearState

ComponentStateEntity clearState(id)

Clears the state for a processor

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.ProcessorsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ProcessorsApi apiInstance = new ProcessorsApi();
String id = "id_example"; // String | The processor id.
try {
    ComponentStateEntity result = apiInstance.clearState(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ProcessorsApi#clearState");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The processor id.

Return type

ComponentStateEntity

Authorization

auth

HTTP request headers

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

deleteProcessor

ProcessorEntity deleteProcessor(id, version, clientId)

Deletes a processor

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.ProcessorsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ProcessorsApi apiInstance = new ProcessorsApi();
String id = "id_example"; // String | The processor 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 {
    ProcessorEntity result = apiInstance.deleteProcessor(id, version, clientId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ProcessorsApi#deleteProcessor");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The processor 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

ProcessorEntity

Authorization

auth

HTTP request headers

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

getProcessor

ProcessorEntity getProcessor(id)

Gets a processor

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.ProcessorsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ProcessorsApi apiInstance = new ProcessorsApi();
String id = "id_example"; // String | The processor id.
try {
    ProcessorEntity result = apiInstance.getProcessor(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ProcessorsApi#getProcessor");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The processor id.

Return type

ProcessorEntity

Authorization

auth

HTTP request headers

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

getPropertyDescriptor

PropertyDescriptorEntity getPropertyDescriptor(id, propertyName, clientId)

Gets the descriptor for a processor property

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.ProcessorsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ProcessorsApi apiInstance = new ProcessorsApi();
String id = "id_example"; // String | The processor id.
String propertyName = "propertyName_example"; // String | The property name.
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 {
    PropertyDescriptorEntity result = apiInstance.getPropertyDescriptor(id, propertyName, clientId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ProcessorsApi#getPropertyDescriptor");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The processor id.
propertyName String The property name.
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

PropertyDescriptorEntity

Authorization

auth

HTTP request headers

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

getState

ComponentStateEntity getState(id)

Gets the state for a processor

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.ProcessorsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

ProcessorsApi apiInstance = new ProcessorsApi();
String id = "id_example"; // String | The processor id.
try {
    ComponentStateEntity result = apiInstance.getState(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ProcessorsApi#getState");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The processor id.

Return type

ComponentStateEntity

Authorization

auth

HTTP request headers

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

updateProcessor

ProcessorEntity updateProcessor(id, body)

Updates a processor

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.ProcessorsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

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

Parameters

Name Type Description Notes
id String The processor id.
body ProcessorEntity The processor configuration details.

Return type

ProcessorEntity

Authorization

auth

HTTP request headers

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