Get ES|QL data sources Technical preview

GET /_query/data_source/{name}

All methods and paths for this operation:

GET /_query/data_source

GET /_query/data_source/{name}

Returns one or more data sources used in ES|QL data federation. A concrete-name miss returns 404; a wildcard pattern or list-all request with no match returns 200 with an empty array.

Required authorization

  • Cluster privileges: manage
ES|QL Data Federation

Path parameters

  • name string | array[string] Required

    A comma-separated list of data source names or wildcard patterns. Omit to return all data sources.

Query parameters

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • data_sources array[object] Required

      The matching data sources. Credential values in each data source's settings are redacted as ::es_redacted:: in the response.

      Hide data_sources attributes Show data_sources attributes object

      Represents a data source definition stored in cluster state. A data source holds connection settings (credentials, endpoints, auth) for an external data provider.

      • name string Required

        The data source name.

      • type string Required

        The data source type. Currently, s3 is supported.

      • description string

        A free-text description.

      • settings object Required

        Type-specific connection and authentication settings.

        Hide settings attribute Show settings attribute object
        • * object Additional properties
GET /_query/data_source/{name}
GET /_query/data_source/prod_s3_logs
resp = client.esql.get_data_source(
    name="prod_s3_logs",
)
const response = await client.esql.getDataSource({
  name: "prod_s3_logs",
});
response = client.esql.get_data_source(
  name: "prod_s3_logs"
)
$resp = $client->esql()->getDataSource([
    "name" => "prod_s3_logs",
]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_query/data_source/prod_s3_logs"
Response examples (200)
The response contains the requested data source. Credential values are replaced by the ::es_redacted:: sentinel.
{
  "data_sources": [
    {
      "name": "prod_s3_logs",
      "type": "s3",
      "description": "Production S3 logs bucket",
      "settings": {
        "region": "us-east-1",
        "auth": "static_credentials",
        "access_key": "::es_redacted::",
        "secret_key": "::es_redacted::"
      }
    }
  ]
}
A wildcard or list-all request with no matches returns an empty array.
{
  "data_sources": []
}