-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sokratis Papadopoulos
committed
Dec 21, 2023
1 parent
b42000c
commit 7cf6a69
Showing
4 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
// The OpenSearch Contributors require contributions made to | ||
// this file be licensed under the Apache-2.0 license or a | ||
// compatible open source license. | ||
|
||
$version: "2" | ||
namespace OpenSearch | ||
|
||
structure NotificationsConfig { | ||
config_id: String, | ||
name: String, | ||
config: NotificationsConfigItem | ||
} | ||
|
||
structure NotificationsConfigItem { | ||
name: String, | ||
description: String, | ||
config_type: String, | ||
is_enabled: Boolean, | ||
slack: SlackItem | ||
} | ||
|
||
structure SlackItem { | ||
url: String | ||
} | ||
|
||
structure NotificationsConfigsOutputItem { | ||
config_id: String, | ||
last_updated_time_ms: Integer, | ||
created_time_ms: Integer, | ||
config: NotificationsConfigItem | ||
} | ||
|
||
list NotificationsConfigsList { | ||
member: NotificationsConfigsOutputItem | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
// The OpenSearch Contributors require contributions made to | ||
// this file be licensed under the Apache-2.0 license or a | ||
// compatible open source license. | ||
|
||
$version: "2" | ||
namespace OpenSearch | ||
|
||
@externalDocumentation( | ||
"API Reference": "https://opensearch.org/docs/latest/observing-your-data/notifications/api/" | ||
) | ||
|
||
@xOperationGroup("notifications.configs") | ||
@xVersionAdded("2.2") | ||
@readonly | ||
@suppress(["HttpUriConflict"]) | ||
@http(method: "GET", uri: "/_plugins/_notifications/configs") | ||
@documentation("Retrieves all notification configurations.") | ||
operation NotificationsConfigs_Get { | ||
input: NotificationsConfigs_Get_Input, | ||
output: NotificationsConfigs_Get_Output | ||
} | ||
|
||
@xOperationGroup("notifications.configs") | ||
@xVersionAdded("2.2") | ||
@suppress(["HttpUriConflict"]) | ||
@http(method: "POST", uri: "/_plugins/_notifications/configs") | ||
@documentation("Creates a notification channel configuration.") | ||
operation NotificationsConfigs_Post { | ||
input: NotificationsConfigs_Post_Input, | ||
output: NotificationsConfigs_Post_Output | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
// The OpenSearch Contributors require contributions made to | ||
// this file be licensed under the Apache-2.0 license or a | ||
// compatible open source license. | ||
|
||
$version: "2" | ||
namespace OpenSearch | ||
|
||
@input | ||
structure NotificationsConfigs_Get_Input { | ||
} | ||
|
||
@output | ||
structure NotificationsConfigs_Get_Output { | ||
start_index: Integer, | ||
total_hits: Integer, | ||
total_hit_relation: String, | ||
config_list: NotificationsConfigsList | ||
} | ||
|
||
@input | ||
structure NotificationsConfigs_Post_Input { | ||
@required | ||
@httpPayload | ||
content: NotificationsConfig | ||
} | ||
|
||
@output | ||
structure NotificationsConfigs_Post_Output { | ||
config_id: String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters