Cannot list Clusters using Rest API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
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?
- Labels:
-
Partner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
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"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
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).