- Kibana Guide: other versions:
- What is Kibana?
- What’s new in 7.13
- Kibana concepts
- Quick start
- Set up
- Install Kibana
- Configure Kibana
- Alerting and action settings
- APM settings
- Banners settings
- Development tools settings
- Graph settings
- Fleet settings
- i18n settings
- Logging settings
- Logs settings
- Metrics settings
- Machine learning settings
- Monitoring settings
- Reporting settings
- Secure settings
- Search sessions 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
- Embed Kibana content in a web page
- Configure monitoring
- Configure security
- Production considerations
- Discover
- Dashboard
- Canvas
- Maps
- Machine learning
- Graph
- Alerting
- Observability
- APM
- Security
- Dev Tools
- Stack Monitoring
- Stack Management
- Fleet
- Reporting
- REST API
- Kibana plugins
- Accessibility
- Release notes
- 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