Get datafeeds usage info Added in 5.5.0

GET /_ml/datafeeds/_stats

You can get statistics for multiple datafeeds in a single API request by using a comma-separated list of datafeeds or a wildcard expression. You can get statistics for all datafeeds by using _all, by specifying * as the <feed_id>, or by omitting the <feed_id>. If the datafeed is stopped, the only information you receive is the datafeed_id and the state. This API returns a maximum of 10,000 datafeeds.

Query parameters

  • Specifies what to do when the request:

    1. Contains wildcard expressions and there are no datafeeds that match.
    2. Contains the _all string or no identifiers and there are no matches.
    3. Contains wildcard expressions and there are only partial matches.

    The default value is true, which returns an empty datafeeds array when there are no matches and the subset of results when there are partial matches. If this parameter is false, the request returns a 404 status code when there are no matches or only partial matches.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
GET /_ml/datafeeds/_stats
curl \
 --request GET http://api.example.com/_ml/datafeeds/_stats \
 --header "Authorization: $API_KEY"
Response examples (200)
{
  "count": 42.0,
  "datafeeds": [
    {
      "assignment_explanation": "string",
      "datafeed_id": "string",
      "node": {
        "name": "string",
        "ephemeral_id": "string",
        "id": "string",
        "transport_address": "string",
        "attributes": {
          "additionalProperty1": "string",
          "additionalProperty2": "string"
        }
      },
      "state": "started",
      "timing_stats": {
        "bucket_count": 42.0,
        "": 42.0,
        "exponential_average_calculation_context": {
          "": 42.0
        },
        "job_id": "string",
        "search_count": 42.0
      },
      "running_state": {
        "real_time_configured": true,
        "real_time_running": true,
        "search_interval": {
          "end": "string",
          "": 42.0,
          "start": "string"
        }
      }
    }
  ]
}