---
type: api
title: Delete a runtime field from a 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-deleteruntimefielddefault
resource: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/v8/operation/operation-deleteruntimefielddefault
products:
  - Kibana
---

# Delete a runtime field from a data view

Authentication: required

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

## Paths

- `DELETE` `/api/data_views/data_view/{viewId}/runtime_field/{fieldName}`
- `DELETE` `/s/{space_id}/api/data_views/data_view/{viewId}/runtime_field/{fieldName}`

#### 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.
- `fieldName` (string) — required
  The name of the runtime field.
  Example: `hour_of_day`
- `viewId` (string) — required
  An identifier for the data view.
  Example: `ff959d40-b880-11e8-a6d9-e546fe2bba5f`

## Responses

#### `200`

Indicates a successful call.

#### `404`

Object is not found.

`application/json`

- `error` (enum)
  Values: `Not Found`
- `message` (string)
- `statusCode` (enum)
  Values: `404`
## Code examples

#### Console

```console
DELETE kbn:/api/data_views/data_view/ff959d40-b880-11e8-a6d9-e546fe2bba5f/runtime_field/hour_of_day
```

#### curl

```curl
curl -X DELETE "${KIBANA_URL}/api/data_views/data_view/ff959d40-b880-11e8-a6d9-e546fe2bba5f/runtime_field/hour_of_day" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response examples

#### 404

`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": "Not Found",
  "message": "Saved object [index-pattern/caaad6d0-920c-11ed-b36a-874bd1548a00] not found",
  "statusCode": 404
}
```

