Thanks, this is awesome!
How do we use this API for non-local access? I didn't see any place for our API key in the headers, nor do I seem to be able to see what address endpoint Elastic is actually using (We're hosting it through Elastic's standard cloud service), maybe https://api.elastic-cloud.com/api/v1?
If that's the correct endpoint, their documentation doesn't do a great job of demoing how to set up a connection. I've seen documentations demo the API connection in 10 different languages, this one just demo's a GUI app lol.
Elastic has a Python client which we were obviously using in a our previous code, but for some reason I don't see any method in it designed for using the paths like you did in your code to hit that /api/saved_objects/visualization
API endpoint.
Edit: Ok for the API key entry, I think I see it at https://cloud.elastic.co/api/v1/api-docs/spec.json, down at the bottom:
"security": [
{
"apiKey": []
}
]