All URIs are relative to https://api.uptrends.com/v4
Method | HTTP request | Description |
---|---|---|
AlertGetMonitorAlerts | Get /Alert/Monitor/{monitorGuid} | Returns alerts for a specific monitor. |
AlertGetMonitorGroupAlerts | Get /Alert/MonitorGroup/{monitorGroupGuid} | Returns alerts for a specific monitor group. |
AlertResponse AlertGetMonitorAlerts(ctx, monitorGuid).IncludeReminders(includeReminders).Cursor(cursor).Sorting(sorting).Take(take).Start(start).End(end).PresetPeriod(presetPeriod).Execute()
Returns alerts for a specific monitor.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
monitorGuid := "monitorGuid_example" // string | The Guid of the monitor to get alerts for.
includeReminders := true // bool | When true reminder alerts will be included in the results (optional) (default to false)
cursor := "cursor_example" // string | A cursor value that should be used for traversing the dataset. (optional)
sorting := "sorting_example" // string | Sorting direction based on timestamp. (optional) (default to "Descending")
take := int32(56) // int32 | The number of records to return (Max value = 100) (optional) (default to 100)
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.AlertApi.AlertGetMonitorAlerts(context.Background(), monitorGuid).IncludeReminders(includeReminders).Cursor(cursor).Sorting(sorting).Take(take).Start(start).End(end).PresetPeriod(presetPeriod).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertApi.AlertGetMonitorAlerts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AlertGetMonitorAlerts`: AlertResponse
fmt.Fprintf(os.Stdout, "Response from `AlertApi.AlertGetMonitorAlerts`: %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 to get alerts for. |
Other parameters are passed through a pointer to a apiAlertGetMonitorAlertsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
includeReminders | bool | When true reminder alerts will be included in the results | [default to false] cursor | string | A cursor value that should be used for traversing the dataset. | sorting | string | Sorting direction based on timestamp. | [default to "Descending"] take | int32 | The number of records to return (Max value = 100) | [default to 100] 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]
AlertResponse AlertGetMonitorGroupAlerts(ctx, monitorGroupGuid).IncludeReminders(includeReminders).Cursor(cursor).Sorting(sorting).Take(take).Start(start).End(end).PresetPeriod(presetPeriod).Execute()
Returns alerts for a specific monitor group.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
monitorGroupGuid := "monitorGroupGuid_example" // string | The Guid of the monitor group to get alerts for.
includeReminders := true // bool | When true reminder alerts will be included in the results (optional) (default to false)
cursor := "cursor_example" // string | A cursor value that should be used for traversing the dataset. (optional)
sorting := "sorting_example" // string | Sorting direction based on timestamp. (optional) (default to "Descending")
take := int32(56) // int32 | The number of records to return (Max value = 100) (optional) (default to 100)
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.AlertApi.AlertGetMonitorGroupAlerts(context.Background(), monitorGroupGuid).IncludeReminders(includeReminders).Cursor(cursor).Sorting(sorting).Take(take).Start(start).End(end).PresetPeriod(presetPeriod).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertApi.AlertGetMonitorGroupAlerts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AlertGetMonitorGroupAlerts`: AlertResponse
fmt.Fprintf(os.Stdout, "Response from `AlertApi.AlertGetMonitorGroupAlerts`: %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 to get alerts for. |
Other parameters are passed through a pointer to a apiAlertGetMonitorGroupAlertsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
includeReminders | bool | When true reminder alerts will be included in the results | [default to false] cursor | string | A cursor value that should be used for traversing the dataset. | sorting | string | Sorting direction based on timestamp. | [default to "Descending"] take | int32 | The number of records to return (Max value = 100) | [default to 100] 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]