---
type: api
title: Check if data streams have data
description: Check whether one or more data stream index patterns contain any documents indexed at or after the given start time.<br/><br/>[Required authorization] Route required privileges: fleet-read.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v0/operation/operation-get-fleet-data-streams-data
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v0/operation/operation-get-fleet-data-streams-data
products:
  - Kibana
---

# Check if data streams have data

Availability: Planned

- Server: `https://{kibana_url}`

## Paths

- `GET` `/api/fleet/data_streams/data`

## Description

Check whether one or more data stream index patterns contain any documents indexed at or after the given start time.

## Required authorization

- Privileges: `fleet-read`

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Query string parameters

- `dataStreams` (string · max length: 4096) — required
  A comma-separated list of data stream index patterns to check. Each pattern must be of the form `logs-<dataset>-*` or `metrics-<dataset>-*`.
- `start` (string · max length: 64) — required
  An ISO 8601 timestamp. Only documents with an `@timestamp` at or after this time are considered.

## Responses

#### `200`

Successful response

`application/json`

- `results` (map string to boolean)
  One entry per requested index pattern. `true` when the pattern matched at least one document, `false` when it matched none or the pattern resolved to no index.
#### `400`

Bad request

`application/json`

- `attributes` (object)
- `error` (string)
- `errorType` (string)
- `message` (string)
- `statusCode` (number)
## Code examples

#### Console

```console
GET kbn:/api/fleet/data_streams/data?dataStreams=DATA_STREAMS&start=START
```

#### curl

```curl
curl -X GET "${KIBANA_URL}/api/fleet/data_streams/data?dataStreams=${DATA_STREAMS}&start=${START}" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response examples

#### Get data streams has data

One entry per requested index pattern

```json
{
  "results": {
    "logs-aws.cloudtrail-*": true,
    "metrics-aws.ec2-*": false
  }
}
```

#### Get data streams has data invalid pattern

A requested pattern is not a supported data stream wildcard

```json
{
  "error": "Bad Request",
  "message": "Invalid index pattern: \u0022.security-7\u0022",
  "statusCode": 400
}
```

