diff --git a/spec/namespaces/notifications.yaml b/spec/namespaces/notifications.yaml index 5dd403ca4..42eb5fe1e 100644 --- a/spec/namespaces/notifications.yaml +++ b/spec/namespaces/notifications.yaml @@ -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 @@ -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: diff --git a/spec/opensearch-openapi.yaml b/spec/opensearch-openapi.yaml index c835abf89..1673d43af 100644 --- a/spec/opensearch-openapi.yaml +++ b/spec/opensearch-openapi.yaml @@ -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}: