cancel
Showing results for 
Search instead for 
Did you mean: 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot list Clusters using Rest API

Lawro
New Contributor II

I am trying to run the following rest API command from:
curl -H "Authorization: Bearer <PAT Code>" -X GET "curl -H "Authorization: Bearer <PAT Code>" -X GET "http://<databricks_workspace>.azuredatabricks.net/api/2.0/clusters/list"  
When I run the command from an engineers desktop, the clusters are listed.  However, when I run command from a cloud hosted server, nothing is returned, but no error is shown either, just an output like the following:
%Total %Received %XFerd %Average Speed Time Time Current Dload Total Spent Left Seed
0              0              0              0               0         0        0      0              --:--:--  --:--:--   --:--:-- 0

Any idea why this would work from a desktop and not a server?


5 REPLIES 5

Alberto_Umana
Databricks Employee
Databricks Employee

Hi @Lawro,

Is there any network restriction?

Can you use -v to debug the output? 

curl -v -H "Authorization: Bearer <PAT Code>" -X GET "https://<databricks_workspace>.azuredatabricks.net/api/2.0/clusters/list"

MadhuB
Contributor III

Hi @Lawro 

To isolate potential network problems, please confirm if you're operating within a Private/Hybrid cloud environment. Besides, I recommend the below troubleshooting steps based on the limited context you have provided.

Quick Check: Attempt to access the Databricks portal directly from the server. Successful access suggests the issue might lie within the api configuration that you are using.

API Testing: Utilize tools like Postman to further investigate by directly interacting with the Databricks API.

Authentication Method: Troubleshooting is generally easier when using a Personal Access Token (PAT) compared to Service Principal authentication with Azure Active Directory (AAD).

Lawro
New Contributor II

This was very helpful. It turned out there was an issue with the Proxy server and fixing this resolved the issue

jonsan
New Contributor II

It sounds like the server might be facing network or firewall restrictions, preventing the request from reaching the Databricks API. Check if the server has access to the internet and can reach the Databricks workspace endpoint. Also, ensure that the server’s environment is properly configured, including any proxies or security settings that could block the request.

Lawro
New Contributor II

Hi, I definitely think it is facing network issues.  Its just very difficult to identify, when I am able to successfully ping the instance from the server originating the request.
It is something jdbc related, just not sure what.it is

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now