-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
Codecov Report
@@ Coverage Diff @@
## main #42 +/- ##
=======================================
Coverage 65.33% 65.33%
=======================================
Files 20 20
Lines 1255 1255
=======================================
Hits 820 820
Misses 341 341
Partials 94 94
Flags with carried forward coverage won't be shown. Click here to find out more. |
## Objective | ||
|
||
This document describes how to support [rest api](https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-apis.html) in a generic way. | ||
As of now, elasticsearch support api in different categories like index api, cat api, cluster api, document api, etc to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalize "e" in elasticsearch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack
This document describes how to support [rest api](https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-apis.html) in a generic way. | ||
As of now, elasticsearch support api in different categories like index api, cat api, cluster api, document api, etc to | ||
configure and access their features. It will take tremendous amount of time and effort to provide every api as native commands. | ||
Hence, we will be categorizing those REST API based on GET/PUT/POST/DELETE and allow users to perform their request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be consistent in capitalization of "rest" and "api"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still see some incosistencies where there is "api" and "API"
As of now, elasticsearch support api in different categories like index api, cat api, cluster api, document api, etc to | ||
configure and access their features. It will take tremendous amount of time and effort to provide every api as native commands. | ||
Hence, we will be categorizing those REST API based on GET/PUT/POST/DELETE and allow users to perform their request | ||
in a generic way. This will support any future API without any additional support. It also benefits plugin owners while on-boarding their plugin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benefitting plugin owners isn't exactly clear to me. How will this change anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So right now, plug in owners has to build the gateway layer by using framework methods like build request/ call request. Now, they can call ES's controller methods(get/put/post) directly .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add that explanation here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on second thought, removed this point. I will update our developer guideline to include this benefit once i merge this feature, since we need to provide a new direction on how to use this in framework. I am planning to keep those discussion away from this feature at this point.
|
||
## Common parameters | ||
|
||
The following options can be applied to all of the odfe-cli commands. These parameters are supported by server as mentioned [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean "supported by server"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i was trying to distant our cli with elasticsearch as much as possible. May be it is confusing. Let me revert back to call elasticsearch to avoid this confusion.
## Common parameters | ||
|
||
The following options can be applied to all of the odfe-cli commands. These parameters are supported by server as mentioned [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html). | ||
In future more parameters or include multiple values will be supported that can be added as flag to any commands. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"In the future, we will support ..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack
|
||
### Description | ||
|
||
Use GET API to execute requests against elasticsearch cluster. This command enables you to run any GET based REST API commands across all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalize elasticsearch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack
2. To returns the health status of a cluster. | ||
|
||
``` | ||
odfe-cli cmd get --path "_cluster/health" --pretty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like curl instead of cmd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure. That is one of the question in RFC. If we don't get any response, i was thinking of posting on es-learning group to get vote!
8f1f20a
to
7b03c5c
Compare
This document describes how to support [rest api](https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-apis.html) in a generic way. | ||
As of now, elasticsearch support api in different categories like index api, cat api, cluster api, document api, etc to | ||
configure and access their features. It will take tremendous amount of time and effort to provide every api as native commands. | ||
Hence, we will be categorizing those REST API based on GET/PUT/POST/DELETE and allow users to perform their request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still see some incosistencies where there is "api" and "API"
As of now, elasticsearch support api in different categories like index api, cat api, cluster api, document api, etc to | ||
configure and access their features. It will take tremendous amount of time and effort to provide every api as native commands. | ||
Hence, we will be categorizing those REST API based on GET/PUT/POST/DELETE and allow users to perform their request | ||
in a generic way. This will support any future API without any additional support. It also benefits plugin owners while on-boarding their plugin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add that explanation here?
epoch timestamp count | ||
1612311592 12:24:24 100 | ||
``` | ||
2. To returns the health status of a cluster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return not returns. Remove period at end of line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack
``` | ||
$ odfe-cli curl post --path "_search" \ | ||
--headers "Content-Encoding : gzip;Accept-Encoding: gzip, deflate" \ | ||
--data-bianry @/tmp/req.txt.gz` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
binary misspelled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Looking forward to this feature :)
## Objective | ||
|
||
This document describes how to support [rest api](https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-apis.html) in a generic way. | ||
As of now, elasticsearch support api in different categories like index api, cat api, cluster api, document api, etc to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor elasticsearch -> Elasticsearch? In other places as well
Added rfc for rest api as commands
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.