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

Initial api implementation #5

Merged
merged 16 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module.exports = {
"env": {
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"overrides": [
{
"env": {
"node": true
},
"files": [
".eslintrc.{js,cjs}"
],
"parserOptions": {
"sourceType": "script"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
}
}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
*.DS_Store
node_modules
build
dist
.env
94 changes: 1 addition & 93 deletions docs/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,115 +46,23 @@ paths:
error: "Internal server error. Please try again later."
/api/health/:
get:
summary: Opensearch Health Endpoint
summary: Prometheus Healthcheck endpoint
operationId: getHealth
parameters:
- name: level
in: query
description: "The level of awareness attributes (e.g. /api/health?level=awareness_attributes)"
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Health'
/api/config/:
get:
summary: Get API Configuration Information
operationId: getConfig
parameters:
- name: flat_settings
in: query
description: "Whether to return settings in flat form."
required: false
schema:
type: boolean
- name: include_defaults
in: query
description: "Whether to include default settings."
required: false
schema:
type: boolean
- name: cluster_manager_timeout
in: query
description: "The amount of time to wait for a resposne form the cluster manager node. Default is 30 seconds."
required: false
schema:
type: boolean
responses:
'200':
description: Successful operation


components:
schemas:
Health:
type: object
properties:
clusterName:
description: "The name of the cluster."
type: string
status:
description: "The cluster health status, which represents the state of shard allocation in the cluster. May be green, yellow, or red."
type: string
numberOfNodes:
description: "The number of nodes in the cluster."
type: integer
numberOfDataNodes:
description: "The number of data nodes in the cluster."
type: integer
discoveredClusterManager:
description: "Specifies whether the cluster manager is discovered."
type: boolean
activePrimaryShards:
description: "The number of active primary shards."
type: integer
activeShards:
description: "The total number of active shards, including primary and replica shards."
type: integer
relocatingShards:
description: "The number of relocating shards."
type: integer
initializingShards:
description: "The number of initializing shards."
type: integer
unassignedShards:
description: "The number of unassigned shards."
type: integer
delayedUnassignedShards:
description: "The number of delayed unassigned shards."
type: integer
numberOfPendingTasks:
description: "The number of pending tasks in the cluster."
type: integer
numberOfInFlightFetch:
description: "The number of unfinished fetches."
type: integer
taskMaxWaitingInQueueMillis:
description: "The maximum wait time for all tasks waiting to be performed, in milliseconds."
type: integer
activeShardsPercentAsNumber:
description: "The percentage of active shards in the cluster."
type: number
awarenessAttributes:
description: "Contains cluster health information for each awareness attribute."
type: object
properties:
active_shards:
type: integer
initializing_shards:
type: integer
relocating_shards:
type: integer
unassigned_shards:
type: integer
data_nodes:
type: integer
weight:
type: integer
SearchResponse:
type: object
properties:
Expand Down
Loading
Loading