Miloud_G
New Contributor III

Thank you Advila

I was enable to enable worspace files with scrip :

from databricks.sdk.core import ApiClient
client = ApiClient()
client.do("PATCH", "/api/2.0/workspace-conf", body={"enableWorkspaceFilesystem": "true"}, headers={"Content-Type": "application/json"})
 
the command client = ApiClient() give error (TypeError: ApiClient.__init__() missing 1 required positional argument: 'cfg')
problem fixed with shell command :

%sh
curl -s -X PATCH -H "Authorization: Bearer $DATABRICKS_TOKEN" $DATABRICKS_INSTANCE/api/2.0/workspace-conf -d '{ "enableWorkspaceFilesystem": "true" }'

 

 

View solution in original post