Skip to content

Commit

Permalink
Add _plugins/_notifications/channels API spec (#256)
Browse files Browse the repository at this point in the history
* Add _plugins/_notifications/channels API

Signed-off-by: Sokratis Papadopoulos <[email protected]>
  • Loading branch information
spapadop authored Apr 23, 2024
1 parent 4264e93 commit 9f4ed28
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
42 changes: 42 additions & 0 deletions spec/namespaces/notifications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ info:
description: OpenSearch Notifications API
version: 1.0.0
paths:
/_plugins/_notifications/channels:
get:
operationId: notifications.list_channels.0
x-operation-group: notifications.list_channels
x-version-added: '2.0'
description: List created notification channels.
# TODO: Update url when this one is merged: https://github.com/opensearch-project/documentation-website/pull/6982
externalDocs:
url: https://opensearch.org/docs/latest/observing-your-data/notifications/api/#list-all-notification-configurations
responses:
'200':
$ref: '#/components/responses/notifications.list_channels@200'
/_plugins/_notifications/configs:
delete:
operationId: notifications.delete_configs.0
Expand Down Expand Up @@ -225,6 +237,36 @@ components:
application/json:
schema:
$ref: '../schemas/notifications._common.yaml#/components/schemas/GetConfigsResponse'
notifications.list_channels@200:
description: ''
content:
application/json:
schema:
type: object
properties:
start_index:
type: integer
format: int64
total_hits:
type: integer
format: int64
total_hit_relation:
$ref: '../schemas/notifications._common.yaml#/components/schemas/TotalHitRelation'
channel_list:
type: array
items:
type: object
properties:
config_id:
type: string
name:
type: string
description:
type: string
config_type:
$ref: '../schemas/notifications._common.yaml#/components/schemas/NotificationConfigType'
is_enabled:
type: boolean
notifications.list_features@200:
description: ''
content:
Expand Down
2 changes: 2 additions & 0 deletions spec/opensearch-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ paths:
$ref: 'namespaces/knn.yaml#/paths/~1_plugins~1_knn~1{node_id}~1stats'
/_plugins/_knn/{node_id}/stats/{stat}:
$ref: 'namespaces/knn.yaml#/paths/~1_plugins~1_knn~1{node_id}~1stats~1{stat}'
/_plugins/_notifications/channels:
$ref: 'namespaces/notifications.yaml#/paths/~1_plugins~1_notifications~1channels'
/_plugins/_notifications/configs:
$ref: 'namespaces/notifications.yaml#/paths/~1_plugins~1_notifications~1configs'
/_plugins/_notifications/configs/{config_id}:
Expand Down

0 comments on commit 9f4ed28

Please sign in to comment.