---
type: api
title: Get the default data view
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-getdefaultdataviewdefault
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-getdefaultdataviewdefault
products:
  - Kibana
---

# Get the default data view

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

## Paths

- `GET` `/api/data_views/default`
- `GET` `/s/{space_id}/api/data_views/default`

- [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.

Retrieve the identifier of the default data view for the current Kibana space.

## Responses

#### `200`

Indicates a successful call.

`application/json`

- `data_view_id` (string)
#### `400`

Bad request

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (number)
## Code Examples

#### Console

```console
GET kbn://api/data_views/default
```

#### curl

```curl
curl \
  -X GET "${KIBANA_URL}/api/data_views/default" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response Examples

#### The get default data view API returns the default data view identifier.

The identifier of the default data view for the current Kibana space.

```json
{
  "data_view_id": "ff959d40-b880-11e8-a6d9-e546fe2bba5f"
}
```

#### A bad request response.

The request was rejected because the payload or query parameters are missing required fields or contain invalid values.

```json
{
  "error": "Bad Request",
  "message": "[request body.data_view.title]: expected value of type [string] but got [undefined]",
  "statusCode": 400
}
```

