- Kibana Guide: other versions:
- What is Kibana?
- What’s new in 8.3
- Kibana concepts
- Quick start
- Set up
- Install Kibana
- Configure Kibana
- Alerting and action settings
- APM settings
- Banners settings
- Enterprise Search settings
- Fleet settings
- i18n settings
- Logging settings
- Logs settings
- Metrics settings
- Monitoring settings
- Reporting settings
- Search sessions settings
- Secure settings
- Security settings
- Spaces settings
- Task Manager settings
- Telemetry settings
- URL drilldown settings
- Start and stop Kibana
- Access Kibana
- Securing access to Kibana
- Add data
- Upgrade Kibana
- Configure security
- Configure reporting
- Configure logging
- Configure monitoring
- Command line tools
- Production considerations
- Discover
- Dashboard and visualizations
- Canvas
- Maps
- Build a map to compare metrics by country or region
- Track, visualize, and alert on assets in real time
- Map custom regions with reverse geocoding
- Heat map layer
- Tile layer
- Vector layer
- Plot big data
- Search geographic data
- Configure map settings
- Connect to Elastic Maps Service
- Import geospatial data
- Troubleshoot
- Reporting and sharing
- Machine learning
- Graph
- Alerting
- Observability
- APM
- Security
- Dev Tools
- Fleet
- Osquery
- Stack Monitoring
- Stack Management
- REST API
- Get features API
- Kibana spaces APIs
- Kibana role management APIs
- User session management APIs
- Saved objects APIs
- Data views API
- Index patterns APIs
- Alerting APIs
- Action and connector APIs
- Cases APIs
- Import and export dashboard APIs
- Logstash configuration management APIs
- Machine learning APIs
- Short URLs APIs
- Get Task Manager health
- Upgrade assistant APIs
- Kibana plugins
- Troubleshooting
- Accessibility
- Release notes
- Developer guide
Update data view fields API
editUpdate data view fields API
edit
[preview]
This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
Update fields presentation metadata, such as count
,
customLabel
, and format
. You can update multiple fields in one request. Updates
are merged with persisted metadata. To remove existing metadata, specify null
as the value.
Request
editPOST <kibana host>:<port>/api/data_views/data_view/<id>/fields
POST <kibana host>:<port>/s/<space_id>/api/data_views/data_view/<id>/fields
Path parameters
edit-
space_id
-
(Optional, string) An identifier for the space. If
space_id
is not provided in the URL, the default space is used. -
id
- (Required, string) The ID of the data view fields you want to update.
Request body
edit-
fields
- (Required, object) the field object
Response code
edit-
200
- Indicates a successful call.
Examples
editSet popularity count
for field foo
:
$ curl -X POST api/data_views/data-view/my-view/fields { "fields": { "foo": { "count": 123 } } }
Change a simple field format:
$ curl -X POST api/data_views/data-view/my-view/fields { "fields": { "foo": { "format": { "id": "bytes" } } } }
Change a complex field format:
$ curl -X POST api/data_views/data-view/my-view/fields { "fields": { "foo": { "format": { "id": "static_lookup", "params": { "lookupEntries": [ { "key": "1", "value": "100" }, { "key": "2", "value": "200" } ], "unknownKeyValue": "5000" } } } } }
Update multiple metadata fields in one request:
$ curl -X POST api/data_views/data-view/my-view/fields { "fields": { "foo": { "count": 123, "customLabel": "Foo" }, "bar": { "customLabel": "Bar" } } }
Use null
value to delete metadata:
$ curl -X POST api/data_views/data-view/my-pattern/fields { "fields": { "foo": { "customLabel": null } } }
The endpoint returns the updated data view object:
{ "data_view": { } }