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(ctx).Nodewise(nodewise).ClusterNodeId(clusterNodeId).Execute()
Gets the current counters for this NiFi
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
nodewise := true // bool | Whether or not to include the breakdown per node. Optional, defaults to false (optional) (default to false)
clusterNodeId := "clusterNodeId_example" // string | The id of the node where to get the status. (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.CountersApi.GetCounters(context.Background()).Nodewise(nodewise).ClusterNodeId(clusterNodeId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CountersApi.GetCounters``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCounters`: CountersEntity
fmt.Fprintf(os.Stdout, "Response from `CountersApi.GetCounters`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetCountersRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
nodewise | bool | Whether or not to include the breakdown per node. Optional, defaults to false | [default to false] |
clusterNodeId | string | The id of the node where to get the status. |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CounterEntity UpdateCounter(ctx, id).Execute()
Updates the specified counter. This will reset the counter value to 0
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string | The id of the counter.
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.CountersApi.UpdateCounter(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CountersApi.UpdateCounter``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateCounter`: CounterEntity
fmt.Fprintf(os.Stdout, "Response from `CountersApi.UpdateCounter`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The id of the counter. |
Other parameters are passed through a pointer to a apiUpdateCounterRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]