I have more than 2.5K lines in StoredScripts in my old Cloud 5.6 cluster. I want to transfer them to my new Cloud 8.10.4 Cluster. For this, is there a way to automate the creation of these a little using the API?
I created the Scripts in the following way but I have more than 200 Scripts, do you think I should do it 1 by one?
POST _scripts/ss_dashboard_1
{
"script": {
"lang": "mustache",
"source": """{"aggregations":{"nivel":{"terms":{"field":"{{año}}{{mes}}.nivel.keyword"},"aggregations":{"tipo_cliente":{"terms":{"field":"{{año}}{{mes}}.tipo_cliente.keyword"}}}}}}""",
"options": {
"content_type": "application/json; charset=UTF-8"
}
}
}