According to the Kibana API doc, I can query for all dashboards using
curl -u user:pwd -X GET 'https://kibana.elastic-cloud.com:9243/api/saved_objects/_find?type=dashboard'
and I can query for all spaces using
curl -u user:pwd -X GET 'https://kibana.elastic-cloud.com:9243/api/spaces/space'
and I can query for all dashboards within a space using
curl -u user:pwd -X GET 'https://kibana.elastic-cloud.com:9243/s/my_spaces_name/api/saved_objects/_find?type=dashboard'
BUT if i wanted to query for ALL dashboards in Elasticsearch AND cross-reference each dashboard in result with a possible related spaces? I can figure out how to do this by
Query all Spaces
Iterate over each spaces in result, and query each space for child Dashboards
Query All Dashboards globally
Merge the two results
There MUST be a better, more time/resource efficient way to perform this?
Though dashboard can share the same Doc ID (since it would have been copied from the Default Space into a separate more restricted Space using export/import in Saved Objects)
The reality is that both dashboards (in separate spaces) are completely independent of each other, can diverge quite greatly from each other and therefore no merging need to take place.
When I query ALL dashboards (without specifying a spaces) I am actually querying dashboards in the DEFAULT space, "independently" of any dashboards with the same ID that I might come across when I query dashboards in each Space container.
In short, no merging needs to be done (Step 4 is unnecessary) therefore saving some middle-ware processing.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.