Skip to content

Console

  • Elasticsearch

The console takes requests in Kibana Dev Tools syntax: a method and a path on one line, then an optional JSON body. Requests go on the left, responses show on the right. Use it for anything the other panels do not cover.

The Elasticsearch console: a search request on the products alias with a match query and a terms aggregation, its 200 OK response on the right, and endpoint completions offered for the next request.The Elasticsearch console: a search request on the products alias with a match query and a terms aggregation, its 200 OK response on the right, and endpoint completions offered for the next request.
A Dev Tools-style console with API autocomplete and the response beside the request.
  1. Open the connection’s menu and choose Open console, or double-click Console in the sidebar.

  2. Type a request, for example:

    GET /orders/_search
    {
    "query": { "term": { "status": "paid" } }
    }
  3. Put the cursor in the request and choose Send, or press Ctrl + Enter (Cmd + Enter on macOS).

With text selected, Send runs every request the selection touches, in order; the response pane then has one tab per request. _bulk and _msearch take NDJSON lines as their body.

Cancel stops a running request. Each request carries an X-Opaque-Id, so cancelling also cancels the server tasks it started.

Suggestions come from the open Elasticsearch API specification and follow what you are typing:

  • methods at the start of a request line
  • endpoint paths, and index, alias and data stream names, after the method
  • query parameters after ?
  • the keys and allowed values of request bodies, following the JSON path at the cursor through queries, aggregations, mappings and settings
Button What it does
Send Sends the request at the cursor, or every request in the selection
Cancel Stops the running request
Auto-indent Re-indents the request bodies
History Lists the requests sent from this console; click one to put it back in the editor

The response header shows the status, the time taken and a short summary. When a request cannot be parsed, or the server reports an error position, the editor marks the spot. A response with aggregations gets two tabs: Response for the JSON and Aggregations, which shows them as a Tree of aggregations, buckets with their document counts and metrics, or as a Table with one row per innermost bucket.

Responses keep numbers exactly as the server wrote them: a _source holding 1234567890123456789 or 1.10 shows unchanged.

Requests that write follow the profile’s rules. A read-only profile refuses them. Destructive requests (deleting indices or documents, closing indices, delete by query, force merge, bulk requests with deletes) always ask first, and production and confirm-writes profiles ask before every write. The confirmation shows the request text and Send sends it.

The query builder of the documents view writes Query DSL for you; its Request tab has Open in console to continue with the search here.

querybara query runs console text against an Elasticsearch URL or profile and prints each response body. --format json or jsonl prints objects with the request, status and body.

Terminal window
querybara query "https://[email protected]:9200" -e 'GET _cluster/health'
querybara query search-prod -f requests.txt --format jsonl

Documents Querybara 0.1.1 · built frombc9f5aa