so Azure - just tested , had to change to get and data to json. Please manipulate with path to get data from folder which you need:

import requests
ctx = dbutils.notebook.entry_point.getDbutils().notebook().getContext()
host_name = ctx.tags().get("browserHostName").get()
host_token = ctx.apiToken().get()
 
response = requests.get(
    f'https://{host_name}/api/2.0/workspace/list',
    headers={'Authorization': f'Bearer {host_token}',
            'Accept': 'application/json'},
    json = {'path': '/'}
  )


My blog: https://databrickster.medium.com/