Skip to content

Latest commit

 

History

History
118 lines (84 loc) · 3.63 KB

CountersApi.md

File metadata and controls

118 lines (84 loc) · 3.63 KB

CountersApi

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

Method HTTP request Description
getCounters GET /counters Gets the current counters for this NiFi
updateCounter PUT /counters/{id} Updates the specified counter. This will reset the counter value to 0

getCounters

CountersEntity getCounters(nodewise, clusterNodeId)

Gets the current counters for this NiFi

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

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

CountersApi apiInstance = new CountersApi();
Boolean nodewise = true; // Boolean | Whether or not to include the breakdown per node. Optional, defaults to false
String clusterNodeId = "clusterNodeId_example"; // String | The id of the node where to get the status.
try {
    CountersEntity result = apiInstance.getCounters(nodewise, clusterNodeId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling CountersApi#getCounters");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
nodewise Boolean Whether or not to include the breakdown per node. Optional, defaults to false [optional]
clusterNodeId String The id of the node where to get the status. [optional]

Return type

CountersEntity

Authorization

auth

HTTP request headers

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

updateCounter

CounterEntity updateCounter(id)

Updates the specified counter. This will reset the counter value to 0

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

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

ApiClient defaultClient = Configuration.getDefaultApiClient();

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

CountersApi apiInstance = new CountersApi();
String id = "id_example"; // String | The id of the counter.
try {
    CounterEntity result = apiInstance.updateCounter(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling CountersApi#updateCounter");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The id of the counter.

Return type

CounterEntity

Authorization

auth

HTTP request headers

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