Query parameters

  • actionsstring | array[string]

    A comma-separated list or wildcard expression of actions used to limit the request. For example, you can use cluser:* to retrieve all cluster-related tasks.

  • detailedboolean

    If true, the response includes detailed information about the running tasks. This information is useful to distinguish tasks from each other but is more costly to run.

  • group_bystring

    A key that is used to group tasks in the response. The task lists can be grouped either by nodes or by parent tasks.

    Supported values include:

    • nodes: Group tasks by node ID.
    • parents: Group tasks by parent task ID.
    • none: Do not group tasks.

    Values are nodes, parents, or none.

  • nodesstring | array[string]

    A comma-separated list of node IDs or names that is used to limit the returned information.

  • A parent task identifier that is used to limit returned information. To return all tasks, omit this parameter or use a value of -1. If the parent task is not found, the API does not return a 404 response code.

  • timeoutstring

    The period to wait for each node to respond. If a node does not respond before its timeout expires, the response does not include its information. However, timed out nodes are included in the node_failures property.

    Values are -1 or 0.

  • If true, the request blocks until the operation is complete.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • node_failuresarray[object]
      Hide node_failures attributes Show node_failures attributes object
      • typestring Required

        The type of error

      • reasonstring

        A human-readable explanation of the error, in English.

      • The server stack trace. Present only if the error_trace=true parameter was sent with the request.

      • caused_byobject
      • root_causearray[object]
      • suppressedarray[object]
    • task_failuresarray[object]
      Hide task_failures attributes Show task_failures attributes object
      • task_idnumber Required
      • node_idstring Required
      • statusstring Required
      • reasonobject Required
        Hide reason attributes Show reason attributes object
        • typestring Required

          The type of error

        • reasonstring

          A human-readable explanation of the error, in English.

        • The server stack trace. Present only if the error_trace=true parameter was sent with the request.

        • caused_byobject
        • root_causearray[object]
        • suppressedarray[object]
    • nodesobject

      Task information grouped by node, if group_by was set to node (the default).

      Hide nodes attribute Show nodes attribute object
      • *object Additional properties
        Hide * attributes Show * attributes object
        • namestring
        • hoststring
        • ipstring
        • rolesarray[string]
        • Hide attributes attribute Show attributes attribute object
          • *string Additional properties
        • tasksobject Required
          Hide tasks attribute Show tasks attribute object
          • *object Additional properties
            Hide * attributes Show * attributes object
            • actionstring Required
            • cancelledboolean
            • cancellableboolean Required
            • Human readable text that identifies the particular request that the task is performing. For example, it might identify the search request being performed by a search task. Other kinds of tasks have different descriptions, like _reindex which has the source and the destination, or _bulk which just has the number of requests and the destination indices. Many requests will have only an empty description because more detailed information about the request is not easily available or particularly helpful in identifying the request.

            • headersobject Required
              Hide headers attribute Show headers attribute object
            • idnumber Required
            • nodestring Required
            • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • Time unit for nanoseconds

            • Time unit for milliseconds

            • statusobject

              The internal status of the task, which varies from task to task. The format also varies. While the goal is to keep the status for a particular task consistent from version to version, this is not always possible because sometimes the implementation changes. Fields might be removed from the status for a particular request so any parsing you do of the status might break in minor releases.

            • typestring Required
    • tasksarray[object] | object

      One of:
      Hide attributes Show attributes object
      • actionstring Required
      • cancelledboolean
      • cancellableboolean Required
      • Human readable text that identifies the particular request that the task is performing. For example, it might identify the search request being performed by a search task. Other kinds of tasks have different descriptions, like _reindex which has the source and the destination, or _bulk which just has the number of requests and the destination indices. Many requests will have only an empty description because more detailed information about the request is not easily available or particularly helpful in identifying the request.

      • headersobject Required
        Hide headers attribute Show headers attribute object
      • idnumber Required
      • nodestring Required
      • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

      • Time unit for nanoseconds

      • Time unit for milliseconds

      • statusobject

        The internal status of the task, which varies from task to task. The format also varies. While the goal is to keep the status for a particular task consistent from version to version, this is not always possible because sometimes the implementation changes. Fields might be removed from the status for a particular request so any parsing you do of the status might break in minor releases.

      • typestring Required
GET /_tasks
curl \
 --request GET 'http://api.example.com/_tasks' \
 --header "Authorization: $API_KEY"
Response examples (200)
A successful response from `GET _tasks?actions=*search&detailed` The `detailed` parameter affects the `description` field, which contains human readable text that identifies the particular request that the task is performing. For example, it helps identify the search request being performed by a search task.
{
  "nodes" : {
    "oTUltX4IQMOUUVeiohTt8A" : {
      "name" : "H5dfFeA",
      "transport_address" : "127.0.0.1:9300",
      "host" : "127.0.0.1",
      "ip" : "127.0.0.1:9300",
      "tasks" : {
        "oTUltX4IQMOUUVeiohTt8A:464" : {
          "node" : "oTUltX4IQMOUUVeiohTt8A",
          "id" : 464,
          "type" : "transport",
          "action" : "indices:data/read/search",
          "description" : "indices[test], types[test], search_type[QUERY_THEN_FETCH], source[{\"query\":...}]",
          "start_time_in_millis" : 1483478610008,
          "running_time_in_nanos" : 13991383,
          "cancellable" : true,
          "cancelled" : false
        }
      }
    }
  }
}