We would like to be able after duplicating a dataset to change the dataset definition via an API (a program). In dataset edit definition we can select new analysis queries which takes time and we would like to automate this based on the folder or the name of the duplicated dataset. As a starting point we would like to know where the XML or metadata from datasets are stored and if we can explore their content.