cancel
Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results for 
Search instead for 
Did you mean: 

Facing CORS issue while calling Databricks REST API from a react application

Yaminim
New Contributor
I am trying to call the REST API of Databricks from a React(v17) application,  using the following documentation https://docs.databricks.com/api/workspace/introduction .
 
I am getting CORS issue on the APIs and not able to call them. But, when I try to call them through an intermediate node server, that I have setup, its working fine.
To be more specific, I tried to execute a query on one of the tables using the statement execution APIs, https://docs.databricks.com/api/workspace/statementexecution
 
Is there a way to call the APIs directly from the React(v17) application ? Or is there a way to bypass the CORS issue ?
1 REPLY 1

Tophu
New Contributor II

There was a similar issue resolved regarding cors seen here: https://community.databricks.com/t5/administration-architecture/databricks-rest-apis-cors-issue/td-p...

 

If this is just for your own development and testing you might consider allowing all in your react app but be careful of monitoring outside malicious requests with such a setting

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