younifyd
Menu

Get SQL search results (GET)

Get SQL search results

GET/_sql

Use it in a workflow

  1. Add a step and choose the Elasticsearch connector.
  2. Pick the Get SQL search results (GET) action (under sql).
  3. Fill in the fields below, then reference the result from later steps as {{getSqlSearchResultsGet.response.data}}.

Request

Query parameters

formatstring

The format for the response. You can also specify a format using the `Accept` HTTP header. If you specify both this parameter and the `Accept` HTTP header, this parameter takes precedence.

One ofcsvjsontsvtxtyamlcborsmile

Response

Returns 200 with an object. Read it in later steps with {{getSqlSearchResultsGet.response.data.<field>}}.

columnsarray<object>

Column headings for the search results. Each object is a column.

nameanyrequired
typestringrequired
cursorstring

The cursor for the next set of paginated results. For CSV, TSV, and TXT responses, this value is returned in the `Cursor` HTTP header.

idany

The identifier for the search. This value is returned only for async and saved synchronous searches. For CSV, TSV, and TXT responses, this value is returned in the `Async-ID` HTTP header.

is_runningboolean

If `true`, the search is still running. If `false`, the search has finished. This value is returned only for async and saved synchronous searches. For CSV, TSV, and TXT responses, this value is returned in the `Async-partial` HTTP header.

is_partialboolean

If `true`, the response does not contain complete search results. If `is_partial` is `true` and `is_running` is `true`, the search is still running. If `is_partial` is `true` but `is_running` is `false`, the results are partial due to a failure or timeout. This value is returned only for async and saved synchronous searches. For CSV, TSV, and TXT responses, this value is returned in the `Async-partial` HTTP header.

rowsarray<array<object>>

The values for the search results.

json
{
  "rows": [
    [
      {}
    ]
  ],
  "columns": [
    {
      "name": null,
      "type": "string"
    }
  ],
  "cursor": "string",
  "id": null,
  "is_running": false,
  "is_partial": false
}

Need more? See the Elasticsearch guide for connection setup and behaviour shared by every action.

Get SQL search results (GET) — Elasticsearch — Documentation