Importing visualizations from different machine

OK, I'm half way there.
First I was able to change the exported objects so they could be imported via cli on there machines, and I will detail how, for anyone else how encounter the same issue:

Kibana 6 objects are exported like so (visualization,searchs and dashboards have there differences, but for the changes that need to be made they are the same):

[
  {
    "_id": "SOME_ID",
    "_type": "visualization",
    "_source": {
      "title": "Results Table",
      "visState": "{\"title\":\"Results Table\",\"type\":\"table\",\"params\":{\"perPage\":100,\"showMeticsAtAllLevels\":false,\"showPartialRows\":false,\"showTotal\":false,\"sort\":{\"columnIndex\":2,\"direction\":\"asc\"},\"totalFunc\":\"sum\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"6\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"STATUS_newValue.raw\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\",\"customLabel\":\"Current Status\"}},{\"id\":\"7\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"DESCRIPTION_newValue.raw\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\",\"customLabel\":\"Description\"}},{\"id\":\"8\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"ENDDATE_newValue.raw\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\",\"customLabel\":\"End Date\"}}]}",
      "uiStateJSON": "{\"spy\":null,\"vis\":{\"params\":{\"sort\":{\"columnIndex\":2,\"direction\":\"asc\"}}}}",
      "description": "",
      "version": 1,
      "kibanaSavedObjectMeta": {
        "searchSourceJSON": "{\"index\":\"SOME_ID\",\"filter\":[],\"query\":{\"language\":\"lucene\",\"query\":\"\"}}"
      }
    }
  }
]

The things to change:

  1. Erase the array that stores the object. The saved_object revieces only json objects.
  2. searchSourceJSON field has a string value: "{...}" .In order for the api to understand that this is a string and not malformed object you need to do something simple - add space between the first and last double quotes in the value. so: searchSourceJSON: " { .... } " and not searchSourceJSON: "{...}".

That way there will be no errors when you send the objects with this curl:

curl -XPOST localhost:5601/api/saved_objects/search -H 'kbn-xsrf:true' -H 'Content-type:application/json' -d @./full_results_search.json

Hope this helps to anyone.

What I still need help with?
When I import the objects, they don't have the host index id that they need to work.
When I import in kibana, there is a prompt that asks me if I want to change the ID to one on the kibana indexs like this:

What is the cli equivalent for this process?
Currently What I can think of is the annoying way of getting the index id from the command:
GET /.kibana/_search?q=type:index-pattern
seraching for the right index, extracting the id, and replacing the id in the objects, and then sending them via the cli.
Is there a more elegant way to do this?