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
Path parameters
-
A comma-separated list of data source names or wildcard patterns. Omit to return all data sources.
Query parameters
-
Period to wait for a connection to the master node.
External documentation
GET
/_query/data_source/{name}
Console
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)
Data source details
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": []
}