<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: API to get all metastores on the account in Data Governance</title>
    <link>https://community.databricks.com/t5/data-governance/api-to-get-all-metastores-on-the-account/m-p/9773#M377</link>
    <description>&lt;P&gt;A Databricks personal access token is workspace specific as far as I can tell, which is also not ideal, but I will give it a try.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Mar 2023 15:01:54 GMT</pubDate>
    <dc:creator>iwan_aucamp</dc:creator>
    <dc:date>2023-03-16T15:01:54Z</dc:date>
    <item>
      <title>API to get all metastores on the account</title>
      <link>https://community.databricks.com/t5/data-governance/api-to-get-all-metastores-on-the-account/m-p/9771#M375</link>
      <description>&lt;P&gt;The &lt;A href="https://api-docs.databricks.com/rest/latest/unity-catalog-api-specification-2-1.html?_ga=2.232395103.1717236254.1675840663-474656499.1675675093" alt="https://api-docs.databricks.com/rest/latest/unity-catalog-api-specification-2-1.html?_ga=2.232395103.1717236254.1675840663-474656499.1675675093" target="_blank"&gt;Unity Catalog API 2.1&lt;/A&gt; only supports retrieving the unity catalogs associated with individual workspaces&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; The&amp;nbsp;listMetastores&amp;nbsp;endpoint does&amp;nbsp;&lt;B&gt;&lt;I&gt;not&lt;/I&gt;&lt;/B&gt;&amp;nbsp;list all Metstores that exist in the customer account. Instead it restricts the list by what the Workspace (as determined by the client’s PAT token) can access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have checked what happens in the WebUI when I access &lt;A href="https://accounts.azuredatabricks.net/data" target="test_blank"&gt;https://accounts.azuredatabricks.net/data&lt;/A&gt; - and it does a GET on &lt;A href="https://accounts.azuredatabricks.net/api/2.0/accounts/${DATABRICKS_ACCOUNT_ID}/metastores" target="test_blank"&gt;https://accounts.azuredatabricks.net/api/2.0/accounts/${DATABRICKS_ACCOUNT_ID}/metastores&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried calling this using an AzureAD access token, but this is not working, I keep getting a 303 with  location: &lt;A href="https://accounts.azuredatabricks.net/login?next_url=%2Fapi%2F2.0%2Faccounts%2F...%2Fmetastores" target="test_blank"&gt;https://accounts.azuredatabricks.net/login?next_url=%2Fapi%2F2.0%2Faccounts%2F...%2Fmetastores&lt;/A&gt; - using the exact same access token with GET on &lt;A href="https://accounts.azuredatabricks.net/api/2.0/accounts/${DATABRICKS_ACCOUNT_ID}/scim/v2/Users" target="test_blank"&gt;https://accounts.azuredatabricks.net/api/2.0/accounts/${DATABRICKS_ACCOUNT_ID}/scim/v2/Users&lt;/A&gt; works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there some other API that I can use to get all metastores on the account? Or is there some way you can make this API work with access tokens? Would also be nice to have it in some OpenAPI spec.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 10:06:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/api-to-get-all-metastores-on-the-account/m-p/9771#M375</guid>
      <dc:creator>iwan_aucamp</dc:creator>
      <dc:date>2023-02-08T10:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: API to get all metastores on the account</title>
      <link>https://community.databricks.com/t5/data-governance/api-to-get-all-metastores-on-the-account/m-p/9772#M376</link>
      <description>&lt;P&gt;@Iwan Aucamp​&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on your description, it seems like you are encountering an authentication issue when trying to call the Unity Catalog API. It is possible that the AzureAD access token you are using does not have the necessary permissions to access the Metastores endpoint.&lt;/P&gt;&lt;P&gt;One potential solution could be to try using a Databricks personal access token (PAT) instead of an AzureAD access token. PATs are specifically designed for accessing Databricks APIs and may have the necessary permissions to access the Metastores endpoint.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 08:25:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/api-to-get-all-metastores-on-the-account/m-p/9772#M376</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-16T08:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: API to get all metastores on the account</title>
      <link>https://community.databricks.com/t5/data-governance/api-to-get-all-metastores-on-the-account/m-p/9773#M377</link>
      <description>&lt;P&gt;A Databricks personal access token is workspace specific as far as I can tell, which is also not ideal, but I will give it a try.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 15:01:54 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/api-to-get-all-metastores-on-the-account/m-p/9773#M377</guid>
      <dc:creator>iwan_aucamp</dc:creator>
      <dc:date>2023-03-16T15:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: API to get all metastores on the account</title>
      <link>https://community.databricks.com/t5/data-governance/api-to-get-all-metastores-on-the-account/m-p/9774#M378</link>
      <description>&lt;P&gt;Hi @Iwan Aucamp​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope everything is going great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just wanted to check in if you were able to resolve your issue. If yes, would you be happy to mark an answer as best so that other members can find the solution more quickly? If not, please tell us so we can help you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Apr 2023 07:24:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/api-to-get-all-metastores-on-the-account/m-p/9774#M378</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-08T07:24:34Z</dc:date>
    </item>
  </channel>
</rss>

