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 |
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.
// 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();
}
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] |
- Content-Type: /
- Accept: application/json
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | The id of the counter. |
- Content-Type: /
- Accept: application/json