All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
CreateAlert | Post /api/v2/{org_id}/alerts | CreateAlert |
CreateDestination | Post /api/{org_id}/alerts/destinations | CreateDestination |
DeleteAlert | Delete /api/v2/{org_id}/alerts/{alert_id} | DeleteAlert |
DeleteAlertDestination | Delete /api/{org_id}/alerts/destinations/{destination_name} | DeleteDestination |
DeleteAlert_0 | Delete /api/{org_id}/{stream_name}/alerts/{alert_name} | DeleteAlert |
EnableAlert | Patch /api/v2/{org_id}/alerts/{alert_id}/enable | EnableAlert |
EnableAlert_0 | Put /api/{org_id}/{stream_name}/alerts/{alert_name}/enable | EnableAlert |
GetAlert | Get /api/v2/{org_id}/alerts/{alert_id} | GetAlert |
GetAlert_0 | Get /api/{org_id}/{stream_name}/alerts/{alert_name} | GetAlertByName |
GetDestination | Get /api/{org_id}/alerts/destinations/{destination_name} | GetDestination |
ListAlerts | Get /api/v2/{org_id}/alerts | ListAlerts |
ListAlerts_0 | Get /api/{org_id}/alerts | ListAlerts |
ListDestinations | Get /api/{org_id}/alerts/destinations | ListDestinations |
ListStreamAlerts | Get /api/{org_id}/{stream_name}/alerts | ListStreamAlerts |
MoveAlerts | Patch /api/v2/{org_id}/alerts/move | MoveAlerts |
SaveAlert | Post /api/{org_id}/{stream_name}/alerts | CreateAlert |
TriggerAlert | Patch /api/v2/{org_id}/alerts/{alert_id}/trigger | TriggerAlert |
TriggerAlert_0 | Put /api/{org_id}/{stream_name}/alerts/{alert_name}/trigger | TriggerAlert |
UpdateAlert | Put /api/v2/{org_id}/alerts/{alert_id} | UpdateAlert |
UpdateAlert_0 | Put /api/{org_id}/{stream_name}/alerts/{alert_name} | UpdateAlert |
UpdateDestination | Put /api/{org_id}/alerts/destinations/{destination_name} | UpdateDestination |
HttpResponse CreateAlert(ctx, orgId).CreateAlertRequestBody(createAlertRequestBody).Execute()
CreateAlert
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
createAlertRequestBody := *openobserve.NewCreateAlertRequestBody([]string{"Destinations_example"}) // CreateAlertRequestBody | Alert data
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.CreateAlert(context.Background(), orgId).CreateAlertRequestBody(createAlertRequestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.CreateAlert``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateAlert`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.CreateAlert`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name |
Other parameters are passed through a pointer to a apiCreateAlertRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
createAlertRequestBody | CreateAlertRequestBody | Alert data |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HttpResponse CreateDestination(ctx, orgId).Destination(destination).Execute()
CreateDestination
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
destination := *openobserve.NewDestination() // Destination | Destination data
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.CreateDestination(context.Background(), orgId).Destination(destination).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.CreateDestination``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateDestination`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.CreateDestination`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name |
Other parameters are passed through a pointer to a apiCreateDestinationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
destination | Destination | Destination data |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HttpResponse DeleteAlert(ctx, orgId, alertId).Execute()
DeleteAlert
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
alertId := TODO // string | Alert ID
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.DeleteAlert(context.Background(), orgId, alertId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.DeleteAlert``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteAlert`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.DeleteAlert`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
alertId | string | Alert ID |
Other parameters are passed through a pointer to a apiDeleteAlertRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HttpResponse DeleteAlertDestination(ctx, orgId, destinationName).Execute()
DeleteDestination
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
destinationName := "destinationName_example" // string | Destination name
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.DeleteAlertDestination(context.Background(), orgId, destinationName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.DeleteAlertDestination``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteAlertDestination`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.DeleteAlertDestination`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
destinationName | string | Destination name |
Other parameters are passed through a pointer to a apiDeleteAlertDestinationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HttpResponse DeleteAlert_0(ctx, orgId, streamName, alertName).Execute()
DeleteAlert
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
streamName := "streamName_example" // string | Stream name
alertName := "alertName_example" // string | Alert name
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.DeleteAlert_0(context.Background(), orgId, streamName, alertName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.DeleteAlert_0``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteAlert_0`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.DeleteAlert_0`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
streamName | string | Stream name | |
alertName | string | Alert name |
Other parameters are passed through a pointer to a apiDeleteAlert_1Request struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HttpResponse EnableAlert(ctx, orgId, alertId).Value(value).Execute()
EnableAlert
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
alertId := TODO // string | Alert ID
value := true // bool | Set to `true` to enable the alert or `false` to disable the alert.
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.EnableAlert(context.Background(), orgId, alertId).Value(value).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.EnableAlert``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `EnableAlert`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.EnableAlert`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
alertId | string | Alert ID |
Other parameters are passed through a pointer to a apiEnableAlertRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
value | bool | Set to `true` to enable the alert or `false` to disable the alert. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HttpResponse EnableAlert_0(ctx, orgId, streamName, alertName).Value(value).Execute()
EnableAlert
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
streamName := "streamName_example" // string | Stream name
alertName := "alertName_example" // string | Alert name
value := true // bool | Enable or disable alert
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.EnableAlert_0(context.Background(), orgId, streamName, alertName).Value(value).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.EnableAlert_0``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `EnableAlert_0`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.EnableAlert_0`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
streamName | string | Stream name | |
alertName | string | Alert name |
Other parameters are passed through a pointer to a apiEnableAlert_2Request struct via the builder pattern
Name | Type | Description | Notes |
---|
value | bool | Enable or disable alert |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Alert GetAlert(ctx, orgId, alertId).Execute()
GetAlert
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
alertId := TODO // string | Alert ID
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.GetAlert(context.Background(), orgId, alertId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.GetAlert``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAlert`: Alert
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.GetAlert`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
alertId | string | Alert ID |
Other parameters are passed through a pointer to a apiGetAlertRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Alert GetAlert_0(ctx, orgId, streamName, alertName).Execute()
GetAlertByName
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
streamName := "streamName_example" // string | Stream name
alertName := "alertName_example" // string | Alert name
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.GetAlert_0(context.Background(), orgId, streamName, alertName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.GetAlert_0``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAlert_0`: Alert
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.GetAlert_0`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
streamName | string | Stream name | |
alertName | string | Alert name |
Other parameters are passed through a pointer to a apiGetAlert_3Request struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Destination GetDestination(ctx, orgId, destinationName).Execute()
GetDestination
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
destinationName := "destinationName_example" // string | Destination name
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.GetDestination(context.Background(), orgId, destinationName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.GetDestination``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDestination`: Destination
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.GetDestination`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
destinationName | string | Destination name |
Other parameters are passed through a pointer to a apiGetDestinationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListAlertsResponseBody ListAlerts(ctx, orgId).Folder(folder).StreamType(streamType).StreamName(streamName).AlertNameSubstring(alertNameSubstring).Owner(owner).Enabled(enabled).PageSize(pageSize).PageIdx(pageIdx).Execute()
ListAlerts
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
folder := "folder_example" // string | Optional folder ID filter parameter. (optional)
streamType := openobserve.StreamType("logs") // StreamType | Optional stream type filter parameter. (optional)
streamName := "streamName_example" // string | Optional stream name filter parameter. This parameter is only used if `stream_type` is also provided. (optional)
alertNameSubstring := "alertNameSubstring_example" // string | Optional case-insensitive name substring filter parameter. (optional)
owner := "owner_example" // string | Optional owner user filter parameter. (optional)
enabled := true // bool | Optional enabled filter parameter. (optional)
pageSize := int64(789) // int64 | The optional number of alerts to retrieve. If not set then all alerts that match the query parameters will be returned. (optional)
pageIdx := int64(789) // int64 | The optional page index. If not set then defaults to `0`. This parameter is only used if `page_size` is also set. (optional)
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.ListAlerts(context.Background(), orgId).Folder(folder).StreamType(streamType).StreamName(streamName).AlertNameSubstring(alertNameSubstring).Owner(owner).Enabled(enabled).PageSize(pageSize).PageIdx(pageIdx).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.ListAlerts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListAlerts`: ListAlertsResponseBody
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.ListAlerts`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name |
Other parameters are passed through a pointer to a apiListAlertsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
folder | string | Optional folder ID filter parameter. | streamType | StreamType | Optional stream type filter parameter. | streamName | string | Optional stream name filter parameter. This parameter is only used if `stream_type` is also provided. | alertNameSubstring | string | Optional case-insensitive name substring filter parameter. | owner | string | Optional owner user filter parameter. | enabled | bool | Optional enabled filter parameter. | pageSize | int64 | The optional number of alerts to retrieve. If not set then all alerts that match the query parameters will be returned. | pageIdx | int64 | The optional page index. If not set then defaults to `0`. This parameter is only used if `page_size` is also set. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HttpResponse ListAlerts_0(ctx, orgId).Execute()
ListAlerts
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.ListAlerts_0(context.Background(), orgId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.ListAlerts_0``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListAlerts_0`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.ListAlerts_0`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name |
Other parameters are passed through a pointer to a apiListAlerts_4Request struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Destination ListDestinations(ctx, orgId).Module(module).Execute()
ListDestinations
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
module := "module_example" // string | Destination module filter, none, alert, or pipeline (optional)
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.ListDestinations(context.Background(), orgId).Module(module).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.ListDestinations``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDestinations`: []Destination
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.ListDestinations`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name |
Other parameters are passed through a pointer to a apiListDestinationsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
module | string | Destination module filter, none, alert, or pipeline |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HttpResponse ListStreamAlerts(ctx, orgId, streamName).Execute()
ListStreamAlerts
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
streamName := "streamName_example" // string | Stream name
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.ListStreamAlerts(context.Background(), orgId, streamName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.ListStreamAlerts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListStreamAlerts`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.ListStreamAlerts`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
streamName | string | Stream name |
Other parameters are passed through a pointer to a apiListStreamAlertsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HttpResponse MoveAlerts(ctx, orgId).MoveAlertsRequestBody(moveAlertsRequestBody).Execute()
MoveAlerts
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
moveAlertsRequestBody := *openobserve.NewMoveAlertsRequestBody([]string{"TODO"}, "DstFolderId_example") // MoveAlertsRequestBody | Identifies alerts and the destination folder
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.MoveAlerts(context.Background(), orgId).MoveAlertsRequestBody(moveAlertsRequestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.MoveAlerts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `MoveAlerts`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.MoveAlerts`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name |
Other parameters are passed through a pointer to a apiMoveAlertsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
moveAlertsRequestBody | MoveAlertsRequestBody | Identifies alerts and the destination folder |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HttpResponse SaveAlert(ctx, orgId, streamName).Alert(alert).Execute()
CreateAlert
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
streamName := "streamName_example" // string | Stream name
alert := *openobserve.NewAlert([]string{"Destinations_example"}) // Alert | Alert data
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.SaveAlert(context.Background(), orgId, streamName).Alert(alert).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.SaveAlert``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SaveAlert`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.SaveAlert`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
streamName | string | Stream name |
Other parameters are passed through a pointer to a apiSaveAlertRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
alert | Alert | Alert data |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HttpResponse TriggerAlert(ctx, orgId, alertId).Execute()
TriggerAlert
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
alertId := TODO // string | Alert ID
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.TriggerAlert(context.Background(), orgId, alertId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.TriggerAlert``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TriggerAlert`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.TriggerAlert`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
alertId | string | Alert ID |
Other parameters are passed through a pointer to a apiTriggerAlertRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HttpResponse TriggerAlert_0(ctx, orgId, streamName, alertName).Execute()
TriggerAlert
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
streamName := "streamName_example" // string | Stream name
alertName := "alertName_example" // string | Alert name
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.TriggerAlert_0(context.Background(), orgId, streamName, alertName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.TriggerAlert_0``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TriggerAlert_0`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.TriggerAlert_0`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
streamName | string | Stream name | |
alertName | string | Alert name |
Other parameters are passed through a pointer to a apiTriggerAlert_5Request struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HttpResponse UpdateAlert(ctx, orgId, alertId).Body(body).Execute()
UpdateAlert
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
alertId := TODO // string | Alert ID
body := Alert(987) // Alert | Alert data
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.UpdateAlert(context.Background(), orgId, alertId).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.UpdateAlert``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateAlert`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.UpdateAlert`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
alertId | string | Alert ID |
Other parameters are passed through a pointer to a apiUpdateAlertRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
body | Alert | Alert data |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HttpResponse UpdateAlert_0(ctx, orgId, streamName, alertName).Alert(alert).Execute()
UpdateAlert
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
streamName := "streamName_example" // string | Stream name
alertName := "alertName_example" // string | Alert name
alert := *openobserve.NewAlert([]string{"Destinations_example"}) // Alert | Alert data
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.UpdateAlert_0(context.Background(), orgId, streamName, alertName).Alert(alert).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.UpdateAlert_0``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateAlert_0`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.UpdateAlert_0`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
streamName | string | Stream name | |
alertName | string | Alert name |
Other parameters are passed through a pointer to a apiUpdateAlert_6Request struct via the builder pattern
Name | Type | Description | Notes |
---|
alert | Alert | Alert data |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HttpResponse UpdateDestination(ctx, orgId, destinationName).Destination(destination).Execute()
UpdateDestination
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
destinationName := "destinationName_example" // string | Destination name
destination := *openobserve.NewDestination() // Destination | Destination data
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.AlertsAPI.UpdateDestination(context.Background(), orgId, destinationName).Destination(destination).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AlertsAPI.UpdateDestination``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateDestination`: HttpResponse
fmt.Fprintf(os.Stdout, "Response from `AlertsAPI.UpdateDestination`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
destinationName | string | Destination name |
Other parameters are passed through a pointer to a apiUpdateDestinationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
destination | Destination | Destination data |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]