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:ย 

Databricks Apps with FastAPI

AndyK
New Contributor II

I have a FastAPI Databricks App deployed to a hosted workspace. How can I call the API from external tools like Postman?

P.S. I was able to call the API within the same browser.

2 REPLIES 2

SP_6721
Contributor III

Hi @AndyK ,

External tools donโ€™t share browserโ€™s login context, so youโ€™ll need to add a bearer token in the Authorization header manually.

Start by generating an access token. You can either use the Databricks CLI (databricks auth token) to get an OAuth token, or create a Personal Access Token (PAT) from your workspace settings.
Then in Postman, enter your API endpoint like:
https://<workspace-host>/api/<endpoint-path>
Go to the Authorization tab, choose Bearer Token, and paste your token.

Make sure you have CAN USE permission on the Databricks App. Also, note that tokens,especially OAuth, can expire (usually in about an hour), so you might need to generate new one when needed

AndyK
New Contributor II

Hi,

PAT doesn't seem to work, but we use a workspace token and it was able to go through. Thanks

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