- Kibana Guide: other versions:
- What is Kibana?
- What’s new in 7.8
- Get started
- Set up Kibana
- Discover
- Dashboard
- Canvas
- Maps
- Machine learning
- Graph
- Visualize
- Logs
- Metrics
- APM
- Uptime
- SIEM
- Dev Tools
- Stack Monitoring
- Management
- Advanced Settings
- Alerts and Actions
- Beats Central Management
- Cross-Cluster Replication
- Index Lifecycle Policies
- Index Management
- Ingest Node Pipelines
- Index patterns and fields
- License Management
- Numeral Formatting
- Remote Clusters
- Rollup Jobs
- Saved Objects
- Security
- Snapshot and Restore
- Spaces
- Upgrade Assistant
- Watcher
- Ingest Manager
- Reporting
- Alerting and Actions
- REST API
- Kibana plugins
- Accessibility
- Limitations
- Breaking Changes
- Release Notes
- Kibana 7.8.1
- Kibana 7.8.0
- Kibana 7.7.1
- Kibana 7.7.0
- Kibana 7.6.2
- Kibana 7.6.1
- Kibana 7.6.0
- Kibana 7.5.2
- Kibana 7.5.1
- Kibana 7.5.0
- Kibana 7.4.2
- Kibana 7.4.1
- Kibana 7.4.0
- Kibana 7.3.2
- Kibana 7.3.1
- Kibana 7.3.0
- Kibana 7.2.1
- Kibana 7.2.0
- Kibana 7.1.1
- Kibana 7.1.0
- Kibana 7.0.1
- Kibana 7.0.0
- Kibana 7.0.0-rc2
- Kibana 7.0.0-rc1
- Kibana 7.0.0-beta1
- Kibana 7.0.0-alpha2
- Kibana 7.0.0-alpha1
- Developer guide
Kibana API
editKibana API
editIn addition to the APM specific API endpoints, Kibana provides its own REST API which you can use to automate certain aspects of configuring and deploying Kibana. An example is below.
Customize the APM index pattern
editAs an alternative to updating apm_oss.indexPattern
in your kibana.yml
configuration file,
you can use Kibana’s update object API to update the default APM index pattern on the fly.
The following example sets the default APM app index pattern to some-other-pattern-*
:
curl -X PUT "localhost:5601/api/saved_objects/index-pattern/apm_static_index_pattern_id" \ -H 'Content-Type: application/json' \ -H 'kbn-xsrf: true' \ -H 'Authorization: Basic ${YOUR_AUTH_TOKEN}' \ -d' { "attributes": { "title": "some-other-pattern-*", } }'
|
|
Your custom index pattern matcher. |
The API returns the following:
{ "id":"apm_static_index_pattern_id", "type":"index-pattern", "updated_at":"2020-07-06T22:55:59.555Z", "version":"WzYsMV0=", "attributes":{ "title":"some-other-pattern-*" } }
To view the new APM app index pattern, use the GET object API:
curl -X GET "localhost:5601/api/saved_objects/index-pattern/apm_static_index_pattern_id" \ -H 'kbn-xsrf: true' \ -H 'Authorization: Basic ${YOUR_AUTH_TOKEN}'
The API returns the following:
{ "id":"apm_static_index_pattern_id", "type":"index-pattern", "updated_at":"2020-07-06T22:55:59.555Z", "version":"WzYsMV0=", "attributes":{...} "fieldFormatMap":"{...} "fields":"[{...},{...},...] "sourceFilters":"[{\"value\":\"sourcemap.sourcemap\"}]", "timeFieldName":"@timestamp", "title":"some-other-pattern-*" }, ... }
More information on Kibana’s API is available in REST API.
On this page