Skip to content

Commit 6fb1725

Browse files
committed
feat: add api to webhook
Signed-off-by: Jongmin Kim <[email protected]>
1 parent 95504b5 commit 6fb1725

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

proto/spaceone/api/alert_manager/v1/webhook.proto

+18
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ service Webhook {
2323
body: "*"
2424
};
2525
}
26+
rpc update_message_format (WebhookMessageFormatUpdateRequest) returns (WebhookInfo) {
27+
option (google.api.http) = {
28+
post: "/alert-manager/v1/webhook/update-message-format"
29+
body: "*"
30+
};
31+
}
2632
rpc update_plugin (WebhookUpdatePluginRequest) returns (WebhookInfo) {
2733
option (google.api.http) = {
2834
post: "/alert-manager/v1/webhook/update-plugin"
@@ -73,6 +79,11 @@ service Webhook {
7379
}
7480
}
7581

82+
message WebhookMessageFormat {
83+
string from = 1;
84+
string to = 2;
85+
}
86+
7687
message WebhookRequests {
7788
int64 total = 1;
7889
int64 error = 2;
@@ -98,6 +109,7 @@ message WebhookPluginInfo{
98109
message WebhookCreateRequest {
99110
string name = 1;
100111
WebhookPluginInfo plugin_info = 2;
112+
repeated WebhookMessageFormat message_formats = 3;
101113

102114
// +optional
103115
google.protobuf.Struct tags = 11;
@@ -114,6 +126,11 @@ message WebhookUpdateRequest {
114126
google.protobuf.Struct tags = 11;
115127
}
116128

129+
message WebhookMessageFormatUpdateRequest {
130+
string webhook_id = 1;
131+
repeated WebhookMessageFormat message_formats = 2;
132+
}
133+
117134
message WebhookUpdatePluginRequest {
118135
enum WebhookUpgradeMode {
119136
UPGRADE_MODE_NONE = 0;
@@ -176,6 +193,7 @@ message WebhookInfo {
176193
string webhook_url = 5;
177194
WebhookPluginInfo plugin_info = 6;
178195
WebhookRequests requests = 7;
196+
repeated WebhookMessageFormat message_formats = 8;
179197

180198
google.protobuf.Struct tags = 11;
181199

0 commit comments

Comments
 (0)