Skip to content
Talk to an Engineer Dashboard

Databricks Workspace

Connect to Databricks Workspace APIs using a Service Principal to manage clusters, jobs, SQL warehouses, and more.

Connect to Databricks Workspace APIs using a Service Principal with OAuth 2.0 client credentials to manage clusters, jobs, SQL, and more.

Databricks logo

Supports authentication: OAuth 2.0

Register your Scalekit environment with the Databricks Workspace connector so Scalekit handles the authentication flow and token lifecycle for you. The connection name you create will be used to identify and invoke the connection programmatically. You’ll need a Databricks Service Principal with an OAuth secret.

  1. Open workspace settings

    • Log into your Databricks workspace and click Settings in the left sidebar.

    • Under Workspace admin, find Identity and access and click Manage next to Service principals.

      Workspace Settings showing Identity and access section

  2. Add a service principal

    • Click Add service principal.

    • Select an existing service principal from your account, or click Add new to create one.

      Add service principal dialog

  3. Generate a client secret

    • Click on the service principal to open its details page.

    • Navigate to the Secrets tab and click Generate secret.

      Service principal Secrets tab with Generate secret button

    • Copy the Client ID and the generated Client Secret — the secret is only shown once.

  4. Add credentials in Scalekit

    • In Scalekit dashboard, go to Agent AuthCreate Connection.

    • Find Databricks Workspace from the list of providers and click Create.

    • Enter the credentials you copied:

      • Workspace URL — your Databricks workspace hostname without https:// (e.g. adb-1234567890.1.azuredatabricks.net)
      • Client ID — the service principal’s Application (client) ID
      • Client Secret — the secret you generated
    • Click Save.

Connect to Databricks Workspace APIs using a Service Principal — Scalekit handles OAuth token management automatically.

You can interact with Databricks in two ways — via direct proxy API calls or via Scalekit optimized tool calls. Scroll down to see the list of available Scalekit tools.

Proxy API calls

import { ScalekitClient } from '@scalekit-sdk/node';
import 'dotenv/config';
const connectionName = 'databricksworkspace'; // get your connection name from connection configurations
const identifier = 'user_123'; // your unique user identifier
// Get your credentials from app.scalekit.com → Developers → Settings → API Credentials
const scalekit = new ScalekitClient(
process.env.SCALEKIT_ENV_URL,
process.env.SCALEKIT_CLIENT_ID,
process.env.SCALEKIT_CLIENT_SECRET
);
const actions = scalekit.actions;
// Make a request via Scalekit proxy
// Assumes a connected account already exists for this identifier
const result = await actions.request({
connectionName,
identifier,
path: '/api/2.0/clusters/list',
method: 'GET',
});
console.log(result);

Scalekit Tools

Get details of a specific Databricks cluster by cluster ID.

NameTypeRequiredDescription
cluster_idstringYesThe unique identifier of the cluster

Start a terminated Databricks cluster by cluster ID.

NameTypeRequiredDescription
cluster_idstringYesThe unique identifier of the cluster to start

Terminate a Databricks cluster by cluster ID. The cluster transitions to a TERMINATED state — this is reversible. The cluster configuration is retained for 30 days (unless pinned) and can be restarted via the start API. To permanently remove a cluster and its configuration, use the Databricks /permanent-delete endpoint directly.

NameTypeRequiredDescription
cluster_idstringYesThe unique identifier of the cluster to terminate

List all clusters in the Databricks workspace.

This tool takes no input parameters.

Get details of a specific Databricks job by job ID.

NameTypeRequiredDescription
job_idintegerYesThe unique identifier of the job

Trigger an immediate run of a Databricks job by job ID.

NameTypeRequiredDescription
job_idintegerYesThe unique identifier of the job to run

List all job runs in the Databricks workspace, optionally filtered by job ID.

NameTypeRequiredDescription
job_idintegerNoFilter runs by a specific job ID. If omitted, returns runs for all jobs
limitintegerNoNumber of runs to return. Defaults to 20, maximum is 1000
offsetintegerNoOffset of the first run to return, used for pagination

List all jobs in the Databricks workspace.

NameTypeRequiredDescription
limitintegerNoNumber of jobs to return. Defaults to 20, maximum is 100
offsetintegerNoOffset of the first job to return, used for pagination

Retrieve information about the currently authenticated service principal in the Databricks workspace.

This tool takes no input parameters.

List all users in the Databricks workspace using the SCIM v2 API.

NameTypeRequiredDescription
countintegerNoMaximum number of results to return per page
filterstringNoSCIM filter expression to narrow results (e.g. userName eq "user@example.com")
startIndexintegerNo1-based index of the first result to return, used for pagination

List all secret scopes available in the Databricks workspace.

This tool takes no input parameters.

Execute a SQL statement on a Databricks SQL warehouse and return the results.

NameTypeRequiredDescription
statementstringYesThe SQL statement to execute
warehouse_idstringYesThe ID of the SQL warehouse to execute the statement on
catalogstringNoThe Unity Catalog name to use for execution
schemastringNoThe schema to use for execution

List all SQL warehouses available in the Databricks workspace.

This tool takes no input parameters.