فهرست منبع

[SPEC] Moved the cat API into its own namespace and added missing qs params

Clinton Gormley 11 سال پیش
والد
کامیت
04b6dd9d0c

+ 41 - 0
rest-api-spec/api/cat.aliases.json

@@ -0,0 +1,41 @@
+{
+  "cat": {
+    "documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html",
+    "methods": ["GET"],
+    "url": {
+      "path": "/_cat/aliases",
+      "paths": ["/_cat/aliases", "/_cat/aliases/{alias}"],
+      "parts": {
+        "alias": {
+          "type" : "list",
+          "description" : "A comma-separated list of alias names to return"
+        }
+      },
+      "params": {
+        "local": {
+          "type" : "boolean",
+          "description" : "Return local information, do not retrieve the state from master node (default: false)"
+        },
+        "master_timeout": {
+          "type" : "time",
+          "description" : "Explicit operation timeout for connection to master node"
+        },
+        "h": {
+            "type": "list",
+            "description" : "Comma-separated list of column names to display"
+        },
+        "help": {
+          "type": "boolean",
+          "description": "Return help information",
+          "default": false
+        },
+        "v": {
+          "type": "boolean",
+          "description": "Verbose mode. Display column headers",
+          "default": false
+        }
+      }
+    },
+    "body": null
+  }
+}

+ 11 - 10
rest-api-spec/api/cat.json → rest-api-spec/api/cat.allocation.json

@@ -3,23 +3,20 @@
     "documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html",
     "methods": ["GET"],
     "url": {
-      "path": "/_cat",
-      "paths": ["/_cat/aliases", "/_cat/aliases/{alias}", "/_cat/allocation", "/_cat/allocation/{nodes}", "/_cat", "/_cat/health", "/_cat/indices", "/_cat/indices/{index}", "/_cat/master", "/_cat/nodes", "/_cat/pending_tasks", "/_cat/shards", "/_cat/shards/{index}"],
+      "path": "/_cat/allocation",
+      "paths": ["/_cat/allocation", "/_cat/allocation/{nodes}"],
       "parts": {
-        "alias": {
-          "type" : "list",
-          "description" : "A comma-separated list of alias names to return"
-        },
         "nodes": {
           "type": "list",
           "description": "A comma-separated list of node IDs or names to limit the returned information"
-        },
-        "index": {
-          "type" : "list",
-          "description": "A comma-separated list of index names to limit the returned information"
         }
       },
       "params": {
+        "bytes": {
+          "type": "enum",
+          "description" : "The unit in which to display byte values",
+          "options": [ "b", "k", "m", "g" ]
+        },
         "local": {
           "type" : "boolean",
           "description" : "Return local information, do not retrieve the state from master node (default: false)"
@@ -29,6 +26,10 @@
           "description" : "Explicit operation timeout for connection to master node"
         },
         "h": {
+            "type": "list",
+            "description" : "Comma-separated list of column names to display"
+        },
+        "help": {
           "type": "boolean",
           "description": "Return help information",
           "default": false

+ 37 - 0
rest-api-spec/api/cat.health.json

@@ -0,0 +1,37 @@
+{
+  "cat": {
+    "documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html",
+    "methods": ["GET"],
+    "url": {
+      "path": "/_cat/health",
+      "paths": ["/_cat/health"],
+      "parts": {
+      },
+      "params": {
+        "local": {
+          "type" : "boolean",
+          "description" : "Return local information, do not retrieve the state from master node (default: false)"
+        },
+        "master_timeout": {
+          "type" : "time",
+          "description" : "Explicit operation timeout for connection to master node"
+        },
+        "h": {
+            "type": "list",
+            "description" : "Comma-separated list of column names to display"
+        },
+        "help": {
+          "type": "boolean",
+          "description": "Return help information",
+          "default": false
+        },
+        "v": {
+          "type": "boolean",
+          "description": "Verbose mode. Display column headers",
+          "default": false
+        }
+      }
+    },
+    "body": null
+  }
+}

+ 20 - 0
rest-api-spec/api/cat.help.json

@@ -0,0 +1,20 @@
+{
+  "cat": {
+    "documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html",
+    "methods": ["GET"],
+    "url": {
+      "path": "/_cat",
+      "paths": ["/_cat"],
+      "parts": {
+      },
+      "params": {
+        "help": {
+          "type": "boolean",
+          "description": "Return help information",
+          "default": false
+        }
+      }
+    },
+    "body": null
+  }
+}

+ 46 - 0
rest-api-spec/api/cat.indices.json

@@ -0,0 +1,46 @@
+{
+  "cat": {
+    "documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html",
+    "methods": ["GET"],
+    "url": {
+      "path": "/_cat/indices",
+      "paths": ["/_cat/indices", "/_cat/indices/{index}"],
+      "parts": {
+        "index": {
+          "type" : "list",
+          "description": "A comma-separated list of index names to limit the returned information"
+        }
+      },
+      "params": {
+        "bytes": {
+          "type": "enum",
+          "description" : "The unit in which to display byte values",
+          "options": [ "b", "k", "m", "g" ]
+        },
+        "local": {
+          "type" : "boolean",
+          "description" : "Return local information, do not retrieve the state from master node (default: false)"
+        },
+        "master_timeout": {
+          "type" : "time",
+          "description" : "Explicit operation timeout for connection to master node"
+        },
+        "h": {
+            "type": "list",
+            "description" : "Comma-separated list of column names to display"
+        },
+        "help": {
+          "type": "boolean",
+          "description": "Return help information",
+          "default": false
+        },
+        "v": {
+          "type": "boolean",
+          "description": "Verbose mode. Display column headers",
+          "default": false
+        }
+      }
+    },
+    "body": null
+  }
+}

+ 37 - 0
rest-api-spec/api/cat.master.json

@@ -0,0 +1,37 @@
+{
+  "cat": {
+    "documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html",
+    "methods": ["GET"],
+    "url": {
+      "path": "/_cat/master",
+      "paths": ["/_cat/master"],
+      "parts": {
+      },
+      "params": {
+        "local": {
+          "type" : "boolean",
+          "description" : "Return local information, do not retrieve the state from master node (default: false)"
+        },
+        "master_timeout": {
+          "type" : "time",
+          "description" : "Explicit operation timeout for connection to master node"
+        },
+        "h": {
+            "type": "list",
+            "description" : "Comma-separated list of column names to display"
+        },
+        "help": {
+          "type": "boolean",
+          "description": "Return help information",
+          "default": false
+        },
+        "v": {
+          "type": "boolean",
+          "description": "Verbose mode. Display column headers",
+          "default": false
+        }
+      }
+    },
+    "body": null
+  }
+}

+ 37 - 0
rest-api-spec/api/cat.nodes.json

@@ -0,0 +1,37 @@
+{
+  "cat": {
+    "documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html",
+    "methods": ["GET"],
+    "url": {
+      "path": "/_cat/nodes",
+      "paths": ["/_cat/nodes"],
+      "parts": {
+      },
+      "params": {
+        "local": {
+          "type" : "boolean",
+          "description" : "Return local information, do not retrieve the state from master node (default: false)"
+        },
+        "master_timeout": {
+          "type" : "time",
+          "description" : "Explicit operation timeout for connection to master node"
+        },
+        "h": {
+            "type": "list",
+            "description" : "Comma-separated list of column names to display"
+        },
+        "help": {
+          "type": "boolean",
+          "description": "Return help information",
+          "default": false
+        },
+        "v": {
+          "type": "boolean",
+          "description": "Verbose mode. Display column headers",
+          "default": false
+        }
+      }
+    },
+    "body": null
+  }
+}

+ 37 - 0
rest-api-spec/api/cat.pending_tasks.json

@@ -0,0 +1,37 @@
+{
+  "cat": {
+    "documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html",
+    "methods": ["GET"],
+    "url": {
+      "path": "/_cat/pending_tasks",
+      "paths": ["/_cat/pending_tasks"],
+      "parts": {
+      },
+      "params": {
+        "local": {
+          "type" : "boolean",
+          "description" : "Return local information, do not retrieve the state from master node (default: false)"
+        },
+        "master_timeout": {
+          "type" : "time",
+          "description" : "Explicit operation timeout for connection to master node"
+        },
+        "h": {
+            "type": "list",
+            "description" : "Comma-separated list of column names to display"
+        },
+        "help": {
+          "type": "boolean",
+          "description": "Return help information",
+          "default": false
+        },
+        "v": {
+          "type": "boolean",
+          "description": "Verbose mode. Display column headers",
+          "default": false
+        }
+      }
+    },
+    "body": null
+  }
+}

+ 41 - 0
rest-api-spec/api/cat.shards.json

@@ -0,0 +1,41 @@
+{
+  "cat": {
+    "documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html",
+    "methods": ["GET"],
+    "url": {
+      "path": "/_cat/shards",
+      "paths": ["/_cat/shards", "/_cat/shards/{index}"],
+      "parts": {
+        "index": {
+          "type" : "list",
+          "description": "A comma-separated list of index names to limit the returned information"
+        }
+      },
+      "params": {
+        "local": {
+          "type" : "boolean",
+          "description" : "Return local information, do not retrieve the state from master node (default: false)"
+        },
+        "master_timeout": {
+          "type" : "time",
+          "description" : "Explicit operation timeout for connection to master node"
+        },
+        "h": {
+            "type": "list",
+            "description" : "Comma-separated list of column names to display"
+        },
+        "help": {
+          "type": "boolean",
+          "description": "Return help information",
+          "default": false
+        },
+        "v": {
+          "type": "boolean",
+          "description": "Verbose mode. Display column headers",
+          "default": false
+        }
+      }
+    },
+    "body": null
+  }
+}