Programmatically enter missing dataset credentials using API

I am leveraging the REST API's to invoke a Dataset Takeover and Update Parameters method, however as the new owner is different to the original/publishing owner the dataset requires updated credentials before it can be refreshed. Currently I have to manually enter the missing credentials to enable a refresh.

Data source error:

It looks like scheduled refresh failed because at least one data source is missing credentials. To start the refresh again, go to this dataset's settings page and enter credentials for all data sources.

Cluster URI:

WABI-NORTH-EUROPE-redirect.analysis.windows.net

Activity ID:

00000000-0000-0000-0000-000000000000

Request ID:

e9498bc8-a818-4d27-9b35-06a4b0e94582

Time:

2019-12-17 13:58:44Z

My objective is to programatically script all these steps avoiding manual steps. The dataset does not use any gateways and only contains a single Azure SQL Database datasource. Is this feasible with current version of API's?