How to sync multiple ReadOnlyRest configuration?

Hello,

I am looking for a way to sync multiple ReadOnlyRest configuration but I didn’t see any API for readonlyrest .

Is there any other way to have the same config other than using the same file? I would like to be able to update readonlyrest config on the fly.

You mean you want to replicate the same settings across multiple clusters?

Yes I would like to do that

OK you can create a program that uses the settings API that we use for ROR PRO/Enterprise towards all the clusters.

POST $ELASTICSEARCH_URL/_readonlyrest/admin/config
{
"settings": "...JSON escaped settings YAML"
}

Do you have these clusters configured to do cross cluster search, or are they independent?