Is there an API endpoint to get/put String Field Formatters? Specifically, I wanted to export/import a URL formatter that has a custom Label Template. I can't seem to find the data anywhere on the index or mapping APIs.
There isn't an API for string field formatters specifically, but there is an API for accessing/modifying "Saved Objects", which includes index pattern objects. https://www.elastic.co/guide/en/kibana/current/saved-objects-api.html
If you start off by reading the index pattern object, then add a string field formatter, and read the object again you should be able to reverse engineer how Kibana is storing that information in the Saved Object and start adding them from an external application of some sort.
Hope that helps!
Please note that while we are intentionally exposing the Saved Objects API for users, the internal structure of the objects managed by that API can change during pretty much any version upgrade. Index Pattern objects haven't changed in a while, and when they have changed in the past it has been done the changes have been mostly backwards-compatible, but you'll still want to make sure and test your API integration before upgrading Kibana in the future to make sure it still works as intended.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.