Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Observability namespace #474

Merged
merged 18 commits into from
Aug 12, 2024
3 changes: 2 additions & 1 deletion .cspell
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,5 @@ urldecode
vectory
whoamiprotected
wordnet
Yrtsd
Yrtsd
localstats
2 changes: 1 addition & 1 deletion .lycheeignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://localhost:9200*
https://localhost:*
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added metadata additionalProperties to `ErrorCause` ([#462](https://github.com/opensearch-project/opensearch-api-specification/pull/462))
- Added `creation_date` field to `DanglingIndex` ([#462](https://github.com/opensearch-project/opensearch-api-specification/pull/462))
- Added doc on `cluster create-index blocked` workaround ([#465](https://github.com/opensearch-project/opensearch-api-specification/pull/465))
- Added `observability` namespace API specifications ([#474](https://github.com/opensearch-project/opensearch-api-specification/pull/474))
- Added support for reusing output variables as keys in payload expectations ([#471](https://github.com/opensearch-project/opensearch-api-specification/pull/471))
- Added support for running tests against Amazon OpenSearch ([#476](https://github.com/opensearch-project/opensearch-api-specification/pull/476))

Expand Down
224 changes: 224 additions & 0 deletions spec/namespaces/observability.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
openapi: 3.1.0
info:
title: OpenSearch Observability Object API
description: API for retrieving and managing Observability Objects.
version: 1.0.0
paths:
/_plugins/_observability/_local/stats:
get:
operationId: observability.get_localstats.0
x-operation-group: observability.get_localstats
x-version-added: '1.1'
Copy link
Collaborator

@Tokesh Tokesh Aug 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please recheck x-version-added. i think it can fix your ci issue
especially for APIs where you have failed tests
i tested your branch locally with latest version, everything works fine

Copy link
Collaborator Author

@aabeshov aabeshov Aug 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tokesh committed changes , you can check

description: Retrieves Local Stats of all observability objects.
responses:
'200':
$ref: '#/components/responses/observability.get_localstats@200'
/_plugins/_observability/object:
get:
operationId: observability.list_objects.0
x-operation-group: observability.list_objects
x-version-added: '1.1'
description: Retrieves list of all observability objects.
responses:
'200':
$ref: '#/components/responses/observability.list_objects@200'
post:
operationId: observability.create_object.0
x-operation-group: observability.create_object
x-version-added: '1.1'
description: Creates a new observability object.
requestBody:
$ref: '#/components/requestBodies/observability.create_object'
responses:
'200':
$ref: '#/components/responses/observability.create_object@200'
delete:
operationId: observability.delete_objects.0
x-operation-group: observability.delete_objects
x-version-added: '1.1'
description: Deletes specific observability objects specified by ID or a list of IDs.
parameters:
- $ref: '#/components/parameters/observability.delete_objects::query.objectId'
- $ref: '#/components/parameters/observability.delete_objects::query.objectIdList'
responses:
'200':
$ref: '#/components/responses/observability.delete_objects@200'
'404':
$ref: '#/components/responses/observability.delete_objects@404'
/_plugins/_observability/object/{object_id}:
get:
operationId: observability.get_object.0
x-operation-group: observability.get_object
x-version-added: '1.1'
description: Retrieves specific observability object specified by ID.
parameters:
- $ref: '#/components/parameters/observability.get_object::path.object_id'
responses:
'200':
$ref: '#/components/responses/observability.get_object@200'
'404':
$ref: '#/components/responses/observability.get_object@404'
put:
operationId: observability.update_object.0
x-operation-group: observability.update_object
x-version-added: '1.1'
description: Updates an existing observability object.
parameters:
- $ref: '#/components/parameters/observability.update_object::path.object_id'
requestBody:
$ref: '#/components/requestBodies/observability.update_object'
responses:
'200':
$ref: '#/components/responses/observability.update_object@200'
'404':
$ref: '#/components/responses/observability.update_object@404'
delete:
operationId: observability.delete_object.0
x-operation-group: observability.delete_object
x-version-added: '1.1'
description: Deletes specific observability object specified by ID.
parameters:
- $ref: '#/components/parameters/observability.delete_object::path.object_id'
responses:
'200':
$ref: '#/components/responses/observability.delete_object@200'
'404':
$ref: '#/components/responses/observability.delete_object@404'
components:
requestBodies:
observability.create_object:
content:
application/json:
schema:
$ref: '../schemas/observability._common.yaml#/components/schemas/ObservabilityObject'
observability.update_object:
content:
application/json:
schema:
$ref: '../schemas/observability._common.yaml#/components/schemas/ObservabilityObject'
responses:
observability.list_objects@200:
description: Successful response of retrieving all Observability Objects.
content:
application/json:
schema:
$ref: '../schemas/observability._common.yaml#/components/schemas/ObservabilityObjectList'
observability.create_object@200:
description: Created
content:
application/json:
schema:
type: object
properties:
objectId:
type: string
observability.get_object@200:
description: Successful response of retrieving specific Observability Object.
content:
application/json:
schema:
$ref: '../schemas/observability._common.yaml#/components/schemas/ObservabilityObjectList'
observability.get_object@404:
description: Not Found
content:
application/json:
schema:
$ref: '../schemas/observability._common.yaml#/components/schemas/NotFoundResponse'
observability.update_object@200:
description: Updated
content:
application/json:
schema:
type: object
properties:
objectId:
type: string
observability.update_object@404:
description: Not Found
content:
application/json:
schema:
$ref: '../schemas/observability._common.yaml#/components/schemas/NotFoundResponse'
observability.delete_object@200:
description: Deleted
content:
application/json:
schema:
type: object
properties:
deleteResponseList:
type: object
additionalProperties:
type: string
example: OK
observability.delete_object@404:
description: Not Found
content:
application/json:
schema:
$ref: '../schemas/observability._common.yaml#/components/schemas/NotFoundResponse'
observability.delete_objects@200:
description: Deleted
content:
application/json:
schema:
type: object
properties:
deleteResponseList:
type: object
additionalProperties:
type: string
example: OK
observability.delete_objects@404:
description: Not Found
content:
application/json:
schema:
$ref: '../schemas/observability._common.yaml#/components/schemas/NotFoundResponse'
observability.get_localstats@200:
description: Retrieves
content:
application/json:
schema:
type: string
parameters:
observability.get_object::path.object_id:
in: path
name: object_id
description: The ID of the Observability Object.
required: true
schema:
type: string
style: simple
observability.update_object::path.object_id:
in: path
name: object_id
description: The ID of the Observability Object.
required: true
schema:
type: string
style: simple
observability.delete_object::path.object_id:
in: path
name: object_id
description: The ID of the Observability Object.
required: true
schema:
type: string
style: simple
observability.delete_objects::query.objectId:
in: query
name: objectId
description: The ID of a single Observability Object to delete.
required: false
schema:
type: string
style: form
observability.delete_objects::query.objectIdList:
in: query
name: objectIdList
description: A comma-separated list of Observability Object IDs to delete.
required: false
schema:
type: string
style: form
140 changes: 140 additions & 0 deletions spec/namespaces/query.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
openapi: 3.1.0
info:
title: OpenSearch Query Datasources API
description: OpenSearch Query Datasources API.
version: 2.7.0
paths:
/_plugins/_query/_datasources:
get:
operationId: query.datasources_list.0
x-operation-group: query.datasources_list
x-version-added: '2.7'
description: Retrieves list of all datasources.
responses:
'200':
$ref: '#/components/responses/query.datasources_list@200'
post:
operationId: query.datasources_create.0
x-operation-group: query.datasources_create
x-version-added: '2.7'
description: Creates a new query datasource.
requestBody:
$ref: '#/components/requestBodies/query.datasources_create'
responses:
'201':
$ref: '#/components/responses/query.datasources_create@201'
put:
operationId: query.datasources_update.0
x-operation-group: query.datasources_update
x-version-added: '2.7'
description: Updates an existing query datasource.
requestBody:
$ref: '#/components/requestBodies/query.datasources_update'
responses:
'200':
$ref: '#/components/responses/query.datasources_update@200'
'404':
$ref: '#/components/responses/query.datasources_update@404'
/_plugins/_query/_datasources/{datasource_name}:
get:
operationId: query.datasource_retrieve.0
x-operation-group: query.datasource_retrieve
x-version-added: '2.7'
description: Retrieves specific datasource specified by name.
parameters:
- $ref: '#/components/parameters/query.datasource_retrieve::path.datasource_name'
responses:
'200':
$ref: '#/components/responses/query.datasource_retrieve@200'
'404':
$ref: '#/components/responses/query.datasource_retrieve@404'
delete:
operationId: query.datasource_delete.0
x-operation-group: query.datasource_delete
x-version-added: '2.7'
description: Deletes specific datasource specified by name.
parameters:
- $ref: '#/components/parameters/query.datasource_delete::path.datasource_name'
responses:
'204':
$ref: '#/components/responses/query.datasource_delete@204'
'404':
$ref: '#/components/responses/query.datasource_delete@404'

components:
requestBodies:
query.datasources_create:
content:
application/json:
schema:
$ref: '../schemas/query._common.yaml#/components/schemas/DataSource'
query.datasources_update:
content:
application/json:
schema:
$ref: '../schemas/query._common.yaml#/components/schemas/DataSource'
responses:
query.datasources_list@200:
description: Successful response of retrieving all Data Sources.
content:
application/json:
schema:
$ref: '../schemas/query._common.yaml#/components/schemas/DataSourceList'
query.datasources_create@201:
description: Created
content:
application/json:
schema:
type: string
query.datasources_update@200:
description: Updated
content:
application/json:
schema:
type: string
query.datasources_update@404:
description: Not Found
content:
application/json:
schema:
$ref: '../schemas/query._common.yaml#/components/schemas/DataSourceNotFound'
query.datasource_retrieve@200:
description: Successful response of retrieving Data Source.
content:
application/json:
schema:
$ref: '../schemas/query._common.yaml#/components/schemas/DataSourceRetrieve'
query.datasource_retrieve@404:
description: Not Found
content:
application/json:
schema:
$ref: '../schemas/query._common.yaml#/components/schemas/DataSourceNotFound'
query.datasource_delete@204:
description: No Content
content:
application/json:
schema:
type: object
properties: { }
query.datasource_delete@404:
description: Not Found
content:
application/json:
schema:
$ref: '../schemas/query._common.yaml#/components/schemas/DataSourceNotFound'
parameters:
query.datasource_delete::path.datasource_name:
name: datasource_name
in: path
description: The Name of the DataSource to delete.
schema:
type: string
required: true
query.datasource_retrieve::path.datasource_name:
name: datasource_name
in: path
description: The Name of the DataSource to retrieve.
schema:
type: string
required: true
Loading
Loading