---
type: api
title: Check if data streams have data
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-get-fleet-data-streams-data
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/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`
- `GET` `/s/{space_id}/api/fleet/data_streams/data`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/authentication#basicauth)

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

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.

## Query String Parameters

- `dataStreams` (string · max: 4096)
  A comma-separated list of data stream index patterns to check. Each pattern must be of the form `logs-<dataset>-<namespace>` or `metrics-<dataset>-<namespace>`, where `<namespace>` is `*` or a concrete namespace.
- `start` (string · max: 64)
  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 /api/fleet/data_streams/data?dataStreams={dataStreams}&start={start}
```

#### curl

```curl
curl -X GET "https://{kibana_url}/api/fleet/data_streams/data?dataStreams={dataStreams}&start={start}"
```

## 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
}
```

