All URIs are relative to https://api.uptrends.com/v4
| Method | HTTP request | Description |
|---|---|---|
| StatisticsGetMonitorGroupStatistics | Get /Statistics/MonitorGroup/{monitorGroupGuid} | Gets the monitor group statistics. |
| StatisticsGetMonitorStatistics | Get /Statistics/Monitor/{monitorGuid} | Gets the monitor statistics. |
StatisticsResponse StatisticsGetMonitorGroupStatistics(ctx, monitorGroupGuid).Filter(filter).Start(start).End(end).PresetPeriod(presetPeriod).Execute()
Gets the monitor group statistics.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/JetManiack/go-uptrends-api"
)
func main() {
monitorGroupGuid := "monitorGroupGuid_example" // string | The Guid of the monitor group.
filter := "filter_example" // string | The filter for the requested response fields. E.g. \"Alerts,SlaTarget\". (optional)
start := TODO // interface{} | The start of a custom period (can't be used together with the PresetPeriod parameter) (optional)
end := TODO // interface{} | The end of a custom period (optional)
presetPeriod := "presetPeriod_example" // string | The requested time period. (optional) (default to "Last24Hours")
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StatisticsAPI.StatisticsGetMonitorGroupStatistics(context.Background(), monitorGroupGuid).Filter(filter).Start(start).End(end).PresetPeriod(presetPeriod).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StatisticsAPI.StatisticsGetMonitorGroupStatistics``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `StatisticsGetMonitorGroupStatistics`: StatisticsResponse
fmt.Fprintf(os.Stdout, "Response from `StatisticsAPI.StatisticsGetMonitorGroupStatistics`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| monitorGroupGuid | string | The Guid of the monitor group. |
Other parameters are passed through a pointer to a apiStatisticsGetMonitorGroupStatisticsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
filter | string | The filter for the requested response fields. E.g. "Alerts,SlaTarget". | start | interface{} | The start of a custom period (can't be used together with the PresetPeriod parameter) | end | interface{} | The end of a custom period | presetPeriod | string | The requested time period. | [default to "Last24Hours"]
- Content-Type: Not defined
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StatisticsResponse StatisticsGetMonitorStatistics(ctx, monitorGuid).Filter(filter).Start(start).End(end).PresetPeriod(presetPeriod).Execute()
Gets the monitor statistics.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/JetManiack/go-uptrends-api"
)
func main() {
monitorGuid := "monitorGuid_example" // string | The Guid of the monitor.
filter := "filter_example" // string | The filter for the requested response fields. E.g. \"Alerts,SlaTarget\". (optional)
start := TODO // interface{} | The start of a custom period (can't be used together with the PresetPeriod parameter) (optional)
end := TODO // interface{} | The end of a custom period (optional)
presetPeriod := "presetPeriod_example" // string | The requested time period. (optional) (default to "Last24Hours")
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StatisticsAPI.StatisticsGetMonitorStatistics(context.Background(), monitorGuid).Filter(filter).Start(start).End(end).PresetPeriod(presetPeriod).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StatisticsAPI.StatisticsGetMonitorStatistics``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `StatisticsGetMonitorStatistics`: StatisticsResponse
fmt.Fprintf(os.Stdout, "Response from `StatisticsAPI.StatisticsGetMonitorStatistics`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| monitorGuid | string | The Guid of the monitor. |
Other parameters are passed through a pointer to a apiStatisticsGetMonitorStatisticsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
filter | string | The filter for the requested response fields. E.g. "Alerts,SlaTarget". | start | interface{} | The start of a custom period (can't be used together with the PresetPeriod parameter) | end | interface{} | The end of a custom period | presetPeriod | string | The requested time period. | [default to "Last24Hours"]
- Content-Type: Not defined
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]