Skip to content

Latest commit

 

History

History
421 lines (265 loc) · 15.1 KB

File metadata and controls

421 lines (265 loc) · 15.1 KB

\NotificationConfigurationsApi

All URIs are relative to http://localhost

Method HTTP request Description
CreateNotificationConfiguration Post /notifications/configurations Create a new notification configuration
DeleteNotificationConfiguration Delete /notifications/configurations/{notificationConfigurationIdOrUrn} Delete the notification configuration
GetNotificationConfiguration Get /notifications/configurations/{notificationConfigurationIdOrUrn} Get the notification configuration
GetNotificationConfigurationChannels Get /notifications/configurations/{notificationConfigurationIdOrUrn}/channels Get the channels for the notification configuration
GetNotificationConfigurations Get /notifications/configurations Get all notification configurations
UpdateNotificationConfiguration Put /notifications/configurations/{notificationConfigurationIdOrUrn} Update the notification configuration

CreateNotificationConfiguration

NotificationConfigurationReadSchema CreateNotificationConfiguration(ctx).NotificationConfigurationWriteSchema(notificationConfigurationWriteSchema).Execute()

Create a new notification configuration

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    notificationConfigurationWriteSchema := *openapiclient.NewNotificationConfigurationWriteSchema("Name_example", openapiclient.NotifyOnOptions("CRITICAL"), []openapiclient.MonitorReferenceId{openapiclient.MonitorReferenceId{ExternalMonitorDefId: openapiclient.NewExternalMonitorDefId("Type_example", int64(123))}}, []string{"MonitorTags_example"}, []int64{int64(123)}, []string{"ComponentTags_example"}, openapiclient.NotificationConfigurationStatusValue("ENABLED"), []openapiclient.ChannelReferenceId{openapiclient.ChannelReferenceId{EmailChannelRefId: openapiclient.NewEmailChannelRefId("Type_example", int64(123))}}) // NotificationConfigurationWriteSchema | Create or update a notification configuration

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.NotificationConfigurationsApi.CreateNotificationConfiguration(context.Background()).NotificationConfigurationWriteSchema(notificationConfigurationWriteSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `NotificationConfigurationsApi.CreateNotificationConfiguration``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateNotificationConfiguration`: NotificationConfigurationReadSchema
    fmt.Fprintf(os.Stdout, "Response from `NotificationConfigurationsApi.CreateNotificationConfiguration`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateNotificationConfigurationRequest struct via the builder pattern

Name Type Description Notes
notificationConfigurationWriteSchema NotificationConfigurationWriteSchema Create or update a notification configuration

Return type

NotificationConfigurationReadSchema

Authorization

ApiToken, ServiceBearer, ServiceToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteNotificationConfiguration

DeleteNotificationConfiguration(ctx, notificationConfigurationIdOrUrn).Execute()

Delete the notification configuration

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    notificationConfigurationIdOrUrn := "notificationConfigurationIdOrUrn_example" // string | Notification identifier

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.NotificationConfigurationsApi.DeleteNotificationConfiguration(context.Background(), notificationConfigurationIdOrUrn).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `NotificationConfigurationsApi.DeleteNotificationConfiguration``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
notificationConfigurationIdOrUrn string Notification identifier

Other Parameters

Other parameters are passed through a pointer to a apiDeleteNotificationConfigurationRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

ApiToken, ServiceBearer, ServiceToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetNotificationConfiguration

NotificationConfigurationReadSchema GetNotificationConfiguration(ctx, notificationConfigurationIdOrUrn).Execute()

Get the notification configuration

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    notificationConfigurationIdOrUrn := "notificationConfigurationIdOrUrn_example" // string | Notification identifier

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.NotificationConfigurationsApi.GetNotificationConfiguration(context.Background(), notificationConfigurationIdOrUrn).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `NotificationConfigurationsApi.GetNotificationConfiguration``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetNotificationConfiguration`: NotificationConfigurationReadSchema
    fmt.Fprintf(os.Stdout, "Response from `NotificationConfigurationsApi.GetNotificationConfiguration`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
notificationConfigurationIdOrUrn string Notification identifier

Other Parameters

Other parameters are passed through a pointer to a apiGetNotificationConfigurationRequest struct via the builder pattern

Name Type Description Notes

Return type

NotificationConfigurationReadSchema

Authorization

ApiToken, ServiceBearer, ServiceToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetNotificationConfigurationChannels

[]NotificationChannel GetNotificationConfigurationChannels(ctx, notificationConfigurationIdOrUrn).Execute()

Get the channels for the notification configuration

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    notificationConfigurationIdOrUrn := "notificationConfigurationIdOrUrn_example" // string | Notification identifier

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.NotificationConfigurationsApi.GetNotificationConfigurationChannels(context.Background(), notificationConfigurationIdOrUrn).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `NotificationConfigurationsApi.GetNotificationConfigurationChannels``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetNotificationConfigurationChannels`: []NotificationChannel
    fmt.Fprintf(os.Stdout, "Response from `NotificationConfigurationsApi.GetNotificationConfigurationChannels`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
notificationConfigurationIdOrUrn string Notification identifier

Other Parameters

Other parameters are passed through a pointer to a apiGetNotificationConfigurationChannelsRequest struct via the builder pattern

Name Type Description Notes

Return type

[]NotificationChannel

Authorization

ApiToken, ServiceBearer, ServiceToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetNotificationConfigurations

[]NotificationConfigurationReadSchema GetNotificationConfigurations(ctx).Execute()

Get all notification configurations

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.NotificationConfigurationsApi.GetNotificationConfigurations(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `NotificationConfigurationsApi.GetNotificationConfigurations``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetNotificationConfigurations`: []NotificationConfigurationReadSchema
    fmt.Fprintf(os.Stdout, "Response from `NotificationConfigurationsApi.GetNotificationConfigurations`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetNotificationConfigurationsRequest struct via the builder pattern

Return type

[]NotificationConfigurationReadSchema

Authorization

ApiToken, ServiceBearer, ServiceToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateNotificationConfiguration

NotificationConfigurationReadSchema UpdateNotificationConfiguration(ctx, notificationConfigurationIdOrUrn).NotificationConfigurationWriteSchema(notificationConfigurationWriteSchema).Execute()

Update the notification configuration

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    notificationConfigurationIdOrUrn := "notificationConfigurationIdOrUrn_example" // string | Notification identifier
    notificationConfigurationWriteSchema := *openapiclient.NewNotificationConfigurationWriteSchema("Name_example", openapiclient.NotifyOnOptions("CRITICAL"), []openapiclient.MonitorReferenceId{openapiclient.MonitorReferenceId{ExternalMonitorDefId: openapiclient.NewExternalMonitorDefId("Type_example", int64(123))}}, []string{"MonitorTags_example"}, []int64{int64(123)}, []string{"ComponentTags_example"}, openapiclient.NotificationConfigurationStatusValue("ENABLED"), []openapiclient.ChannelReferenceId{openapiclient.ChannelReferenceId{EmailChannelRefId: openapiclient.NewEmailChannelRefId("Type_example", int64(123))}}) // NotificationConfigurationWriteSchema | Create or update a notification configuration

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.NotificationConfigurationsApi.UpdateNotificationConfiguration(context.Background(), notificationConfigurationIdOrUrn).NotificationConfigurationWriteSchema(notificationConfigurationWriteSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `NotificationConfigurationsApi.UpdateNotificationConfiguration``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateNotificationConfiguration`: NotificationConfigurationReadSchema
    fmt.Fprintf(os.Stdout, "Response from `NotificationConfigurationsApi.UpdateNotificationConfiguration`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
notificationConfigurationIdOrUrn string Notification identifier

Other Parameters

Other parameters are passed through a pointer to a apiUpdateNotificationConfigurationRequest struct via the builder pattern

Name Type Description Notes

notificationConfigurationWriteSchema | NotificationConfigurationWriteSchema | Create or update a notification configuration |

Return type

NotificationConfigurationReadSchema

Authorization

ApiToken, ServiceBearer, ServiceToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]