Import Kibana json files programmatically

It is currently not possible to do what you're asking. However, there is an open issue on Github regarding this: https://github.com/elastic/kibana/issues/4759