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

How to check the status of a cluster via Rest API?

User16790091296
Contributor II
 
3 REPLIES 3

Hayley
Databricks Employee
Databricks Employee

You can use this code for a GET call from the cluster API Docs and look at the response field "state" to see the status. You will want to swap out the domain for your workspace's domain and the cluster ID of the cluster you are monitoring.

curl --netrc -X GET \
https://<DOMAIN>.cloud.databricks.com/api/2.0/clusters/get \
--data '{ "cluster_id": "1<CLUSTER ID>" }' \
| jq .

Hope this helps!

Taha
Databricks Employee
Databricks Employee

There's a clusters GET request you can make as part of the clusters API:

https://docs.databricks.com/dev-tools/api/latest/clusters.html#get

Mooune_DBU
Valued Contributor

Dy doing a `GET` call using the cluster id

curl --netrc -X GET \
https://dbc-a1b2345c-d6e7.cloud.databricks.com/api/2.0/clusters/get \
--data '{ "cluster_id": "1234-567890-myclustID" }' \
| jq .

The response json will have a `state` tag which will look like this:

{
  "cluster_id": "1234-567890-myclustID",
  ...
  "state": "TERMINATED",
  "state_message": "Inactive cluster terminated (inactive for 120 minutes).",
...
}

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