# Update a runtime field
**POST /api/data_views/data_view/{viewId}/runtime_field/{fieldName}**
**Spaces method and path for this operation:**
post /s/{space_id}/api/data_views/data_view/{viewId}/runtime_field/{fieldName}
Refer to [Spaces](http://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
## Servers
- http://localhost:5601: http://localhost:5601 ()
## Authentication methods
- Api key auth
- Basic auth
## Parameters
### Path parameters
- **fieldName** (string)
The name of the runtime field.
- **viewId** (string)
An identifier for the data view.
### Body: application/json (object)
- **runtimeField** (object)
The runtime field definition object.
You can update following fields:
- `type`
- `script`
## Responses
### 200
Indicates a successful call.
### 400
Bad request
#### Body: application/json (object)
- **error** (string)
- **message** (string)
- **statusCode** (number)
[Powered by Bump.sh](http://bump.sh)