JSON definition for a index, Visualization and Dashboard in 7.1

Where can I find in the kibana source code on GitHub, the JSON definition for a visualization and dashboard?
I'm feeding data into ELK via logstash. Once the data has been included, I want to use the REST API Object interface to create index, visualization and dashboards. What's missing from the documentation is the JSON definition of these types?
For example: If I can update the attribute field via Update Object, what is the definition of the attribute field?

Where are these defined in the source code or anywhere else?