cancel
Showing results for 
Search instead for 
Did you mean: 
Administration & Architecture
cancel
Showing results for 
Search instead for 
Did you mean: 

Databricks REST API to fetch mount points

agarg
New Contributor II

Is there a way to fetch workspace  mount points ( mount infos) through REST API or SQL-query  ? 
( similar to the python API "display(dbutils.fs.mounts())" )  
I couldn't find any REST API for the mounts in the official databricks API  documentation ( https://docs.databricks.com/api/workspace/introduction)  . 

2 REPLIES 2

Kaniz
Community Manager
Community Manager

Hi @agargAs of now, the Databricks REST API does not directly provide a specific endpoint to fetch workspace mount points or mount information. However, you can achieve this by executing SQL queries on Databricks SQL Warehouse using the Databri....

  • You can use the Databricks SQL Statement Execution API to execute SQL statements on a SQL warehouse and retrieve the results.
  • The maximum query text size is 16 MiB, and cancellation requests might silently fail.
  • Refer to the full API reference for executing SQL statements here.
  • Suppose you want to retrieve mount information similar to the Python API display(dbutils.fs.mounts()).
  • You can create an SQL query that fetches the relevant details from the appropriate tables/views in your Databricks workspace.

 

agarg
New Contributor II

Thank you for the response @Kaniz . 

agarg_0-1714449556488.png

As per your comment above I tried looking for any system catalog tables (https://docs.databricks.com/en/sql/language-manual/sql-ref-information-schema.html) that could provide the relevant information regarding the `mount points`. But I couldn't find any table that could provide me information related to `mount points`. 
I also found this topic (https://community.databricks.com/t5/data-governance/where-mount-info-get-stored-in-external-hive-met...) below which discuss about the storing mechanism for the `mount info` in databricks. 
Which catalog/system tables might store such metadata related to mount point ?