2021-05-28 13:48:19 -04:00
|
|
|
---
|
|
|
|
layout: default
|
|
|
|
title: Endpoint
|
|
|
|
parent: Piped processing language
|
|
|
|
nav_order: 1
|
|
|
|
---
|
|
|
|
|
|
|
|
# Endpoint
|
2021-07-26 19:14:22 -04:00
|
|
|
Introduced 1.0
|
|
|
|
{: .label .label-purple }
|
2021-05-28 13:48:19 -04:00
|
|
|
|
|
|
|
To send a query request to PPL plugin, use the HTTP POST request.
|
|
|
|
We recommend a POST request because it doesn't have any length limit and it allows you to pass other parameters to the plugin for other functionality.
|
|
|
|
|
2021-05-24 19:50:29 -04:00
|
|
|
Use the `_explain` endpoint for query translation and troubleshooting.
|
2021-05-28 13:48:19 -04:00
|
|
|
|
|
|
|
## Request Format
|
|
|
|
|
2021-05-24 19:50:29 -04:00
|
|
|
To use the PPL plugin with your own applications, send requests to `_plugins/_ppl`, with your query in the request body:
|
2021-05-28 13:48:19 -04:00
|
|
|
|
|
|
|
```json
|
2021-05-24 19:50:29 -04:00
|
|
|
curl -H 'Content-Type: application/json' -X POST localhost:9200/_plugins/_ppl \
|
2021-05-28 13:48:19 -04:00
|
|
|
... -d '{"query" : "source=accounts | fields firstname, lastname"}'
|
|
|
|
```
|