syntax = "proto3"; package kentik.notification_channel.v202210; option go_package = "github.com/kentik/api-schema-public/gen/go/kentik/notification_channel/v202210;notification_channel"; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; import "kentik/core/v202303/annotations.proto"; import "google/protobuf/timestamp.proto"; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { title: "Notification Channel API" version: "v202210" contact: { name: "Kentik API Engineering" url: "https://github.com/kentik/api-schema-public" } description: "# Overview\n" "The Notification Channel APIs enable you to retrieve IDs for the channels in your organization's collection of " "notification channels (see [Notifications](https://kb.kentik.com/v4/Cb24.htm)). Each channel includes a channel " "type (e.g. email, Slack, PagerDuty, etc.) and a set of targets (recipients). Using the ID of a given channel, you " "can assign a set of recipients to receive notifications from Kentik alerts and synthetic tests, including those " "generated by the [Synthetics Monitoring APIs](https://kb.kentik.com/v0/Oa09.htm) and " "[BGP Monitoring APIs](https://kb.kentik.com/v0/Oa07.htm).\n" "\n" "Both REST endpoints and gRPC RPCs are provided.\n" "# Limitations\n" "The use of this API is currently subject to the following limitations:\n" "* **Read-only**: Creation, modification, and deletion of channels is not supported.\n" "* **No v3 channels**: No support is (or will be) provided for notification channels created in Kentik's v3 portal.\n" } external_docs: { url: "https://docs.kentik.com/api" description: "More about Kentik APIs" } schemes: HTTPS consumes: "application/json" produces: "application/json" security_definitions: { security: { key: "email" value: { type: TYPE_API_KEY in: IN_HEADER name: "X-CH-Auth-Email" } } security: { key: "token" value: { type: TYPE_API_KEY in: IN_HEADER name: "X-CH-Auth-API-Token" } } } security: { security_requirement: { key: "email" value: {} } security_requirement: { key: "token" value: {} } } }; // {{.Name}} enum ChannelType { // Invalid value. CHANNEL_TYPE_UNSPECIFIED = 0; // XMATTERS platform CHANNEL_TYPE_XMATTERS = 1; // Slack channel CHANNEL_TYPE_SLACK = 2; // ServiceNow platform CHANNEL_TYPE_SERVICENOW = 3; // Syslog server CHANNEL_TYPE_SYSLOG = 4; // Atlassian Opsgenie CHANNEL_TYPE_OPSGENIE = 5; // Custom REST webhook CHANNEL_TYPE_CUSTOM_WEBHOOK = 6; // Splunk platform CHANNEL_TYPE_SPLUNK = 7; // Microsoft Teams channel CHANNEL_TYPE_MSTEAMS = 8; // webhook with JSON payload CHANNEL_TYPE_JSON = 9; // E-mail CHANNEL_TYPE_EMAIL = 10; // Splunk On-Call (formerly VictorOps) CHANNEL_TYPE_VICTOROPS = 11; // Pagerduty platform CHANNEL_TYPE_PAGERDUTY = 12; } // {{.Name}} message NotificationChannel { string id = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: "Unique identifier of the channel" } ]; string name = 2 [ (google.api.field_behavior) = OUTPUT_ONLY, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: "User selected name of the channel" } ]; ChannelType type = 3 [ (google.api.field_behavior) = OUTPUT_ONLY, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: "Notification channel type" } ]; bool enabled = 4 [ (google.api.field_behavior) = OUTPUT_ONLY, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: "Administrative status" } ]; google.protobuf.Timestamp cdate = 5 [ (google.api.field_behavior) = OUTPUT_ONLY, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: "Creation timestamp (UTC)" } ]; google.protobuf.Timestamp edate = 6 [ (google.api.field_behavior) = OUTPUT_ONLY, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: "Last modification timestamp (UTC)" } ]; } // {{.Name}} message ListNotificationChannelsRequest {} // {{.Name}} message ListNotificationChannelsResponse { repeated NotificationChannel notification_channels = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: "List of notification channels" } ]; int32 invalid_count = 2 [ (google.api.field_behavior) = OUTPUT_ONLY, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: "Number of invalid entries that were not included in the list (should be always zero)" } ]; } // {{.Name}} message GetNotificationChannelRequest { string id = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: "Request channel ID." } ]; } // {{.Name}} message GetNotificationChannelResponse { NotificationChannel notification_channel = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: "Data for the requested channel." } ]; } // {{.Name}} message SearchNotificationChannelsRequest { string name_pattern = 1 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: "Regular expression pattern for matching the name attribute of channels. Empty string matches " "any name, otherwise the regular expression must consume all characters in the channel name." } ]; repeated ChannelType types = 2 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: "List of ChannelType enum values to match. Empty list matches any channel type." } ]; bool include_disabled = 3 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { default: "false", description: "Include disabled channels in results." } ]; } // {{.Name}} message SearchNotificationChannelsResponse { repeated NotificationChannel notification_channels = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: "List of matching notification channels." } ]; int32 invalid_count = 2 [ (google.api.field_behavior) = OUTPUT_ONLY, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: "Number of invalid entries that were not included in the list (should be always zero)" } ]; } service NotificationChannelService { option (google.api.default_host) = "grpc.api.kentik.com"; option (kentik.core.v202303.visibility) = SERVICE_VISIBILITY_PUBLIC; option (kentik.core.v202303.service_scope) = "admin.notification_channel"; rpc ListNotificationChannels(ListNotificationChannelsRequest) returns (ListNotificationChannelsResponse) { option (kentik.core.v202303.method_scope) = "admin.notification_channel:read"; option (google.api.http) = { get: "/notification_channel/v202210/notification_channels" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { operation_id: "ListNotificationChannels" summary: "List available notification channels" description: "Returns list of all configured notification channels." }; } rpc GetNotificationChannel(GetNotificationChannelRequest) returns (GetNotificationChannelResponse) { option (kentik.core.v202303.method_scope) = "admin.notification_channel:read"; option (google.api.http) = { get: "/notification_channel/v202210/notification_channels/{id}" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { operation_id: "GetNotificationChannel" summary: "Get information about a notification channel" description: "Returns information about a notification channel with specific ID." }; } rpc SearchNotificationChannels(SearchNotificationChannelsRequest) returns (SearchNotificationChannelsResponse) { option (kentik.core.v202303.method_scope) = "admin.notification_channel:read"; option (google.api.http) = { post: "/notification_channel/v202210/notification_channels/search" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { operation_id: "SearchNotificationChannels" summary: "Retrieve notification channels matching criteria." description: "Returns list of all notification channels matching request criteria. Match criteria are treated " "as a logical AND, i.e. all provided criteria must match in order for an entry to be included in the response." }; } }