cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

post /api/2.0/sql/statements/sql statement id/cancel forbidden error in databricks

slakshmanan
New Contributor III

when i tried executing this request

post /api/2.0/sql/statements/${SQL_STATEMENT_ID}/cancel

I am getting forbidden error.

how do we get access to execute this

1 REPLY 1

filipniziol
Esteemed Contributor

Hi @slakshmanan ,

The 403 Forbidden error usually means that the API request is not authorized, meaning you likely do not have the proper permissions or your authentication credentials are not being recognized. Here are 2 main reasons:

1. Missing or Incorrect Authentication Token
To execute REST API requests on Databricks, you need to authenticate using a Personal Access Token (PAT). Make sure that:

  • You have generated a valid PAT from your Databricks workspace settings.
  • You are including the PAT correctly in the request header.
Authorization: Bearer <YOUR_PERSONAL_ACCESS_TOKEN>

2. Insufficient Permissions

Make sure you have correct permissions


 

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