If they come from SQL, go to
“Administration → Connections”, click the SQL connection and use “Mass datasets creation”.
If they are on Hadoop and described in a Hive/Impala metastore, use the script DATA_DIR/bin/dku hive-import.
If this doesn't suit your need, you might want to script the generation of the .json files describing the datasets (take existing datasets as example). Those files are in `DATA_DIR/config/projects/PROJECT_KEY/datasets/`. Please note that the exact json format might change between DSS versions. However, DSS gets the list of existing datasets simply by listing the contents of this directory, and this should be stable for some time.