2.6 KiB
2.6 KiB
layout, title, parent, nav_order, has_children, redirect_from
| layout | title | parent | nav_order | has_children | redirect_from | |
|---|---|---|---|---|---|---|
| default | CAT pending tasks | CAT APIs | 45 | false |
|
CAT Pending Tasks API
Introduced 1.0 {: .label .label-purple }
The CAT pending tasks operation lists the progress of all pending tasks, including task priority and time in queue.
Endpoints
GET /_cat/pending_tasks
Query parameters
The following table lists the available query parameters. All query parameters are optional.
| Parameter | Data type | Description | Default |
|---|---|---|---|
cluster_manager_timeout |
String | The amount of time allowed to establish a connection to the cluster manager node. | N/A |
format |
String | A short version of the Accept header, such as json or yaml. Valid values are: cbor, json, smile, text, and yaml. |
text |
h |
List | A comma-separated list of column names to display. | N/A |
help |
Boolean | Returns help information. | false |
limit |
Integer | The maximum number of rows to return. Must be greater than 0. Applied after sorting (s). |
N/A |
local |
Boolean | Returns local information but does not retrieve the state from the cluster manager node. | false |
s |
List | A comma-separated list of column names or column aliases to sort by. | N/A |
time |
String | Specifies the time units, for example, 5d or 7h. For more information, see Supported units. Valid values are: nanos, micros, ms, s, m, h, and d. |
N/A |
v |
Boolean | Enables verbose mode, which displays column headers. | false |
Example request
The following example request lists the progress of all pending node tasks:
{% capture step1_rest %} GET /_cat/pending_tasks?v {% endcapture %}
{% capture step1_python %}
response = client.cat.pending_tasks( params = { "v": "true" } )
{% endcapture %}
{% include code-block.html rest=step1_rest python=step1_python %}
Example response
insertOrder | timeInQueue | priority | source
1786 | 1.8s | URGENT | shard-started
Required permissions
If you use the Security plugin, make sure you have the appropriate permissions: cluster:monitor/task.