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

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?


2 REPLIES 2

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

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).

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group