---
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/4641/api/doc/kibana/v8/operation/operation-getdefaultdataviewdefault
resource: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/v8/operation/operation-getdefaultdataviewdefault
products:
  - Kibana
---

# Get the default data view

Authentication: required

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

## Paths

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

#### Path parameters

- `space_id` (string) — optional
  An identifier for the space. If `space_id` is not provided in the URL, the default space is used. Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

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

`application/json`

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

#### 400

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "error": "Bad Request",
  "message": "string",
  "statusCode": 400
}
```

