Modify data nodes as ML nodes with API calls

Hello, team!. I have created 4 data nodes and i am trying to modify the 2 of them as ML nodes. Do you know how i can do it using API calls?. “I dont have access in opensearch.yml”.
Thank you.

what kind of deployment does your cluster have?

  • if you’ve already indexed documents and scatter their shards multiple nodes, reindexing or gathering to have only one or two primary shards in Data Nodes you want to keep.