Saved Objects API: _find returns 0 results for type=visualization even though visualization exists


(José Raúl Rivera) #1

I've created a visualization using the Kibana UI (its a metric). When I issue:
/api/saved_objects/_find?type=visualization

The response is:

{  
   "saved_objects":[],
   "total":0,
   "per_page":20,
   "page":1
}

Even though issuing
/api/saved_objects/visualization/AWcJs1CQT8PV7INbZnAG

I get the following result, so clearly there is something there. What am I missing?

{  
   "id":"AWcJs1CQT8PV7INbZnAG",
   "type":"visualization",
   "version":1,
   "attributes":{  
      "title":"jrr_test_visualization",
      "visState":"{\"title\":\"jrr_test_visualization\",\"type\":\"metric\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"gauge\",\"gauge\":{\"verticalSplit\":false,\"autoExtend\":false,\"percentageMode\":false,\"gaugeType\":\"Metric\",\"gaugeStyle\":\"Full\",\"backStyle\":\"Full\",\"orientation\":\"vertical\",\"colorSchema\":\"Green to Red\",\"gaugeColorMode\":\"None\",\"useRange\":false,\"colorsRange\":[{\"from\":0,\"to\":100}],\"invertColors\":false,\"labels\":{\"show\":true,\"color\":\"black\"},\"scale\":{\"show\":false,\"labels\":false,\"color\":\"#333\",\"width\":2},\"type\":\"simple\",\"style\":{\"fontSize\":60,\"bgColor\":false,\"labelColor\":false,\"subText\":\"\"}},\"isDisplayWarning\":false},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{\"customLabel\":\"JRR_test\"}}],\"listeners\":{}}",
      "uiStateJSON":"{\"vis\":{\"defaultColors\":{\"0 - 100\":\"rgb(0,104,55)\"}}}",
      "description":"",
      "version":1,
      "kibanaSavedObjectMeta":{  
         "searchSourceJSON":"{\"index\":\"logstash-*\",\"query\":{\"match_all\":{}},\"filter\":[]}"
      }
   }
}

Thank you!


(Nick Peihl) #2

That is strange.

  • Which version of Kibana you are running?
  • Do any visualizations appear in the Saved Objects page of Kibana (Management -> Saved Objects)?