So if I type GET /.kibana/_search/?type=index-pattern
into the Kibana console, I get all indices, each with its fields. There are also the scripted fields included. What would be the command to get something that looks like your JSON:
{
"name": "scripted_field",
"type": "number",
"count": 0,
"scripted": true,
"script": "script",
"lang": "painless",
"searchable": true,
"aggregatable": true,
"readFromDocValues": false
}