Change CCR stats endpoint to be index-centric (#34169)

This commit modifies the CCR stats endpoint for indices to be
/{index}/_ccr/stats. This makes this endpoint consistent with other
index-centric endpoints like indices stats.
This commit is contained in:
Jason Tedor 2018-09-30 14:29:32 -04:00 committed by GitHub
parent e2bd2028d8
commit 1893765055
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ public class RestCcrStatsAction extends BaseRestHandler {
public RestCcrStatsAction(final Settings settings, final RestController controller) { public RestCcrStatsAction(final Settings settings, final RestController controller) {
super(settings); super(settings);
controller.registerHandler(RestRequest.Method.GET, "/_ccr/stats", this); controller.registerHandler(RestRequest.Method.GET, "/_ccr/stats", this);
controller.registerHandler(RestRequest.Method.GET, "/_ccr/stats/{index}", this); controller.registerHandler(RestRequest.Method.GET, "/{index}/_ccr/stats", this);
} }
@Override @Override

View File

@ -4,7 +4,7 @@
"methods": [ "GET" ], "methods": [ "GET" ],
"url": { "url": {
"path": "/_ccr/stats", "path": "/_ccr/stats",
"paths": [ "/_ccr/stats", "/_ccr/stats/{index}" ], "paths": [ "/_ccr/stats", "/{index}/_ccr/stats" ],
"parts": { "parts": {
"index": { "index": {
"type": "list", "type": "list",