Import layout via API and include DataSet Data

We’re trying to import layouts via the undocumented API call /layout/import
It accepts a file parameter in form-data and the layout actually imports, but it doesn’t seem to be able to import the data in the DataSet.
It creates the DataSet, but doesn’t import the data inside.

Importing the same layout via the CMS UI and selecting the following options results in the dataset data being successfully imported:
Unselect ‘Use existing DataSets matched by name?’
Select ‘Import DataSet Data?’

Based on the debug logs, these correspond to useExistingDataSets and importDataSetData, but from looking at the import function those don’t seem to be options it handles.

Has anyone else tried to import layouts via API and been able to import the dataset data?

Posting in hopes this helps someone (or me again) in the future

The way to control the same options as in the upload UI is to use the ‘options[optionName]’ key in form data and use ‘1’ for True

options[importDataSetData]:1